ADZ
Command line interface for HTTP requests defined in yaml configuration file.
Install
pip install adz
Quick start
Having a yaml configuration file
endpoints:
endpoint:
request: GET https://httpbin.org/get
headers:
Content-Type: application/json
and running on command line
adz endpoint
will execute endpoint request defined in configuration file and print
GET https://httpbin.org/get
HTTP/1.1 200 OK
• access-control-allow-credentials: true
• access-control-allow-origin: *
• content-encoding: gzip
• content-type: application/json
• date: Thu, 06 Jun 2019 06:06:06 GMT
• referrer-policy: no-referrer-when-downgrade
• server: nginx
• x-content-type-options: nosniff
• x-frame-options: DENY
• x-xss-protection: 1; mode=block
• content-length: 204
• connection: keep-alive
{
"args": {},
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"Content-Type": "application/json",
"Host": "httpbin.org",
"User-Agent": "python-httpx/0.7.1"
},
"url": "https://httpbin.org/get"
}
Configuration
For an example configuration look at docs/example.yml.
settings
- colors:
bool, default:true- control output print in colors
- response:
bool, default:true- control response body output
- theme:
str, defaultnative- any theme name from here should work
variables
- used to interpolate values in headers and urls
variable: abcapplied onurl: http://example.org/$variableresults inhttp://example.org/abc
- variable value starting with
file://is opened as file and loaded as string into variable
endpoints
- description
- method
- http methods
- url
- request
method urle.g.get http://example.org
- params
- query string parameters
- headers
- json
- json string
- string starting with
file://is loaded as json file
- data
- json string
- string starting with
file://is loaded as json file
- cookies
- files
- path to a file:
path/to/file.txt - file name and path:
filename: path/to/file.txt
- path to a file:
Configuration file
Expected configuration file names
adz.yamloradz.ymlapi.yamlorapi.ymlrest.yamlorrest.yml
Expected locations
- current location:
. - user's home:
~/ .adzdirectory in user's home e.g.~/.adz/
Configuration file path can also be set using environmental variable ADZ.
CLI
Run adz -h
commands
-
adz --config,adz -c- path to yaml configuration file
-
adz --details <endpoint>,adz -d <endpoint>- output details about endpoint from configuration file
-
adz --list,adz -l- list available endpoints in configuration file
-
adz --output,adz -o- output processed configuration file as json
-
adz --settings,adz -s- output settings in configuration file
-
adz --var name=value,adz -v name=value- set or override variables in configuration
-
adz --colors,adz --no-colors- control output print in colors
-
adz --response,adz --no-response- control response body output
License
ADZ is licensed under a three clause BSD License. Full license text can be found here.
Metadata
Release files for adz 0.6.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 |
|---|---|---|---|---|
| adz-0.6.0.tar.gz | 8.4 kB | Without provenance | Details for adz-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| adz-0.6.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for adz-0.6.0-py2.py3-none-any.whl |
Total release size: 19.0 kB
Release files / adz-0.6.0.tar.gz
| Download URL | adz-0.6.0.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
593cdea451b28d897c1bfc7334b640c342366d567e3d16c180ec5e3d125d810a
|
|
BLAKE2b-256 checksum How to use checksums |
60341ecfe17bcef740d62d6e0de6b5a7a75ad1c8eebfd89880f0f0831a3f6ed2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
|
Release files / adz-0.6.0-py2.py3-none-any.whl
| Download URL | adz-0.6.0-py2.py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
dd4533866b5244c85c17bfd97d9d13483e7b513c1b279fe50e0b9d5377e8558f
|
|
BLAKE2b-256 checksum How to use checksums |
0a23c968d5133e5bcdb0642138b32a72ba2234284c30fb8daa2ad3e3b5937b02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
|
Security for adz 0.6.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.