Python Web framework built .
Project description
pydavronov
pydavronov is a minimalist Python framework designed for creating WSGI applications. It leverages:
- WebOb for convenient request and response objects,
- WhiteNoise for serving static files,
- Jinja2 for template rendering,
- parse for parsing route parameters,
- Middleware for extendable request/response processing.
Main Features
-
Routing
- Easily add routes using the
@app.route(...)decorator or by callingadd_route(...)directly. - Supports parameterized routes (e.g.,
@app.route("/user/{id}")).
- Easily add routes using the
-
Static Files
- Uses WhiteNoise to serve static files from the
static/folder by default. - Any request starting with
/staticwill be automatically handled by WhiteNoise.
- Uses WhiteNoise to serve static files from the
-
Templating
- Utilizes Jinja2 for rendering HTML templates from the
templates/directory. - The
app.template(template_name, context)method returns rendered HTML content.
- Utilizes Jinja2 for rendering HTML templates from the
-
Exception Handling
- You can assign a custom exception handler with
app.add_exception_handler(...). - If an exception occurs and the handler is set, the framework will invoke that handler.
- You can assign a custom exception handler with
-
Middleware
- Built-in support for middleware to perform custom logic before and after request handling.
app.add_middleware(...)allows you to attach any class derived fromMiddleware.
-
Testing
- A built-in
test_session()method integrates your app withrequests.Session()andwsgiadapter.WSGIAdapter. - This makes it easy to write tests that send real HTTP requests to your application in memory.
- A built-in
Installation
- Clone this repository or copy the source files into your project.
- Install the required dependencies (Python 3.7+ recommended):
pip install webob parse requests jinja2 whitenoise
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
pydavronov-0.1.1.tar.gz
(3.6 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
File details
Details for the file pydavronov-0.1.1.tar.gz.
File metadata
- Download URL: pydavronov-0.1.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
399b36ff6f363052b396d3a7d0f816c039565a7f183a2c37b74d3841d1e935c5
|
|
| MD5 |
e6617bb98a87224cc694001a68ae20ca
|
|
| BLAKE2b-256 |
ee0a38259e379224a69a9799def488a805cdae0d6d9781abad41434e4d3aedba
|
File details
Details for the file pydavronov-0.1.1-py2.py3-none-any.whl.
File metadata
- Download URL: pydavronov-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b980e8f03febb7caeb74a3b14ee80d9984449f8af3a8055de295d2653eeef3e4
|
|
| MD5 |
ff845c9fe4e471f0cf0b2cc6dc8d970f
|
|
| BLAKE2b-256 |
40f33c89af3af5c11ddc20c8b3ff738e566455f68a895a595a83d6483f07b813
|