WsgiGo
What is it?
WSGI go is a very simple WSGI router with no requirements. It is written for Python 3, though it could be easily backported.
Installation
pip install wsgigo
Usage
You can use it to route WSGI requests to specific apps based on hostname, URL fragment, or (through extending the Route class) other criteria. For example, suppose you have three wsgi apps which you want to serve as one::
from wsgigo import AppRouter
app = AppRouter(default_app=main_website)
app.add_startswith(docs_app, '/docs/')
app.add_hostname(api_app, 'api.local')
app.add_regexp(animal_app, '/(?:monkey|ape)/')
You can also make your own router class, to route apps how you need them to be routed::
class InternetExplorerRouter(Route):
def claim(self, environ):
user_agent = environ['HTTP_USER_AGENT']
if 'Trident/7.0' in user_agent or 'MSIE' in user_agent:
return True
internet_explorer_app = TestWsgiApp("<b>really simple webpage</b>")
real_app = TestWsgiApp("<b>really ADVANCED webpage</b>")
router = AppRouter(default_app=real_app)
router.add_route(InternetExplorerRouter(internet_explorer_app))
Metadata
Release files for wsgigo 1.3.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 |
|---|---|---|---|---|
| wsgigo-1.3.0.tar.gz | 2.9 kB | Without provenance | Details for wsgigo-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wsgigo-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for wsgigo-1.3.0-py3-none-any.whl |
Total release size: 6.2 kB
Release files / wsgigo-1.3.0.tar.gz
| Download URL | wsgigo-1.3.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fa468a0683f6492289908da4ae3f0236041d08618cfc3b70d8a001945422ee9b
|
|
BLAKE2b-256 checksum How to use checksums |
090ce85b78d88d9c6e70005c2792d3bf43aebd8613851da85aedb37092a2c808
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / wsgigo-1.3.0-py3-none-any.whl
| Download URL | wsgigo-1.3.0-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
679404b946a03116222afd2085b9b9fdfe5eddf6f2278cc64938da7dbe91e4be
|
|
BLAKE2b-256 checksum How to use checksums |
ef038c38301d4b4603a85d9ac42bdcf6f56a919e4f48854633c47819ea53831a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Security for wsgigo 1.3.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.