VRChatAPI/app/main.py
Khrysse 4626fafef7 ?
2025-06-22 23:44:01 +02:00

34 lines
1.4 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from fastapi import FastAPI
from app.api.vrchat_users import router as users
from app.api.vrchat_groups import router as groups
from app.api.system import router as system
app = FastAPI(
title="K-API",
description="""
K-API is a fast, secure, and lightweight proxy API for VRChat.
It handles authentication via VRChats official API, including 2FA support,
and provides cached endpoints for user and group information retrieval.
This project is designed for developers who want a hassle-free way
to integrate VRChat data into their apps without managing sessions or tokens manually.
Features:
- Automatic token management with 2FA handling
- Public and private VRChat data endpoints
- Response caching for performance
- Easy deployment on self-hosted servers (YunoHost compatible)
Built with FastAPI and async HTTPX for high performance and reliability.
""",
swagger_ui_parameters={"defaultModelsExpandDepth": -1},
docs_url="/docs",
redoc_url=None,
openapi_url="/openapi.json",
contact={"name": "Kryscau", "url": "https://vrchat.com/home/user/usr_323befe7-edbc-46fe-af9d-560f7e6b290c", "email": "kryscau@kvs.fyi" }
)
prefix = "/api"
app.include_router(users, prefix=prefix, tags=["Users"])
app.include_router(groups, prefix=prefix, tags=["Groups"])
app.include_router(system, prefix=prefix, tags=["System"])