This module provides a Python interface for making API calls to the Wiz.
Project description
WIZAPI
This module provides a Python interface for making API calls to the Wiz.
Installation
pip install wizapi
Usage
Class: WIZ The Wiz class is designed to interact with the Wiz API. It manages authentication via OAuth2 and supports making requests to the API.
from wizapi import Wiz
# Initialize the API client
w = Wiz(
client_id="your_client_id",
client_secret="your_client_secret",
api_url="https://api.myapp.com",
auth_url="https://auth.myapp.com/token",
timeout=60
)
GRAPH_QUERY ="""..."""
GRAPH_VARIABLE={...}
# Make an authenticated API call
result = w.query(query= GRAPH_QUERY, variables=GRAPH_VARIABLE)
print(result)
It supports retrieving configuration from an INI file, JSON file, or environment variables. The module requires a wiz directory in the home directory (~/.api) with the following structure:
~/.wiz/
├── config # ini config
├── config.json # json config
└── credentials/
└── credentials_....json # stored access key
The module allows reusing the access token until it expires by setting stored=True when initializing the Wiz class.
w=Wiz(stored=True)
Methods
query(): non-paginated query result (Dict)query_all(): paginated query result (Generator)
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wizapi-0.1.1.tar.gz.
File metadata
- Download URL: wizapi-0.1.1.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea7dc14b5efb459699c4f80ef42c1d3896b72a635648f0ddc35f41ee446da50f
|
|
| MD5 |
ac24246addceb357732eb2d5fda187a6
|
|
| BLAKE2b-256 |
ec70a990e390ed3253aea6c0533ac7c36cdb448c3555b5732ff28bd8579075e7
|
File details
Details for the file wizapi-0.1.1-py3-none-any.whl.
File metadata
- Download URL: wizapi-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08f160181ce114e351113900a3c04a15ef00b96ab599dfc6bf420c58d1bfd851
|
|
| MD5 |
87e6add3e8b26cd215bb782c8e38bded
|
|
| BLAKE2b-256 |
b8d80618a75a24591bf0e75da1c7efb8ba686b62b8147769e80df8f746d6fd4a
|