https://github.com/clumsybirder/cbird
基于Python3和FastAPI的RESTful API的项目
https://github.com/clumsybirder/cbird
fastapi mysql pydantic pydantic-v2 python restful-api sqlalchemy
Last synced: about 2 months ago
JSON representation
基于Python3和FastAPI的RESTful API的项目
- Host: GitHub
- URL: https://github.com/clumsybirder/cbird
- Owner: ClumsyBirder
- License: mit
- Created: 2025-01-09T04:38:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-17T09:05:41.000Z (over 1 year ago)
- Last Synced: 2025-01-17T10:19:31.016Z (over 1 year ago)
- Topics: fastapi, mysql, pydantic, pydantic-v2, python, restful-api, sqlalchemy
- Language: Python
- Homepage:
- Size: 43.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CBird
## Features
- Asynchronous API with FastAPI
- Asynchronous database operations with SQLAlchemy
- User creation and retrieval endpoints
- Environment variable configuration
- Logging setup
## Requirements
- Python 3.7+
- pip
- virtualenv (recommended)
## Project Structure
```
CBird
├── main.py # Main application file
├── models.py # Database models
├── schemas.py # Pydantic schemas
└── ...
```
## Setup and Installation
1. Clone the repository: `git clone `
2. Create a virtual environment: `python3 -m venv .venv`
3. Activate the virtual environment: `. .venv/bin/activate` (Linux/macOS) or `.venv\Scripts\activate` (Windows)
4. Install dependencies: `pip install -r requirements.txt`
## Running the Application
To run the application:
```bash
uvicorn main:app
```
## Development
To run the application in development mode with auto-reload:
```bash
uvicorn main:app --reload
```
This will start the server and automatically restart it when you make changes to the code.