[WIP] Simple REST API that mimics larger application to be used for environment benchmarking
The main goals are:
- Minimal Complexity
- Mimic Enterprise Application activity at a small scale
- Including WebSockets
- Benchmarking of different environment scenarios
- Easily traceable by monitoring tools
- Extensible
- Easy to generate server load
- Easy to run/setup
- Fun
This is a work in progress
- Python 3.6+
- Docker
- Docker Compose
$ docker-compose up --build
requestapiproject-db-1 |
requestapiproject-db-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
requestapiproject-db-1 |
requestapiproject-db-1 | LOG: redirecting log output to logging collector process
requestapiproject-db-1 | HINT: Future log output will appear in directory "/var/log/postgresql".
api | INFO: Will watch for changes in these directories: ['/code']
api | INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
api | INFO: Started reloader process [1] using watchgod
api | INFO sqlalchemy.engine.Engine select pg_catalog.version()
api | INFO sqlalchemy.engine.Engine [raw sql] {}
api | INFO sqlalchemy.engine.Engine select current_schema()
api | INFO sqlalchemy.engine.Engine [raw sql] {}
api | INFO sqlalchemy.engine.Engine show standard_conforming_strings
api | INFO sqlalchemy.engine.Engine [raw sql] {}
api | INFO sqlalchemy.engine.Engine BEGIN (implicit)
api | INFO sqlalchemy.engine.Engine COMMIT
api | INFO: Started server process [8]
api | INFO: Waiting for application startup.
api | Starting up
api | INFO: Application startup complete.
Open your browser at: http://127.0.0.1:8000/app.
or
Open your browser at: http://127.0.0.1:8000/app/view.
Open your browser at: http://127.0.0.1:8000/docs.
You will see the automatic interactive API documentation (provided by Swagger UI):