Wazuh API Kit
The Wazuh API kit Project equips you with the necessary tools for a flexible and reliable interaction with the Wazuh API.
The library’s core component, the WazuhApiConnection class, enables you to seamlessly file requests against the Wazuh API. Redundant tasks, such as authentication and refreshing authorization tokens, as well as common pitfalls, namely expired authorization tokens and rate limitations, are being taken care of.
Build on top of the WazuhApiConnection, the WazuhApiClient class provides methods, which abstracts API endpoints and translates their responses to well documented python objects.
Key Features
- Automated authentication and authorization token renewal
- Customizable rate limitation
- Translated responses that allow you to work on Python objects rather than plain JSON dictionaries
- Comprehensive error logging and deprecation warnings
Documentation
For more information and examples take a look at our Documentation.
Installation
pip install wazuh-api-kit
Usage Examples
Request the GET / endpoint (Get API Info) via the WazuhApiConnection class.
from http import HTTPMethod
from wazuh_api_kit import WazuhApiConnection
from wazuh_api_kit.model import WazuhResponse
connection: WazuhApiConnection = WazuhApiConnection(
wazuh_api_url="https://localhost:55000",
wazuh_api_username="wazuh",
wazuh_api_password="wazuh",
wazuh_api_insecure=True,
)
api_info: WazuhResponse = connection.request(
method=HTTPMethod.GET,
path="/"
)
print(api_info.data["api_version"])
Request the GET / endpoint (Get API Info) via the WazuhApiClient class.
from wazuh_api_kit import WazuhApiConnection, WazuhApiClient
from wazuh_api_kit.model import WazuhApiInfo
connection: WazuhApiConnection = WazuhApiConnection(
wazuh_api_url="https://localhost:55000",
wazuh_api_username="wazuh",
wazuh_api_password="wazuh",
wazuh_api_insecure=True,
)
api_client: WazuhApiClient = WazuhApiClient(
wazuh_api_connection=connection
)
api_info: WazuhApiInfo = api_client.api_info_get()
print(api_info.version)
Contribute
Please read the Contribution guidelines before making contributions or submitting an issue.
License
The project is licensed under the MIT License.
Metadata
Release files for wazuh-api-kit 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wazuh_api_kit-1.1.0.tar.gz | 52.6 kB | Without provenance | Details for wazuh_api_kit-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wazuh_api_kit-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for wazuh_api_kit-1.1.0-py3-none-any.whl |
Total release size: 161.4 kB
Release files / wazuh_api_kit-1.1.0.tar.gz
| Download URL | wazuh_api_kit-1.1.0.tar.gz |
|---|---|
| Size | 52.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6541c038068172ab0e55ded7c3687d86c419e7b958f1764cba1d1b331e98f4b
|
|
BLAKE2b-256 checksum How to use checksums |
eab78627f1c1ffbf1e5ebfc15a22f1a2882f94b32fce1fe1398073387e5a7429
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / wazuh_api_kit-1.1.0-py3-none-any.whl
| Download URL | wazuh_api_kit-1.1.0-py3-none-any.whl |
|---|---|
| Size | 108.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23cfacde1e5f1c8c76ca3278caef2d5f86a054c448ddc86b19189aa6407de1b1
|
|
BLAKE2b-256 checksum How to use checksums |
abd92ea11e4c40b2663009fa9637645a195bbf882d711cdbdca85fb0a7c63f39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for wazuh-api-kit 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.