Naja Atra WSGI
This ia a WSGI proxy that proxies requests to Naja Atra.
Usage
from naja_atra import route
from naja_atra_wsgi import app
from wsgiref.simple_server import make_server
@route("/hello")
def hello(name: str):
return {"messag": f"Hello, {name}!"}
if __name__ == '__main__':
server = make_server('0.0.0.0', 8080, app)
server.serve_forever()
You can use server.scan() to import routes from other modules. And also you can use naja_atra_wsgi.config() to function to sepecify the static resources routes.
import os
import naja_atra.server as server
from wsgiref.simple_server import make_server
from naja_atra_wsgi import config, app
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
if __name__ == '__main__':
server.scan(base_dir="tests/ctrls", regx=r'.*controllers.*')
config(resources={"/public/*": f"{PROJECT_ROOT}/tests/static",
"/*": f"{PROJECT_ROOT}/tests/static"})
wsgi_server = make_server("", 9090, app)
wsgi_server.serve_forever()
Metadata
Release files for naja-atra-wsgi 1.0.2
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 |
|---|---|---|---|---|
| naja-atra-wsgi-1.0.2.tar.gz | 6.8 kB | Without provenance | Details for naja-atra-wsgi-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| naja_atra_wsgi-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for naja_atra_wsgi-1.0.2-py3-none-any.whl |
Total release size: 13.7 kB
Release files / naja-atra-wsgi-1.0.2.tar.gz
| Download URL | naja-atra-wsgi-1.0.2.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bfebbbf49846f28cd5d908c95f1cbafe78754d6d59753763efb4e990897996f5
|
|
BLAKE2b-256 checksum How to use checksums |
e33eb74a85cee000a4f765d8596e58993d9a4f3c9dd881d8e767c03119c8428e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / naja_atra_wsgi-1.0.2-py3-none-any.whl
| Download URL | naja_atra_wsgi-1.0.2-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9007497a8cb5979ddc9f3d0f60be628fc0c6b97e6d9debbe3859822cc5fa2758
|
|
BLAKE2b-256 checksum How to use checksums |
9b09ebaafa30c58de7dc28c291cdde19f6f4d079f85029abaa1ada8de0b33d38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for naja-atra-wsgi 1.0.2
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.