Skip to content

piotrcichacki/mongo-tweets-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mongo Tweets API

Services

Start services

Go to docker directory and start services.

docker compose up
  1. MongoDB is running and accessible at localhost:27017. You can access the database using web-based MongoDB admin interface provided under localhost:8081.

  2. Tweets API is running and accessible at localhost:8000. You can check how to communicate with the API in the documentation available at localhost:8000/docs. Or you can see the raw OpenAPI schema with the descriptions of all API available at localhost:8000/openapi.json.

Stop service

Kill the containers and reset the volumes.

docker compose down -v

Data

Upload data

Create 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.py

Query data

You can query the tweets data directly from mongo database. You can see example queries in the script.

python example_queries.py

About

Fast API for working with tweets data based on mongo db

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published