-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from wgilder/main
Added read module for PyPi.
- Loading branch information
Showing
2 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
## API Python Module | ||
|
||
This module is designed to aid calling the IriusRisk v1 APIs. Use it to create | ||
scripts that create, call and process API calls. | ||
|
||
Besides the helper methods this module provides, it also parses the command | ||
line and searches for configuration file entries useful for making IriusRisk | ||
API calls. Most of the command line arguments are also configuration file | ||
entries, thereby allowing default entries that are valid for multiple script | ||
calls. | ||
|
||
For further information, install this module locally and run the following: | ||
|
||
python3 -c 'from iriusrisk.v1 import *' | ||
|
||
This describes in greater detail how to call the program shell. | ||
|
||
## Usage example | ||
* Create the file main.py file, consisting of the following: | ||
|
||
from iriusrisk.v1 import * | ||
from iriusrisk.v1.facade import do_get | ||
|
||
(resp, json) = do_get("products") | ||
for i in json: | ||
print(i["name"]) | ||
|
||
* Call the program from the command line: | ||
|
||
cd ./IriusRisk-Central/Integrations/ApiShell/ | ||
python3 main.py --key {valid API key} --subdomain {SaaS sub-domain} | ||
|
||
This will list out the names of all the projects in the specified IriusRisk | ||
instance, available to the user of the API key. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,12 +7,12 @@ includes=["iriusrisk/"] | |
|
||
[project] | ||
name = "iriusrisk_apishell_v1" | ||
version = "0.2.0" | ||
version = "0.2.1" | ||
authors = [ | ||
{ name="Walter Gildersleeve", email="[email protected]"}, | ||
] | ||
description = "Aids calling IriusRisk v1 APIs. Starting point when creating more complex scripts that create, call and process API calls." | ||
readme = "README.md" | ||
readme = "MODULE-README.md" | ||
requires-python = ">=3.7" | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
|