Skip to content

Instantly share code, notes, and snippets.

@nfarah86
Created May 18, 2020 06:54
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/4d8e87ff6e70e1da1c017e80b8daeef2 to your computer and use it in GitHub Desktop.
Save nfarah86/4d8e87ff6e70e1da1c017e80b8daeef2 to your computer and use it in GitHub Desktop.
Insert data into MongoDB
from settings import *
from mongo_config import weather_data_collection, pollution_data_collection`
def insert_to_mongo():
print("inserting into mongo")
weather_data_collection.insert_one({"weather":"warm"})
insert_to_mongo()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment