Skip to main content

Mockend is a simple tool for mocking endpoints

Project description

GitHub Licence downloadrate downloads PyPI PyPI - Format PyPI - Wheel GitHub last commit GitHub Release Date

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


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)

Uploaded Source

Built Distribution

mockend-0.1.1-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

Supported by

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