Registry / devops / aiven-client

aiven-client

JSON →
library4.15.0pypypi✓ verified 84d ago

The aiven-client library provides both a command-line client (`avn`) and a Python API for interacting with Aiven.io services. It's actively maintained with frequent minor releases, currently at version 4.13.0, introducing new features and deprecating older ones regularly.

pip install aiven-client
INSTALL
IMPORT
SIG · AIVEN-CLIENT
A
aiven-client
devopspythonv4.15.0
Install
2.3s avg
Import
627ms
Disk
21MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.15.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.660s · 22.6MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 2.3s · import 0.593s · 23MB
21MB installed
● package 21MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AivenClient
from aiven.client import AivenClient

Initialize the AivenClient using an API token from an environment variable and list your Aiven projects.

import os from aiven.client import AivenClient aiven_api_token = os.environ.get("AIVEN_TOKEN", "") if not aiven_api_token: print("Please set the AIVEN_TOKEN environment variable with your Aiven API token.") else: try: client = AivenClient(auth_token=aiven_api_token) projects = client.get_projects() print(f"Successfully connected to Aiven. Found {len(projects)} projects:") for project in projects: print(f" - {project['project_name']}") except Exception as e: print(f"Error connecting or listing projects: {e}")
avn --version
Debug
Known issues
breakingPython 3.9 support was dropped. Ensure your environment uses Python 3.10 or newer.
fix
Upgrade your Python interpreter to 3.10 or later.
affects: >=4.13.0
breakingThe `teams` commands and related API methods have been removed.
fix
Migrate to using application users and permissions for managing access, as `teams` functionality is no longer available. Refer to Aiven documentation for current access management practices.
affects: >=4.13.0
breakingPython 3.8 support was dropped. Ensure your environment uses Python 3.9 or newer.
fix
Upgrade your Python interpreter to 3.9 or later. For current versions, use 3.10+.
affects: >=4.11.0 <4.13.0
breakingSupport for InfluxDB services was dropped.
fix
If you relied on `aiven-client` for InfluxDB management, this functionality is no longer present. Consider alternative methods or Aiven Console for managing existing InfluxDB services.
affects: >=4.11.1
breakingAiven Redis services were replaced with Aiven Valkey services. While many operations remain similar, some Redis-specific commands or attributes may have changed.
fix
Review your code for any Redis-specific API calls. Adapt to Valkey-compatible methods and terminology. Existing Redis services were automatically migrated to Valkey.
affects: >=4.11.0
gotchaAPI token authentication is mandatory for programmatic access. Using an invalid or expired token will result in authentication errors.
fix
Always provide a valid Aiven API token during client initialization. It's recommended to load this from environment variables (e.g., `AIVEN_TOKEN`) or a secure configuration system.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'aiven'
The `aiven-client` library is not installed or the Python environment is incorrect.
fix
Install the library using `pip install aiven-client`. Ensure you are running your script with the Python interpreter where the library was installed.
aiven.client.client.AivenError: Authentication required
The AivenClient was initialized without a valid API token, or the provided token is expired/incorrect.
fix
Set the `AIVEN_TOKEN` environment variable with your Aiven API token before running your script, or pass a valid `auth_token` directly to the `AivenClient` constructor.
AttributeError: 'AivenClient' object has no attribute 'get_teams'
You are trying to call a method that was part of a deprecated feature (`teams`) and has been removed from the client library.
fix
Refer to the Aiven documentation for current methods of managing user access and permissions, which no longer involve 'teams' functionality programmatically in the client library.
Upgrade
Version history
4.15.0latest on PyPI · released May 21, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
75 hits · last 30 days
node
65
Perplexity
1
OpenAI (training)
1
Resources
aiven-client — pip install aiven-client · libregistry