Go to docker directory and start services.
docker compose up-
MongoDB is running and accessible at
localhost:27017. You can access the database using web-based MongoDB admin interface provided underlocalhost:8081. -
Tweets API is running and accessible at
localhost:8000. You can check how to communicate with the API in the documentation available atlocalhost:8000/docs. Or you can see the raw OpenAPI schema with the descriptions of all API available atlocalhost:8000/openapi.json.
Kill the containers and reset the volumes.
docker compose down -vCreate or download data/tweets.json file with tweets data.
Go to scripts directory and run script for uploading tweets data to mongo database.
python upload_tweets_data.pyYou can query the tweets data directly from mongo database. You can see example queries in the script.
python example_queries.py