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.2.tar.gz
(19.8 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.2-py3-none-any.whl
(21.3 kB
view details)
File details
Details for the file keev-0.1.2.tar.gz.
File metadata
- Download URL: keev-0.1.2.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78c590fdfbb88ab94c4992f59d3907004127a462733d8841ddeb4221a45f84a0
|
|
| MD5 |
9796a26bb247c96fd9fcae220fb28c1d
|
|
| BLAKE2b-256 |
884548efe6d3359fbda013184b45c9e49cc2b4de9481f4a28ccc30f3767c0edc
|
File details
Details for the file keev-0.1.2-py3-none-any.whl.
File metadata
- Download URL: keev-0.1.2-py3-none-any.whl
- Upload date:
- Size: 21.3 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 |
da70faa2f082adb58b8f25593a40b83b17a79d78edce960170ad5e22f894f379
|
|
| MD5 |
b0d802cfa5412b9582e0f7d55b3a77a8
|
|
| BLAKE2b-256 |
89bc81eeaa82941f842ec6f1a72a45e858fc1302ab6fa7df0eb8cc12b4a5c687
|