Skip to content

Instantly share code, notes, and snippets.

@sampottinger
Created August 21, 2013 22:25
Show Gist options
  • Select an option

  • Save sampottinger/6301047 to your computer and use it in GitHub Desktop.

Select an option

Save sampottinger/6301047 to your computer and use it in GitHub Desktop.
New aggregator code
import pycotracer
import pymongo
client = pymongo.MongoClient()
db = client['tracer-records-db']
all_data = pycotracer.get_report(2013)
pycotracer.mongo_aggregator.insert_contribution_entries(db,
all_data['ContributionData'])
pycotracer.mongo_aggregator.insert_expenditure_entries(db,
all_data['ExpenditureData'])
pycotracer.mongo_aggregator.insert_loan_entries(db,
all_data['LoanData'])
del all_data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment