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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cyberark_async-2026.9.9a2.tar.gz (79.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cyberark_async-2026.9.9a2-py3-none-any.whl (63.0 kB view details)

Uploaded Python 3

File details

Details for the file cyberark_async-2026.9.9a2.tar.gz.

File metadata

  • Download URL: cyberark_async-2026.9.9a2.tar.gz
  • Upload date:
  • Size: 79.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for cyberark_async-2026.9.9a2.tar.gz
Algorithm Hash digest
SHA256 3ebf9eb09a8c1514f3849b532ad3aa27ddc517275c8dac78663f415d4072c0e1
MD5 2c7c21d031fe4b0c649d29c58a61714b
BLAKE2b-256 14117bdeafd90366408f31500a660df24247ab091e58281e80586d7d57f3d456

See more details on using hashes here.

Provenance

The following attestation bundles were made for cyberark_async-2026.9.9a2.tar.gz:

Publisher: python-publish.yml on gira0/cyberark-async

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cyberark_async-2026.9.9a2-py3-none-any.whl.

File metadata

File hashes

Hashes for cyberark_async-2026.9.9a2-py3-none-any.whl
Algorithm Hash digest
SHA256 8e2021c6966f5bc6970be3b1ec00db79848b8190a3bcbf847b7fc19755bd9ea8
MD5 f72e7b4e58e03a9926abc95caa475ecf
BLAKE2b-256 bc023dadedbb9732346d1f2ca7c724634f1ca4e2ba7106566603fd2c132e83b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for cyberark_async-2026.9.9a2-py3-none-any.whl:

Publisher: python-publish.yml on gira0/cyberark-async

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2026.9.9a2 This release

2 files

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