easyapix
Lightweight ASGI framework for building MVP backends quickly.
Status: alpha. The API may change before 1.0. Not to be confused with the unrelated easyapi package on PyPI, an old package created in 2014 that has not been updated since.
Install
pip install easyapix
Requires Python 3.10+.
Quick start
from pydantic import BaseModel
from easyapix import Depends, EasyAPIx, HTTPException
app = EasyAPIx()
class Item(BaseModel):
name: str
price: float
def get_db():
return {"connected": True}
@app.get("/")
async def index():
return {"message": "Hello, world"}
@app.get("/users/{id}")
async def get_user(id: int, verbose: bool = False):
if id > 100:
raise HTTPException(404, "User not found")
return {"id": id, "verbose": verbose}
@app.post("/items")
async def create_item(item: Item, db=Depends(get_db)):
return {"name": item.name, "price": item.price, "db": db}
Run it:
uvicorn main:app --reload
Features
- Routing:
get,post,put,patch,delete - Path and query parameters with type conversion
- Automatic JSON responses
- Pydantic request bodies with validation errors
- Dependency injection with
Depends HTTPExceptionand JSON error responses- Middleware
- Sync and async handlers
- Lifespan (startup/shutdown)
Documentation
License
MIT
Metadata
Release files for easyapix 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| easyapix-0.1.0.tar.gz | 12.7 kB | Without provenance | Details for easyapix-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| easyapix-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for easyapix-0.1.0-py3-none-any.whl |
Total release size: 22.5 kB
Release files / easyapix-0.1.0.tar.gz
| Download URL | easyapix-0.1.0.tar.gz |
|---|---|
| Size | 12.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6f22610ed99f8cdeceaccb6f1e542e5da9332333116f4a97de16628b9a5e00f
|
|
BLAKE2b-256 checksum How to use checksums |
6af474d2cae9669090ccdfcb8d452a4019064993524e55a5bf7e194da17e748b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / easyapix-0.1.0-py3-none-any.whl
| Download URL | easyapix-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
32a5da02d3209b0efa59b934a9db478858bb6f7cedda2f86b057276d836ca12d
|
|
BLAKE2b-256 checksum How to use checksums |
1c3f062ee62ae298761ef73bc3bad3646bdaf56f0319fa7f0da2c5a7e9c4f3b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for easyapix 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.