Skip to content

yakhoruzhenko/blog-app-fastapi

Repository files navigation

BLOG APPLICATION

https://blogappfastapi-1-p2907302.deta.app/docs

Author

Yaroslav Khoruzhenko

Application technology stack

Key frameworks and libraries which are used by this application are: FastAPI (main framework), uvicorn (ASGI web server implementation), SQLAlchemy (ORM approach), SQLite (as a DB engine)

Local development

To run the application locally please create python a virtual envirnoment. Then, with it being activated, install all needed dependencies by running pip install -r requirements.txt.

This project utilizes several tools for linting and static security checking. Run these commands in command line from your python environment to pass all checks:

flake8 .
mypy .
isort .
bandit .

Application local run

After installing all prerequisite dependencies you could run Blog app with:

uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload

This application is a 100% back-end one so to get some kind of UI you need use autogenerated documentation (OpenAPI specification) which is hosted on:

http://localhost:8000/docs/

Path could be different based on how you run uvicorn server.

Local testing

Testing should be conducted with a usage of pytest with a coverage rate equal to 100. To run tests locally under the created virtual environment please execute:

pytest .