Yet another WSGI Web Framework, the simplest and fastest ever written.
Has no dependencies. Works both with Python 2 and Python 3.
Features
Support both of functional and object-oriented programming styles
Dynamic routes, e.g. “/path/{param}/”
Headers, query, data, cookies descriptors
Rich extending abilities
Installation
Simply execute following line:
pip install marnadi
“Hello World”
Run this script and open http://localhost:8000/ on your browser:
from marnadi import Response
from marnadi.wsgi import App
application = App()
@application.route('/')
@Response.get
def main_page():
return 'This is main page'
if __name__ == '__main__':
from wsgiref.simple_server import make_server
make_server('', 8000, application).serve_forever()
More complex example
Script below additionally will respond to http://localhost:8000/foo/bar/ and http://localhost:8000/foo/ requests:
from marnadi import Response, Route
from marnadi.wsgi import App
class MainPageResponse(Response):
def get(self):
return 'This is main page'
class FooBarResponse(Response):
def get(self, foo, bar=None):
return 'foo is {foo}, bar is {bar}'.format(foo=foo, bar=bar)
routes=(
Route('/', MainPageResponse),
Route('/{foo}/', FooBarResponse, routes=(
Route('{bar}/', FooBarResponse),
)),
)
application = App(routes=routes)
if __name__ == '__main__':
from wsgiref.simple_server import make_server
make_server('', 8000, application).serve_forever()
Metadata
Release files for Marnadi 0.5.3
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 | |
|---|---|---|---|---|
| Marnadi-0.5.3.tar.gz | 11.1 kB | Without provenance | Details |
Release files / Marnadi-0.5.3.tar.gz
| Download URL | Marnadi-0.5.3.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bbe7bebbcf77adab0b4cd32253dca10233811dbb8e37fdcc89b54f87f942e0bd
|
|
BLAKE2b-256 checksum How to use checksums |
0a1777da59846e875b661424a9634010623653f67e690c196429cbb30cdd3d90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for Marnadi 0.5.3
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.