https://github.com/jolovicdev/keev
A lightweight ASGI web framework for Python that focuses on simplicity and performance.
https://github.com/jolovicdev/keev
api api-rest apiframework framework python
Last synced: 11 months ago
JSON representation
A lightweight ASGI web framework for Python that focuses on simplicity and performance.
- Host: GitHub
- URL: https://github.com/jolovicdev/keev
- Owner: jolovicdev
- License: mit
- Created: 2025-02-08T22:24:52.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-08T23:08:20.000Z (about 1 year ago)
- Last Synced: 2025-03-11T22:35:27.073Z (11 months ago)
- Topics: api, api-rest, apiframework, framework, python
- Language: Python
- Homepage: https://pypi.org/project/keev
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Keev
A lightweight ASGI web framework for Python that focuses on simplicity and performance.
## Features
- FastAPI-like route decorators
- Built-in request validation using Pydantic
- Automatic OpenAPI docs (Swagger UI & ReDoc)
- SQLAlchemy integration
- Static file serving
- Middleware support
- Plugin system
- Colored logging
## Installation
```bash
pip install keev
```
## Quick Start
```python
from keev import Application, Router, JSONResponse
from pydantic import BaseModel
app = Application()
router = Router()
class Item(BaseModel):
name: str
price: float
@router.get("/")
async def read_root():
return JSONResponse({"message": "Hello World"})
@router.post("/items")
async def create_item(item: Item):
return JSONResponse(item.model_dump(), status_code=201)
app.router = router
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=8000)
```
## Running the Example
1. Clone the repository:
```bash
git clone https://github.com/yourusername/keev.git
cd keev
```
2. Create and activate a virtual environment:
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
3. Install dependencies:
```bash
pip install -r requirements.txt
```
4. Run the example app:
```bash
python example.py
```
The server will start at http://localhost:8000. Visit:
- http://localhost:8000/ - API root
- http://localhost:8000/docs - Swagger UI documentation
- http://localhost:8000/redoc - ReDoc documentation
## Development
### Running Tests
```bash
pytest tests/
```
### Running Benchmarks
```bash
python benchmark.py
```
## Project Status
This is a hobby project created for learning purposes. While functional, it's not recommended for production use.
## License
MIT