Skip to main content

Command line interface for HTTP requests defined in yaml configuration file

Project description

ADZ

Command line interface for HTTP requests defined in yaml configuration file.

Quick start

Having a yaml configuration file

endpoints:
  endpoint:
    request: GET http://localhost:8000/
    headers:
      Content-Type: application/json

and running on command line

adz endpoint

will print

HTTP/1.0 200 OK
GET http://localhost:8000/endpoint/
Content-Type: application/json
Content-Length: 123
Server: Server/0.1.2
Date: Thu, 06 Jun 2019 06:06:06 GMT

{
  ...
}

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, default native
    • any theme name from here should work

variables

  • used to interpolate values in headers and url
    • variable: abc applied on url: http://example.org/$variable results in http://example.org/abc

endpoints

  • description
  • method
    • http methods
  • url
  • request
    • method url e.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

Configuration file

Expected configuration file names
  • adz.yaml or adz.yml
  • api.yaml or api.yml
  • rest.yaml or rest.yml
Expected locations
  • current location: .
  • user's home: ~/
  • .adz directory in user's home e.g. ~/.adz/

Configuration file path can also be set using environmental variable ADZ.

CLI

Run adz -h

License

ADZ is licensed under a three clause BSD License. Full license text can be found here.

Project details


Download files

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

Source Distribution

adz-0.1.0.tar.gz (8.8 kB view hashes)

Uploaded Source

Built Distribution

adz-0.1.0-py2.py3-none-any.whl (9.8 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page