Skip to content

Latest commit

 

History

History

ba-torment-api

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Logo

API service for BA Torment

Bug Report | Request

FastAPI Python Poetry Supabase


Overview

API service for BA Torment.
It is deployed on my Mac mini server.
Most of the data is stored in Oracle Object Storage because it is static data. This service is used to access a small dataset in the Supabase and to manage the user-uploaded YouTube links.


History

Please see the README of the ba-torment-batch folder.

Major data reference

For main data sources, please see the README of the ba-torment-batch folder.
In addition, the user-uploaded YouTube links are stored in the PostgreSQL database.


Prerequisites

  1. You need to install Python 3.12 and Poetry to manage the packages.

  2. You need to set environment variables to run the script.

    POSTGRES_HOST=
    POSTGRES_PORT=
    POSTGRES_USER=
    POSTGRES_PASSWORD=
    POSTGRES_DBNAME=
    BATORMENT_UPLOAD_URL="presigned-url-to-upload-images"

Run the script locally

Activate the virtual environment

poetry shell

Install packages
This will install the required packages in the whole repository.

poetry install

Run the script

  • You can run the FastAPI application with uvicorn api.main:app --reload.
  • Otherwise, you can run the API service with run.py in the root directory.

Contributing

See the CONTRIBUTING.md.