api / README.md
hanbinsite's picture
feat: add Dockerfile and HuggingFace Space config
94f2051
|
Raw History Blame Contribute Delete
757 Bytes
---
title: BinV API
emoji: 🎬
colorFrom: blue
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
---
# BinV API
影视资源聚合 API 服务
## 快速开始
```bash
# 创建虚拟环境
python -m venv .venv
# Windows
.venv\Scripts\activate
# Linux/Mac
source .venv/bin/activate
# 安装依赖
pip install -r requirements.txt
# 复制环境变量
cp .env.example .env
# 初始化数据库
alembic upgrade head
# 创建超级管理员
python scripts/create_superadmin.py
# 初始化权限和角色
python scripts/seed_permissions.py
python scripts/seed_roles.py
# 启动开发服务
uvicorn app.main:app --reload --port 9999
```
## API 文档
启动后访问:
- Swagger UI: http://localhost:9999/docs
- ReDoc: http://localhost:9999/redoc