← Winnitude! Search  ·  Reader Mode (841 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 64 LINKS

GitHub - binaryYuki/animeAPI: This project is a online video cms backend with a mature scrapy framework and async user-side push notification cron workers. Python-based web application with a framework of FastAPI for the backend. It includes health checks for Redis and MySQL, middleware for processing time, and session management. The application is containerized using Docker.

This repository was archived by the owner on Oct 4, 2026. It is now read-only.

Repository navigation

animeAPI
Public archive

About

This project is a online video cms backend with a mature scrapy framework and async user-side push notification cron workers. Python-based web application with a framework of FastAPI for the backend. It includes health checks for Redis and MySQL, middleware for processing time, and session management. The application is containerized using Docker.

animeapi.rymax.me

Topics

fastapi web-crawler-python

Resources

Readme Activity

Stars

84 stars

Watchers

3 watching

Forks

3 forks Report repository
Branches

Tags
Go to Branches page Go to Tags page

Latest commit

 

History


213 Commits
View commit history for this file.

Folders and files

Name Name Last commit message Last commit date
.github/ workflows .github/ workflows    
.dockerignore .dockerignore    
.env.example .env.example    
.gitignore .gitignore    
.python-version .python-version    
Dockerfile Dockerfile    
README.md README.md    
_auth.py _auth.py    
_cronjobs.py _cronjobs.py    
_crypto.py _crypto.py    
_memory_kv.py _memory_kv.py    
_redis.py _redis.py    
_search.py _search.py    
_trend.py _trend.py    
_utils.py _utils.py    
app.py app.py    
pyproject.toml pyproject.toml    
requirements.txt requirements.txt    
test_upstream_relay.py test_upstream_relay.py    
uv.lock uv.lock    

Repository files navigation

Anime API Project

THIS PROJECT IS ONLY FOR EDUCATIONAL PURPOSES. DO NOT USE IT FOR COMMERCIAL PURPOSES.

Overview

This project is a Python-based web application with a framework of video player's backend that uses FastAPI for the backend. It includes health checks for Redis and MySQL, middleware for processing time, and session management. The application is containerized using Docker.

Features

  • FastAPI backend
  • Health checks for Redis and MySQL
  • Middleware for processing time
  • Session management
  • CORS support
  • GZip compression

Requirements

  • Python 3.12.4
  • Docker
  • Redis
  • MySQL

Installation

Prerequisites

  1. Install Python 3.12.4:

    sudo apt update
    sudo apt install python3.12
  2. Install Docker:

    curl -fsSL https://get.docker.com -o get-docker.sh
    sudo sh get-docker.sh

Using Docker

  1. Clone the repository:

    git clone https://github.com/binaryYuki/oleapi.git
    cd oleapi.git
  2. Build the Docker image:

    docker build --build-arg COMMIT_ID=$(git rev-parse HEAD) --build-arg BUILD_AT=$(date -u +"%Y-%m-%dT%H:%M:%SZ") -t oleapi:latest .
  3. Run the Docker container:

    docker run -p 8000:8000 -e SESSION_SECRET=$(python -c 'import binascii, os; print(binascii.hexlify(os.urandom(16)).decode()') oleapi:latest

Without Docker

  1. Clone the repository:

    git clone https://github.com/binaryYuki/oleapi.git
    cd oleapi
  2. Create a virtual environment and activate it:

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install the dependencies:

    pip install -r requirements.txt
  4. Set environment variables:

    export COMMIT_ID=$(git rev-parse HEAD)
    export BUILD_AT=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
    export SESSION_SECRET=$(python -c 'import binascii, os; print(binascii.hexlify(os.urandom(16)).decode())')
  5. Run the application:

    uvicorn app:app --host 0.0.0.0 --port 8000

Endpoints

Health Check

  • GET /healthz
    • Checks the status of Redis and MySQL connections.
    • Response:
      {
          "status": "ok",
          "redis": true,
          "mysql": true,
          "live_servers": []
      }

Middleware

  • Process Time Header : Adds the processing time to the response headers.
  • Session Middleware : Manages user sessions.
  • Trusted Host Middleware : Allows requests from all hosts.
  • GZip Middleware : Compresses responses larger than 1000 bytes.
  • CORS Middleware : Configures CORS settings based on the environment.

Environment Variables

  • COMMIT_ID: The current commit ID.
  • BUILD_AT: The build timestamp.
  • SESSION_SECRET: The secret key for session management.
  • DEBUG: Set to true or false to enable or disable debug mode.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

This project is a online video cms backend with a mature scrapy framework and async user-side push notification cron workers. Python-based web application with a framework of FastAPI for the backend. It includes health checks for Redis and MySQL, middleware for processing time, and session management. The application is containerized using Docker.

animeapi.rymax.me

Topics

fastapi web-crawler-python

Resources

Readme Activity

Stars

84 stars

Watchers

3 watching

Forks

3 forks Report repository

Packages

Used by

Contributors

Languages