A HTTP server that will return a status code of your choice
Project description
[](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.
[](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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file httpstatuspuppet-1.0.1.tar.gz.
File metadata
- Download URL: httpstatuspuppet-1.0.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4a91d2396e08348b698a9368395b1f1d6be2b32a6c0fffc1967a1606175eda1
|
|
| MD5 |
05e5abb8c9022e22863edd455a6cb8fa
|
|
| BLAKE2b-256 |
0b1992d58c0dc4a551655725b30897e6cd1191b5fe5aec599bdf52036157095a
|