https://github.com/tistaharahap/letsgobro-api
Find random destinations from where you are on a budget, written to learn FastAPI
https://github.com/tistaharahap/letsgobro-api
Last synced: 5 months ago
JSON representation
Find random destinations from where you are on a budget, written to learn FastAPI
- Host: GitHub
- URL: https://github.com/tistaharahap/letsgobro-api
- Owner: tistaharahap
- License: mit
- Created: 2021-01-02T11:18:08.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-16T16:55:24.000Z (over 4 years ago)
- Last Synced: 2025-03-02T19:19:07.286Z (10 months ago)
- Language: Python
- Size: 1.55 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LetsGoBro
Use this to go to a random destination within a budget. Optimized for South East Asia travelling. Written to learn FastAPI, was impressed.
MongoDB is used for geospatial queries.
## Running
```shell
$ git clone git@github.com:tistaharahap/letsgobro-api.git
$ cd letsgobro-api
$ virtualenv env
$ . env/bin/activate
$ pip install -r requirements.txt
$ MONGO_USER=user MONGO_PASSWORD=password MONGO_HOST=host MONGO_DB=db python scripts/airports.py # seed mongodb, only needed once
$ MONGO_USER=user MONGO_PASSWORD=password MONGO_HOST=host MONGO_DB=db python app.py
```
### Endpoints
Since this is a FastAPI implementation, just run the API and go to `http://localhost:8000/docs`.
## Env Vars
| Name | Description |
| :--- | :--- |
| `MONGO_USER` | User for MongoDB |
| `MONGO_PASSWORD` | Password for MongoDB |
| `MONGO_HOST` | Host for MongoDB |
| `MONGO_DB` | Database for MongoDB |
## Credits
Airport data made possible by these repos in Github:
* [https://github.com/lynnandtonic/airport-codes](https://github.com/lynnandtonic/airport-codes)
* [https://github.com/mwgg/Airports](https://github.com/mwgg/Airports)