Skip to main content

Simple http server for API mocking during automated testing

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

httpsrv-0.1.6-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file httpsrv-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for httpsrv-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 45a75b1f059e6e5edd1db6306c493d3324b77f7d6cde9f1e9d49e91964239301
MD5 6f17e631b98b832730ff4596b89a2811
BLAKE2b-256 516d12e546b23011467f5eb7adc965888857af2f55cf83cb9c4eeb319c3b9b09

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page