Skip to main content


Project description

Jason Server

PyPI PyPI - Python Version PyPI - Status PyPI - License

Get a full fake REST API

Table of contents

Getting started

Install Jason Server

pip3 install jason-server

Create a db.json file with some data

  "articles": [
    { "id": 1, "title": "jason-server", "author": "1" },
    { "id": 2, "title": "jason-routes", "author": "1" }
  "authors": [
    { "id": 1, "name": "bob"}

Start JSON Server

jason-server watch db.json

Now if you go to http://localhost:8080/articles, you'll get

{ "id": 1, "title": "jason-server", "author": "1" },
{ "id": 2, "title": "jason-routes", "author": "1" }


Singular Routes

GET /authors

Plural Routes

GET /authors
GET /authors/1


GET /articles?title=title&author=eminem


Use _page and _limit to paginate data.

In the Link header you'll get first, prev, next and last links.

GET /articles?_page=2
GET /articles?_page=3&_limit=15


Use _sort and _order (defaults order: asccendant)

GET /persons?_sort=age
GET /persons?_sort=name&_order=desc


GET /db


Alternative Host

You can start JSON Server on other host with the --host flag:

$ json-server --host "" watch db.json

Default: localhost

Alternative Port

You can start JSON Server on other ports with the --port flag:

$ json-server --port 8100 watch db.json

Default: 8080

CLI Usage

Usage: jason-server [OPTIONS] COMMAND [ARGS]...

  -h, --host TEXT     Host adress
  -p, --port INTEGER  Port
  -q, --quiet
  --version           Show the version and exit.
  --help              Show this message and exit.

  watch  Run your database as REST Api



The code is available under the MIT license.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for jason-server, version 0.8.1
Filename, size File type Python version Upload date Hashes
Filename, size jason_server-0.8.1-py2.py3-none-any.whl (7.8 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size jason-server-0.8.1.tar.gz (10.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page