Serve HTTP Status by URL
Quickstart
pip install status_server
status_server
curl -i http://localhost:8888/200
What is status_server?
I was playing around with a load testing tool, and I wanted to generate more than one HTTP response type, so I hacked this together.
status_server returns the status code in the request URI. Want a 200? curl http://localhost:8888/200
Want a 404? curl http://localhost:8888/404
What if you want a randomly chosen value from a list of possible return types? curl http://localhost:8888/200/404/503
The above has an equal chance of returning either of the three HTTP status codes. (1/3: 200, 1/3: 404, 1/3: 503)
status_server supports all standard methods for requests:
curl -iX POST http://localhost:8888/200
curl -iX DELETE http://localhost:8888/200
Known Issue
304 (Not Modified) does not work. curl http://localhost:8888/304 will throw an exception and return a 500, not a 304.
Metadata
Release files for status_server 0.0.1
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 | |
|---|---|---|---|---|
| status_server-0.0.1.tar.gz | 3.1 kB | Without provenance | Details |
Release files / status_server-0.0.1.tar.gz
| Download URL | status_server-0.0.1.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
277fe685a6fe3f8db8fbb3aa90ffc34221f9591bc5135594d84c279b4a879761
|
|
BLAKE2b-256 checksum How to use checksums |
ede878d19b9b9629f87fa9efe12971c7497a0bbaa9c3665004c06c74422c65d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for status_server 0.0.1
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.