{"id":6977,"library":"aiven-client","title":"Aiven Client Library","description":"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.","status":"active","version":"4.13.0","language":"en","source_language":"en","source_url":"https://github.com/aiven/aiven-client","tags":["aiven","cloud","cli","database","kafka","api-client","infrastructure-as-code"],"install":[{"cmd":"pip install aiven-client","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"symbol":"AivenClient","correct":"from aiven.client import AivenClient"}],"quickstart":{"code":"import os\nfrom aiven.client import AivenClient\n\naiven_api_token = os.environ.get(\"AIVEN_TOKEN\", \"\")\n\nif not aiven_api_token:\n    print(\"Please set the AIVEN_TOKEN environment variable with your Aiven API token.\")\nelse:\n    try:\n        client = AivenClient(auth_token=aiven_api_token)\n        projects = client.get_projects()\n        print(f\"Successfully connected to Aiven. Found {len(projects)} projects:\")\n        for project in projects:\n            print(f\"  - {project['project_name']}\")\n    except Exception as e:\n        print(f\"Error connecting or listing projects: {e}\")","lang":"python","description":"Initialize the AivenClient using an API token from an environment variable and list your Aiven projects."},"warnings":[{"fix":"Upgrade your Python interpreter to 3.10 or later.","message":"Python 3.9 support was dropped. Ensure your environment uses Python 3.10 or newer.","severity":"breaking","affected_versions":">=4.13.0"},{"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.","message":"The `teams` commands and related API methods have been removed.","severity":"breaking","affected_versions":">=4.13.0"},{"fix":"Upgrade your Python interpreter to 3.9 or later. For current versions, use 3.10+.","message":"Python 3.8 support was dropped. Ensure your environment uses Python 3.9 or newer.","severity":"breaking","affected_versions":">=4.11.0 <4.13.0"},{"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.","message":"Support for InfluxDB services was dropped.","severity":"breaking","affected_versions":">=4.11.1"},{"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.","message":"Aiven Redis services were replaced with Aiven Valkey services. While many operations remain similar, some Redis-specific commands or attributes may have changed.","severity":"breaking","affected_versions":">=4.11.0"},{"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.","message":"API token authentication is mandatory for programmatic access. Using an invalid or expired token will result in authentication errors.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Install the library using `pip install aiven-client`. Ensure you are running your script with the Python interpreter where the library was installed.","cause":"The `aiven-client` library is not installed or the Python environment is incorrect.","error":"ModuleNotFoundError: No module named 'aiven'"},{"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.","cause":"The AivenClient was initialized without a valid API token, or the provided token is expired/incorrect.","error":"aiven.client.client.AivenError: Authentication required"},{"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.","cause":"You are trying to call a method that was part of a deprecated feature (`teams`) and has been removed from the client library.","error":"AttributeError: 'AivenClient' object has no attribute 'get_teams'"}]}