Skip to main content

Simple http server for API mocking during automated testing

Example usage

Using requests library:

>>> import requests
>>> from httpsrv import Server
>>> server = Server(8080).start()
>>> server.on('GET', '/').text('hello')
>>> res = requests.get('http://localhost:8080')
>>> assert res.text == 'hello'

Installation

pip install httpsrv

Documentation

http://httpsrv.readthedocs.org

Metadata

Release files for httpsrv 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for httpsrv 0.1.6
File Interpreter ABI Platform
httpsrv-0.1.6-py3-none-any.whl Python 3 none any Details

Release files / httpsrv-0.1.6-py3-none-any.whl

Download URL httpsrv-0.1.6-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
45a75b1f059e6e5edd1db6306c493d3324b77f7d6cde9f1e9d49e91964239301
BLAKE2b-256 checksum
How to use checksums
516d12e546b23011467f5eb7adc965888857af2f55cf83cb9c4eeb319c3b9b09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.6 This release

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page