FastAPI Backend for 活牛采购智能数字化系统
This is a FastAPI implementation of the backend for the 活牛采购智能数字化系统.
Features
- User authentication with JWT
- Order management
- Payment processing
- Role-based access control
- Database integration with SQLAlchemy
- API documentation with Swagger UI and ReDoc
Requirements
- Python 3.8+
- FastAPI
- SQLAlchemy
- PyJWT
- Uvicorn
Installation
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install dependencies:
pip install -r requirements.txt -
Configure environment variables (see .env.example)
-
Run the application:
uvicorn app.main:app --reload
API Documentation
Once the server is running, you can access:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc