Abstractions should save typing, not thinking! This project will provide a quick and simple CLI for REST API consumption. Build your own library of known API endpoints/modifiers, and consume directly via the CLI.
Project description
Python REST Tool
Synopsis
Provide a python tool to quickly invoke REST calls with a pre-defined list of settings, plays.
How to use this tool
Download the package:
python3 -m pip install restify-ENGYAK
Set Environment Variables. APIUSER
and APIPASS
are mandatory.
export APIUSER=username
export APIPASS=password
export APIENDPOINT={{ API Full URL }}
Invoke via the CLI:
python3 -m restify -f settings.json list_plays
To build a new settings file:
python3 -m restify create_settings > settings.json
To list plays provided by a settings file:
python3 -m restify -f settings.json list_plays
API Invocation
Once the package is installed, the namshub()
API can be used by:
# Import Restify Library
from restify.RuminatingCogitation import Settings
from restify.RuminatingCogitation import Reliquary
# Set the interface - apply from variables no matter what
cogitation_interface = Reliquary(args.f, input_user=api_user, input_pass=api_pass)
# Exposed variables: def namshub(self, namshub_string, namshub_variables=False, namshub_dryrun=False):
cogitation_interface.namshub({{ }}, namshub_variables={{ }})
And then process data from there.
namshub
currently exports text from the API, and may support a dict
in the future.
Notes
Authors
- Nick Schmidt
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file restify-ENGYAK-0.2.11.tar.gz
.
File metadata
- Download URL: restify-ENGYAK-0.2.11.tar.gz
- Upload date:
- Size: 21.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d692a865f12ce765d00af600cedfbe26136e186ab6f0735bc6be89ff8ac00438 |
|
MD5 | 1ac8f7dbd96218627e83d6426e351282 |
|
BLAKE2b-256 | 2d5c127d36f9881126ae6507e39755e0e3a89d9eff0d097db3df2d1194958acb |
File details
Details for the file restify_ENGYAK-0.2.11-py3-none-any.whl
.
File metadata
- Download URL: restify_ENGYAK-0.2.11-py3-none-any.whl
- Upload date:
- Size: 22.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99e777a8915e9bbe694703a5c801bd91801ca622086aab73866bff1dd520cc3a |
|
MD5 | 917e71c5a064c207776c52284206b582 |
|
BLAKE2b-256 | 4a7f050b622584ca9f4ea93fd2cdfe120674d8254b50fa5dc15db8375fa9b7fa |