Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

cyberark-async

I'm currently updating the tooling, migrating and linting this repo.

aiobastion is a simple and fully asynchronous framework for Cyberark API written in Python 3.12 with asyncio and aiohttp. It helps you to manage your Cyberark implementation faster and in an intuitive way.

Examples

See examples of usage in the documentation

Quick (and dirty) start

List safes

Here's a minimal python snippet to list safes

import aiobastion
import asyncio

from aiobastion import GetTokenException


async def main():
    # Define your PVWA host here
    pvwa_host = "pvwa.mycompany.fr"
    vault = aiobastion.EPV(serialized={'api_host': pvwa_host})
    
    # Define login and password
    login = input("Login: ")
    password = input("Password: ")

    # Login to the PVWA
    try:
        await vault.login(login, password)
    except GetTokenException as err:
        print(f"An error occured while login : {err}")
        await vault.close_session()
        exit(0)

    # Working with PVWA
    async with vault as epv:
        # For example, listing all safes
        safes = await epv.safe.list()
        for s in safes:
            print(s)

if __name__ == '__main__':
    asyncio.run(main())

Getting started

Define a config file, and start using functions to avoid spending hours in annoying tasks in the PVWA :

Support policy

This repository currently targets Python 3.12 and newer. The current maintenance line is validated against Python 3.12, 3.13, and 3.14.

Integration tests

The live CyberArk tests are opt-in. Set the environment variable below to enable them:

export AIOBASTION_RUN_INTEGRATION_TESTS=1

You can override the default local test config paths with:

export AIOBASTION_TEST_CONFIG=/path/to/config_tests.yml
export AIOBASTION_TEST_AIM_CONFIG=/path/to/config_aim_hp.yml
export AIOBASTION_TEST_API_USER=admin_test_restapi

With those set, run the live suite with:

uv run --group test pytest tests/test_accounts.py tests/test_cyberark.py tests/test_safe.py

Development with uv

This repository uses uv for dependency management and local tooling.

Install the project dependencies with:

uv sync

Run the main developer tools with uv dependency groups:

uv run --group dev ruff check .
uv run --group dev ruff format .
uv run --group test pytest

If you need to refresh the lockfile after dependency changes, run:

uv lock

The project config currently limits resolution to packages uploaded at least one week ago, so uv sync and uv lock may intentionally avoid very new releases.

Pre-commit hooks

The repository includes a pre-commit configuration for formatting and hygiene checks.

Install the hooks once per clone:

uv run --group dev pre-commit install

Run the full hook set manually with:

uv run --group dev pre-commit run --all-files

The hooks run ruff, ruff-format, and basic checks like end-of-file, trailing whitespace, YAML, TOML, and merge-conflict detection.

Documentation

The documention is hosted on readthedocs : https://aiobastion.readthedocs.io/en/latest/index.html

Rationale

I've been working on Cyberark projects for years and I see everywhere a profusion of scripts, very often complicated and long to execute for very simple tasks (sometimes even with a "do not turn off" post-it on the screen). This package makes it quick and easy to accomplish without having to deal with the specifics of the Cyberark API. The acquisition time may be longer than for other well-known libraries, but, believe me, you will save this time very quickly.

AI Disclaimer

This repo is helped with Github Copilot

Metadata

Release files for cyberark-async 2026.9.9a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cyberark-async 2026.9.9a2
File Size Uploaded Provenance Actions
cyberark_async-2026.9.9a2.tar.gz 79.6 kB With provenance Details for cyberark_async-2026.9.9a2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cyberark-async 2026.9.9a2
File Interpreter ABI Platform Actions
cyberark_async-2026.9.9a2-py3-none-any.whl Python 3 none any Details for cyberark_async-2026.9.9a2-py3-none-any.whl

Total release size: 142.6 kB

Release files / cyberark_async-2026.9.9a2.tar.gz

Download URL cyberark_async-2026.9.9a2.tar.gz
Size 79.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3ebf9eb09a8c1514f3849b532ad3aa27ddc517275c8dac78663f415d4072c0e1
BLAKE2b-256 checksum
How to use checksums
14117bdeafd90366408f31500a660df24247ab091e58281e80586d7d57f3d456
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log

Release files / cyberark_async-2026.9.9a2-py3-none-any.whl

Download URL cyberark_async-2026.9.9a2-py3-none-any.whl
Size 63.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e2021c6966f5bc6970be3b1ec00db79848b8190a3bcbf847b7fc19755bd9ea8
BLAKE2b-256 checksum
How to use checksums
bc023dadedbb9732346d1f2ca7c724634f1ca4e2ba7106566603fd2c132e83b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log

Security for cyberark-async 2026.9.9a2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cyberark_async-2026.9.9a2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page