dumdum
Create fake HTTP servers with simple stanzas.
This module allows you to easily create “dummy” servers from simple descriptive text. Need a dummy server for testing, or maybe the service you’re trying to test doesn’t have a “stage” environment? That’s what this is for.
Installation
You can install the extension with pip like
pip install dumdum
Usage
dumdum is both a command-line utility and a library. It takes a simple _stanza_ format and generates a web server with endpoints from that. E.g. to do “hello world” you could do
printf " > GET > /hello < body world . " | dumdum
Then you can test with
% curl http://localhost:8001/hello > GET /hello HTTP/1.1 > Host: localhost:8001 > User-Agent: curl/7.51.0 > Accept: */* > * HTTP 1.0, assume close after body < HTTP/1.0 200 OK < Date: Wed, 17 May 2017 18:43:39 GMT < Server: WSGIServer/0.1 Python/2.7.13 < Content-type: text/plain < Content-Length: 7 world
This will create a server listening on the default port (8001). Dumdum is a WSGI compliant library, so you can easily serve it from your own code like
from wsgiref.simple_server import make_server
from dumdum import Dumdum
dum = Dumdum("""
> GET
> /hello
< body world
.
""")
srv = make_server('', 5000, dum.server)
srv.serve_forever()
Source and further details can be found at https://github.com/jar-o/dumdum
Metadata
Release files for dumdum 0.1.9
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 |
|---|---|---|---|---|
| dumdum-0.1.9.tar.gz | 7.2 kB | Without provenance | Details for dumdum-0.1.9.tar.gz |
Release files / dumdum-0.1.9.tar.gz
| Download URL | dumdum-0.1.9.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f09d551cf3601f24758b9d942897cf11ae104d34c4359f56b2cc1c3ce1b8ac4
|
|
BLAKE2b-256 checksum How to use checksums |
e50a873ce3117b5cc2afb8ddc07ae8a5a4a66aa71e95056d3910c170cc600413
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for dumdum 0.1.9
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.