Skip to content

Latest commit

 

History

History
71 lines (55 loc) · 1.97 KB

README.md

File metadata and controls

71 lines (55 loc) · 1.97 KB

FastAPI Science.

Build Status Build Status

I found my old project and decided to make it more interesting. So the fact is I restructured the project to change its architecture. Some new features are coming. The web-app is both fullstack and API.

NOTE: .git root is project root;

Stack

  • Python 3.12;
  • FastAPI;
  • PostgreSQL;
  • fastapi_authtools (my authentication library);
  • Pydantic 2.0;
  • Tortoise ORM;
  • Asyncpg async engine for production and development, aiosqlite for testing;
  • numpy / pandas / sympy / matplotlib for calculations;
  • Docker;
  • Vue.js;
  • HTML / CSS / js for fullstack;
  • pytest in async mode for testing;
  • ruff linter;

Requirements

I use Python 3.11 as the project language. The environment variables seem to be nice, but you can change it with ones you need (.dev.env for developing, .docker.env for running application in Docker, .test.env for testing).

You can install application requirements with:

pip install -r requirements.txt

Tests and linters

First install development requirements with:

pip install -r dev-requirements.txt

To run flake8 linter:

ruff check .

To run tests:

pytest

or write this for more information:

pytest -s -vv

Running application

You can run it using Docker. Run this command in the project root directory.

The server is default running at localhost:8000.

docker-compose up -d --build

For local running using uvicorn run:

uvicorn src.main:create_app --reload --port 8000