Skip to content

ti-oluwa/petriz

Repository files navigation

Petriz API Backend

FastAPI backend for the Petriz project.

Visit the API documentation on Postman

Quick Setup using uv

This project requires Python 3.10 or higher. To set up the project, follow these steps:

To install uv, follow the instructions on the uv documentation

  • Clone the repository

  • Change into the project directory

      cd petriz
  • Synchronize the project dependencies

      uv sync
  • Setup the environment variables

      cp .env.example .env // Update the values in the .env file
  • Run database migrations

      alembic upgrade head
  • Load seed terms in /slb_terms/ directory into the database

     chmod +x ./scripts/load_terms.sh && ./scripts/load_terms.sh ./slb_terms

This step requires the load_terms.sh script to be executable. Also it might take a while to load all the terms into the database.

  • Run the project

      uv run uvicorn main:app --reload
  • The project should now be running on http://localhost:8000

  • Visit core/settings.py to update the project settings. You can learn more about the available settings and configurations by visiting the helpers submodule @ helpers/fastapi/default_settings.py and helpers/fastapi/config.py

  • Check available commands with

      uv run main.py --help
  • To access all API endpoints, you need internal API client credentials. You can run the following command to create one

      uv run main.py create_client --client_type internal

About

API backend for Petriz built with FastAPI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages