pyhiapi
The API that just says hi!
A very simple API endpoint, easily deployable for testing purposes.
Installation
sudo pip install pyhiapi
Usage
usage: hi.py [-h] [-b BIND] [-f RESPONSE_FILE] [-p PORT] [-r CODE]
optional arguments:
-h, --help show this help message and exit
-b BIND, --bind-address BIND
Address to bind the server to
-f RESPONSE_FILE, --response-file RESPONSE_FILE
A file containing a custom response message
-p PORT, --port PORT The port to listen on
-r CODE, --response_code CODE
The response code to send back to requests
hiapi defaults to localhost:4000 and a 200 OK response.
You can override all command line arguments using the following environment variables:
HIAPI_BIND_ADDRHIAPI_RESPONSE_FILEHIAPI_PORTHIAPI_RESPONSE_CODE
When these variables are present, the corresponding command line arguments will be *completely ignored.
Testing
You can just curl the service, perhaps like this:
$ curl -i http://localhost:4000/
HTTP/1.0 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 4
Server: Werkzeug/0.9.6 Python/2.7.8
Date: Fri, 23 Jan 2015 03:38:14 GMT
Hi!
Metadata
Release files for pyhiapi 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyhiapi-0.2.0.tar.gz | 2.8 kB | Without provenance | Details for pyhiapi-0.2.0.tar.gz |
Release files / pyhiapi-0.2.0.tar.gz
| Download URL | pyhiapi-0.2.0.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
10da238f6364f3244cc29de5c603089b09beb0f1001c2000c4d084cd2ff98194
|
|
BLAKE2b-256 checksum How to use checksums |
e8770b2626034d1404f7f03f21d73b379410d1c6c54934723135430d9a4f9e1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
|
Security for pyhiapi 0.2.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.