https://github.com/wtsi-hgi/http-status-puppet
A HTTP server that will return a status code of your choice
https://github.com/wtsi-hgi/http-status-puppet
http python status testing tool
Last synced: about 1 month ago
JSON representation
A HTTP server that will return a status code of your choice
- Host: GitHub
- URL: https://github.com/wtsi-hgi/http-status-puppet
- Owner: wtsi-hgi
- License: mit
- Created: 2018-02-20T14:29:13.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-26T11:08:52.000Z (over 8 years ago)
- Last Synced: 2025-11-01T17:17:46.515Z (8 months ago)
- Topics: http, python, status, testing, tool
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://travis-ci.org/wtsi-hgi/http-status-puppet)
[](https://codecov.io/gh/wtsi-hgi/http-status-puppet)
[](https://badge.fury.io/py/httpstatuspuppet)
# HTTP Status Puppet
_A HTTP server that will return a status code of your choice_
## Introduction
This server simply returns back a status code depending on what endpoint is contacted, e.g.
```
$ curl -s -o /dev/null -w "%{http_code}" http://0.0.0.0:8000/403
403
$ curl -s -o /dev/null -w "%{http_code}" http://0.0.0.0:8000/200
200
```
## Installation
Prerequisites
- Python 3.6+
The tool can be installed from PyPi:
```bash
pip install httpstatuspuppet
```
Bleeding edge versions can be installed directly from GitHub:
```bash
pip install git+https://github.com/wtsi-hgi/http-status-puppet/.git@master#egg=httpstatuspuppet
```
## Usage
_Warning: this server was only designed for use in testing!_
### Local
After installing dependencies, in the project directory:
```bash
PYTHONPATH=. python httpstatuspuppet/entrypoint.py
```
### Docker
```bash
docker run -d -p ${HOST_PORT}:8000 mercury/http-status-puppet
```
## Alternatives
- C# server: https://github.com/Readify/httpstatus.