Skip to main content

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

  1. Clone the repository:
git clone https://github.com/yourusername/keev.git
cd keev
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the example app:
python example.py

The server will start at http://localhost:8000. Visit:

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

keev-0.1.0-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

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

Hashes for keev-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b2cfae6f8ad99648b8f9e7d8a8156c16e91db98f0d7bcb9ecd38407436d0f477
MD5 bd682ae71b05c069a37f618f18a4ec3b
BLAKE2b-256 520e826e3320d36f27ca66afe6db40703483f0bf9c4e98373f1182b6baf2e555

See more details on using hashes here.

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

Hashes for keev-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a06a46cb2dd11b1aa3ed77f8a3669ee092c1ab64d99e083bd31bf24bda446eed
MD5 03db8ffc0b4b46f4c42ec4b8a893f62c
BLAKE2b-256 ee408446528b0813e95dd6b7de9a5ed321e927b86f946b942a536751347186e9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page