DefEssential
DefEssential is a synchronous Python web application framework for handling HTTP requests with ordinary Python methods. It provides route declarations, request validation, response helpers, streaming APIs, lifecycle hooks, and optional extensions without requiring async / await.
Requirements
- Python 3.9 or later
Installation
pip install DefEssential
The package includes a built-in Python HTTP server. Optional extras provide additional server adapters:
pip install "DefEssential[Gunicorn]"
pip install "DefEssential[Uvicorn]"
Quick start
from DefEssential import Application, Request, RequestRunner
from DefEssential.Adapter.Implements.Python import Server
from DefEssential.Responses import ResponseText
class Hello(RequestRunner, method='GET', url='/hello'):
def run(self, request: Request):
return ResponseText('Hello, world!')
application = Application()
application.add(Hello)
Server('127.0.0.1', 8000, application).run()
The handler declares an HTTP method and path on its RequestRunner class. The application registers the handler, and the server runs the application. A GET /hello request returns a plain-text response.
Request handling
Define handlers as RequestRunner subclasses and implement run() with synchronous Python code. Configure path, query, header, and body validation in the class declaration. The framework also provides JSON, text, and file responses, direct streaming, Server-Sent Events, WebSocket support, and extensions for status checks, metrics, OpenAPI specifications, Swagger UI, and file serving.
License
See the LICENSE file included with the source distribution for license terms.
Metadata
Release files for DefEssential 0.1.8
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 | |
|---|---|---|---|---|
| defessential-0.1.8.tar.gz | 1.1 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| defessential-0.1.8-23-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.2 MB
Release files / defessential-0.1.8.tar.gz
| Download URL | defessential-0.1.8.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d6a50dd61e614a25edc13379ad300d14b53e3588f23c466dd43e755055be10c
|
|
BLAKE2b-256 checksum How to use checksums |
7924e29e4f5ce3e14f0a609136abe9539a9d2bebc40e46b271b7e625f84954ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / defessential-0.1.8-23-py3-none-any.whl
| Download URL | defessential-0.1.8-23-py3-none-any.whl |
|---|---|
| Size | 115.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7efbfb5e66b57a2d66ac3b03b5d3c29d4c3a671dbba1f7a1272cf2573bf1e978
|
|
BLAKE2b-256 checksum How to use checksums |
f503fe361361a02e19fc9a254979decf3b32a051f678c16fb19e7ea14d3b1695
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for DefEssential 0.1.8
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.