https://github.com/ngschmidt/python-restify
Abstractions should save typing, not thinking! `python-restify` will provide a quick and simple CLI for REST API consumption.
https://github.com/ngschmidt/python-restify
nsx-t python python3 rest-api
Last synced: about 1 year ago
JSON representation
Abstractions should save typing, not thinking! `python-restify` will provide a quick and simple CLI for REST API consumption.
- Host: GitHub
- URL: https://github.com/ngschmidt/python-restify
- Owner: ngschmidt
- License: gpl-3.0
- Created: 2021-02-14T00:34:18.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-01-06T02:12:53.000Z (over 3 years ago)
- Last Synced: 2025-06-25T19:52:40.616Z (about 1 year ago)
- Topics: nsx-t, python, python3, rest-api
- Language: Python
- Homepage: https://ngschmidt.github.io/python-restify/
- Size: 441 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Python REST Tool
## Synopsis
Provide a python tool to quickly invoke REST calls with a pre-defined list of settings, plays.
[](https://github.com/psf/black)
## How to use this tool
Download the package:
```bash
python3 -m pip install restify-ENGYAK
```
Set Environment Variables. `APIUSER` and `APIPASS` are mandatory.
```bash
export APIUSER=username
export APIPASS=password
export APIENDPOINT={{ API Full URL }}
```
Invoke via the CLI:
```bash
python3 -m restify -f settings.json list_plays
```
To build a new settings file:
```bash
python3 -m restify create_settings > settings.json
```
To list plays provided by a settings file:
```bash
python3 -m restify -f settings.json list_plays
```
## API Invocation
Once the package is installed, the `namshub()` API can be used by:
```python
# 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*