Mockend is a simple tool for mocking endpoints
Project description
Mockend is a Python library that can be used to mock any REST API endpoint.
Installation
pip install mockend
Quick Start
Mockend is a simple, lightweight, and extensible REST API mocking Python library. It can be used to mock any REST API endpoint, and can be used to mock any HTTP method. the library is very easy to use and easy to extend. It just need configuration file, then it will simulate the REST API response.
Configuration examples
{
"user": {
"id": {
"3": {
"post": {
"status": 403,
"response": "User not authorized!"
}
}
},
"get": {
"status": 200,
"response":{
"user-ids":[1,2,3],
}
}
}
}
How to use
mockend -c config.json
* Serving Flask app 'mockend.__main__' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://localhost:5555 (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 141-969-228
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
mockend-0.1.1.tar.gz
(20.8 kB
view hashes)