Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rrajaravi/anyserv
Get a full fake REST API with zero coding
https://github.com/rrajaravi/anyserv
python web webserver webservice
Last synced: 13 days ago
JSON representation
Get a full fake REST API with zero coding
- Host: GitHub
- URL: https://github.com/rrajaravi/anyserv
- Owner: rrajaravi
- Created: 2017-06-06T17:05:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-03T03:45:22.000Z (about 5 years ago)
- Last Synced: 2024-08-01T22:55:50.564Z (3 months ago)
- Topics: python, web, webserver, webservice
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Anyserv
Get a full (GET request as of now) fake REST API with zero coding#### Installation
$ git clone https://github.com/rrajaravi/anyserv.git
$ cd anyserv
$ python setup.py install#### Command Line
$ anyserv -f example/config.json --host 127.0.0.1 -p 5001
* Running on http://127.0.0.1:5001/ (Press CTRL+C to quit)$ anyserv -f example/config.json
* Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)
$ anyserv --help
usage: anyserv [-h] -f FILE [--host HOST] [-p PORT]Serve any static data by providing json file as an input. Refer config.json
available in github repository example directory for the file formatoptional arguments:
-h, --help show this help message and exit
-f FILE, --file FILE
--host HOST
-p PORT, --port PORT
#### Sample Config File[
{
"name":"hello",
"path":"/",
"method": "GET",
"response":"hello world!"
},
{
"name":"myapi",
"path":"/api",
"method": "GET",
"response":{
"version":1,
"status":"api working"
}
},
{
"name":"myapiusers",
"path":"/api/users",
"method": "GET",
"response":[
"john",
"david",
"peter"
]
}
]
## License
MIT