Skip to content

Commit

Permalink
Merge pull request #5 from wgilder/main
Browse files Browse the repository at this point in the history
Added read module for PyPi.
  • Loading branch information
walter-iriusrisk authored Oct 2, 2023
2 parents f632fc6 + 46dceff commit 31658fb
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
34 changes: 34 additions & 0 deletions Integrations/ApiShell/MODULE-README.md
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.
4 changes: 2 additions & 2 deletions Integrations/ApiShell/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 31658fb

Please sign in to comment.