storage_manager.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:plaid2text 作者: madhat2r 项目源码 文件源码
def get_transactions(self,from_date=None,to_date=None,only_new=True):
        """
        Retrieve transactions for producing text file
        """
        query = {}
        if only_new:
            query['plaid2text.pulled_to_file'] = False

        if from_date and to_date and (from_date < to_date):
            query['date'] = {'$gte':from_date,'$lte':to_date}
        elif from_date and not to_date:
            query['date'] = {'$gte':from_date}
        elif not from_date and to_date:
            query['date'] = {'$lte':to_date}

        transactions = self.account.find(query).sort('date',ASCENDING)

        return transactions
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号