{"id":9444,"library":"agilicus","title":"Agilicus Python SDK","description":"The Agilicus Python SDK provides a client for interacting with Agilicus APIs, facilitating secure access to protected resources and management operations. It is currently at version 1.415.0 and appears to follow a rapid release cadence based on frequent version bumps on PyPI, often without detailed public release notes.","status":"active","version":"1.415.0","language":"python","source_language":"en","source_url":"https://github.com/Agilicus","tags":["api-client","sdk","authentication","security","agilicus"],"install":[{"cmd":"pip install agilicus","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"wrong":"from agilicus import Agilicus","symbol":"APIKey","correct":"from agilicus import APIKey"},{"symbol":"APIKeyIntrospect","correct":"from agilicus import APIKeyIntrospect"},{"symbol":"AgentConnector","correct":"from agilicus import AgentConnector"}],"quickstart":{"code":"import os\nimport agilicus\n\n# Ensure AGILICUS_CLIENT_ID, AGILICUS_CLIENT_SECRET, AGILICUS_ISSUER are set as environment variables.\n# Example: os.environ['AGILICUS_CLIENT_ID'] = 'your_client_id_here'\n\n# The Agilicus client automatically picks up credentials from environment variables.\n# You can also pass them directly to the constructor.\nclient = agilicus.Agilicus()\n\ntry:\n    # Example: List users (requires appropriate permissions)\n    print(\"Attempting to list users...\")\n    users = client.list_users()\n    if users:\n        print(f\"Successfully listed {len(users)} users. First user ID: {users[0].id}\")\n    else:\n        print(\"No users found or client lacks permissions to list users.\")\n\n    # Example: Access a protected resource (replace with your actual resource path)\n    print(\"\\nAttempting to access a protected resource...\")\n    response = client.get_protected_resource(\"/api/v1/status\") # Illustrative endpoint\n    response.raise_for_status() # Raise HTTPError for bad responses (4xx or 5xx)\n    print(f\"Protected resource accessed successfully: {response.status_code}\")\n    print(response.json())\n\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")\n    print(\"Please ensure your Agilicus client is correctly configured with valid credentials and necessary permissions.\")","lang":"python","description":"Initializes the Agilicus client and demonstrates listing users and accessing a protected resource. Requires `AGILICUS_CLIENT_ID`, `AGILICUS_CLIENT_SECRET`, and `AGILICUS_ISSUER` environment variables to be set for authentication."},"warnings":[{"fix":"Ensure `AGILICUS_CLIENT_ID`, `AGILICUS_CLIENT_SECRET`, and `AGILICUS_ISSUER` environment variables are correctly set, or pass them directly to the `Agilicus()` constructor. Verify client permissions in your Agilicus console.","message":"Many SDK operations require correct authentication credentials (CLIENT_ID, CLIENT_SECRET, ISSUER) and appropriate permissions for the client account. Misconfiguration often leads to 401 Unauthorized or 403 Forbidden errors.","severity":"gotcha","affected_versions":"All"},{"fix":"Always call `response.raise_for_status()` after an API call (e.g., `client.get_protected_resource(...).raise_for_status()`) to automatically raise an `HTTPError` for bad responses, or explicitly check `response.ok` or `response.status_code`.","message":"API calls in the SDK often return `requests.Response` objects. Failing to check `response.raise_for_status()` or `response.ok` can lead to silently processing error responses (e.g., 404 Not Found) as if they were successful.","severity":"gotcha","affected_versions":"All"},{"fix":"Investigate if the `client.session` attribute provides access to the underlying `requests.Session` object for more granular control, or consider direct `requests` calls for highly specific HTTP interactions.","message":"The SDK primarily offers high-level wrappers. For advanced HTTP request features (e.g., custom headers, streaming responses, specific timeout handling) not directly exposed by SDK methods, you might need to access the underlying `client.session` object or fall back to raw `requests` calls.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"search_vec":"'1.415.0':30 'access':18 'agilicus':1,5,14,58 'api':15,53 'api-cli':52 'appear':32 'authent':56 'base':39 'bump':43 'cadenc':38 'client':10,54 'current':27 'detail':48 'facilit':16 'follow':34 'frequent':41 'interact':12 'manag':23 'note':51 'often':46 'oper':24 'protect':20 'provid':8 'public':49 'pypi':45 'python':2,6 'rapid':36 'releas':37,50 'resourc':21 'sdk':3,7,55 'secur':17,57 'version':29,42 'without':47","created_at":"2026-04-17T01:18:55.613379+00:00","updated_at":"2026-04-17T01:18:55.613379+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.422.13","cli_name":"","cli_version":null,"type":"library","homepage":"https://www.agilicus.com/","github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/agilicus/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["http-networking","auth-security","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}