https://github.com/dkatz23238/sql-autoapi-with-pokemon
SQLAlchemy, Docker, FastAPI, and Jinj2 for code generation
https://github.com/dkatz23238/sql-autoapi-with-pokemon
Last synced: 3 months ago
JSON representation
SQLAlchemy, Docker, FastAPI, and Jinj2 for code generation
- Host: GitHub
- URL: https://github.com/dkatz23238/sql-autoapi-with-pokemon
- Owner: dkatz23238
- Created: 2022-01-02T18:14:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-04T14:32:42.000Z (over 3 years ago)
- Last Synced: 2025-01-19T08:28:10.503Z (4 months ago)
- Language: Python
- Size: 24.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Automatic SQL API Generation w/ Pokemon Example
First of all make sure you use `python` 3.8 and install the packages in `requirements.txt`.
## Quickstart
### Build and run server
```sh
docker-compose down && docker-compose rm;
python api_builder.py;
docker-compose build;
docker-compose up -d;
sleep 90;
python make_tables.py;
python make_views.py;
python perform_data_seed.py;
```## Instructions
### 1) `models.py` and `queries`
Populate models.py with valid data model and queries with sql views that should be served through the API.
### 2) Quickstart
Run the quickstart script
### 3) Build ETL Container
```sh
docker build -f etl.Dockerfile -t pokemonrestapp-etl:latest .
docker run --network basic_sql_app_default pokemonrestapp-etl:latest
```