A minimal yet ultrafast ASGI framework
Project description
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
pip install keev
Quick Start
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
- Clone the repository:
git clone https://github.com/yourusername/keev.git
cd keev
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Run the example app:
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
pytest tests/
Running Benchmarks
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
keev-0.1.0.tar.gz
(19.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
keev-0.1.0-py3-none-any.whl
(20.4 kB
view details)
File details
Details for the file keev-0.1.0.tar.gz.
File metadata
- Download URL: keev-0.1.0.tar.gz
- Upload date:
- Size: 19.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2cfae6f8ad99648b8f9e7d8a8156c16e91db98f0d7bcb9ecd38407436d0f477
|
|
| MD5 |
bd682ae71b05c069a37f618f18a4ec3b
|
|
| BLAKE2b-256 |
520e826e3320d36f27ca66afe6db40703483f0bf9c4e98373f1182b6baf2e555
|
File details
Details for the file keev-0.1.0-py3-none-any.whl.
File metadata
- Download URL: keev-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a06a46cb2dd11b1aa3ed77f8a3669ee092c1ab64d99e083bd31bf24bda446eed
|
|
| MD5 |
03db8ffc0b4b46f4c42ec4b8a893f62c
|
|
| BLAKE2b-256 |
ee408446528b0813e95dd6b7de9a5ed321e927b86f946b942a536751347186e9
|