Skip to content

Instantly share code, notes, and snippets.

@nfarah86
Created May 18, 2020 06:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nfarah86/1fc7bc9987d27edbec0fa9b32be95163 to your computer and use it in GitHub Desktop.
Save nfarah86/1fc7bc9987d27edbec0fa9b32be95163 to your computer and use it in GitHub Desktop.
Create your mongo config file
from pymongo import MongoClient
from settings import MONGO_URI
client = MongoClient(MONGO_URI)
db = client.get_database("weather_pollution_db")
weather_data_collection = db.weather_data
pollution_data_collection = db.air_pollution_data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment