hunk
Helps client-side Web development by mocking JSON API server.
Installation
hunk can be installed via pip or easy_install:
$ pip install hunk
Or:
$ easy_install hunk
Usage
Setup data directory and files.
Directories under the root have a HTTP method name
Directories and files have name to be resource path
Files have conent to be response JSON
For example:
$ tree demo/simple/
demo/simple/
|-- get
| |-- members
| | |-- 100.json
| | |-- 200.json
| | |-- 300.json
| | ...
| +-- sounds.json
|-- post
| +-- members.json
...
Move to the root directory and run hunk:
$ cd demo/simple/
$ hunk
* Running on http://localhost:8080/
Now, you can access Web API with HTTP:
$ curl http://localhost:8080/members/100
{"gender": "female", "kind": "human", "name": "Dorothy"}
$ curl http://localhost:8080/members
[{"kind": "scarecrow", "name": "Hunk"}, ...]
$ curl http://localhost:8080/sounds
[{"title": "Over The Rainbow"}, ... ]
$ curl http://localhost:8080/members -X POST
{"result": "success"}
Metadata
Release files for hunk 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distributions (sdists)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| hunk-0.1.0.zip | 18.3 kB | Without provenance | Details | |
| hunk-0.1.0.tar.gz | 8.6 kB | Without provenance | Details |
Release files / hunk-0.1.0.zip
| Download URL | hunk-0.1.0.zip |
|---|---|
| Size | 18.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
701f384da556502b213d808dae93fa5ab9eb8cfdb64335c29aa0d5f1a288053e
|
|
BLAKE2b-256 checksum How to use checksums |
f41777b48274c17ee0202cebd1dda4578dc11319e5ac8ad90c57be32f5bf0d36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / hunk-0.1.0.tar.gz
| Download URL | hunk-0.1.0.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d098e0a6ce2bad0bcb5c23bcc70bb5d8d10e8c401434dba3354be80dbfa7d5ab
|
|
BLAKE2b-256 checksum How to use checksums |
b103ae015d480d14e548231736151355d000640be18e5b05927eaa1daae13ae7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for hunk 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.