An open API service indexing awesome lists of open source software.

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

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
```