Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.
/ responses Public archive

A basic tool for creating and serving canned JSON responses. Useful for testing services that don't exist yet.

License

Notifications You must be signed in to change notification settings

epochblue/responses

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

responses

responses is a simple tool for creating and serving canned JSON responses. This can be useful for testing services whose interface is defined, but whose implementation is not yet complete.

Requirements

  1. Python 2.7+
  2. pip

Installation

To install responses, start by cloning the repository onto your local machine:

git clone https://github.com/epochblue/responses

cd into the directory that git creates and install the necessary requirements (I recommending doing this inside of a virtualenv, but that is optional):

pip install -r requirements.txt

And that's it, responses is installed and ready to be configured and run.

Running responses

To run the application, run the following command from the project root:

python responses.py

This should parse your configuration file and start a local server. You can make sure everything is working by pointing your browser to the URL printed out when starting the server.

Configuring responses

Configuration for responses is done in a YAML file. An example file can be seen in the example/ directory that came with the project when it was downloaded. It may be easiest to copy this file from the example directory to the project root directory, which is where responses will look for its configuration:

cp example/responses.yaml responses.yaml

Open that file in you favorite editor, create your canned responses and restart responses. Happy testing!

Author

Bill Israel - @epochblue - http://billisrael.info/

LICENSE

CC0

To the extent possible under law, Bill Israel, has waived all copyright and related or neighboring rights to responses. This work is published from: United States.

About

A basic tool for creating and serving canned JSON responses. Useful for testing services that don't exist yet.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages