{"id":10032,"library":"phaxio","title":"Phaxio Python Client","description":"The `phaxio` library provides a Python client for interacting with the Phaxio v2 API. As of version 0.3, it offers methods for sending faxes, managing webhooks, and more. Development appears to be in maintenance mode, with the last major commit in 2018.","status":"maintenance","version":"0.3","language":"en","source_language":"en","source_url":"https://github.com/anpolsky/phaxio-python","tags":["phaxio","fax","telecom","api-client"],"install":[{"cmd":"pip install phaxio","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Handles HTTP communication with the Phaxio API.","package":"requests"}],"imports":[{"note":"The phaxio library uses module-level attribute assignment for API keys/secrets and exposes functionality directly via sub-modules (e.g., `phaxio.faxes`), rather than requiring an explicit client instance.","wrong":"from phaxio import PhaxioClient","symbol":"phaxio","correct":"import phaxio"}],"quickstart":{"code":"import os\nimport phaxio\n\n# Authenticate using environment variables\nphaxio.api_key = os.environ.get(\"PHAXIO_API_KEY\", \"YOUR_API_KEY\")\nphaxio.api_secret = os.environ.get(\"PHAXIO_API_SECRET\", \"YOUR_API_SECRET\")\n\n# Example: List existing faxes (requires authentication and API access)\ntry:\n    # Fetch one fax to verify connection and credentials\n    faxes = phaxio.faxes.list(per_page=1)\n    print(f\"Successfully connected to Phaxio API. Found {len(faxes)} fax entries.\")\n    # Uncomment to see the first fax details if available\n    # if faxes: print(f\"First fax: {faxes[0]}\")\nexcept phaxio.exceptions.PhaxioException as e:\n    print(f\"Error connecting to Phaxio API or listing faxes: {e}\")\n    print(\"Please ensure PHAXIO_API_KEY and PHAXIO_API_SECRET environment variables are set correctly and have necessary permissions.\")\nexcept Exception as e:\n    print(f\"An unexpected error occurred: {e}\")","lang":"python","description":"Initializes the Phaxio client using API key and secret, then attempts to list faxes to verify connectivity. Replace placeholders or set environment variables `PHAXIO_API_KEY` and `PHAXIO_API_SECRET`."},"warnings":[{"fix":"Ensure you are using valid Phaxio v2 API Key and Secret generated from your Phaxio dashboard.","message":"This library is designed for Phaxio API v2. Using Phaxio API v1 keys or endpoints will result in authentication failures or unexpected behavior.","severity":"gotcha","affected_versions":"0.3"},{"fix":"For simple scripts, this is acceptable. For complex applications, consider using a wrapper or ensuring authentication is handled carefully for each thread/request, or use separate processes.","message":"The library sets API keys and secrets as global module-level attributes (`phaxio.api_key`, `phaxio.api_secret`). This can cause issues in multi-threaded applications or when managing multiple Phaxio accounts within a single process.","severity":"gotcha","affected_versions":"0.3"},{"fix":"Verify that the library's functionality meets your current Phaxio API requirements. If new features are needed, you may need to implement direct API calls or find an alternative client.","message":"The library has not been actively developed since 2018 (version 0.3). While it targets Phaxio API v2 and may still function, it might not support the latest API features or bug fixes from Phaxio's service updates.","severity":"gotcha","affected_versions":"0.3"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Double-check your `PHAXIO_API_KEY` and `PHAXIO_API_SECRET` environment variables or hardcoded values. Ensure they are valid Phaxio v2 API credentials.","cause":"Incorrect Phaxio API Key or Secret, or using v1 credentials with this v2 client.","error":"phaxio.exceptions.PhaxioException: (401) Unauthorized"},{"fix":"Ensure `import phaxio` is present and that `phaxio.api_key` and `phaxio.api_secret` are assigned values before calling methods like `phaxio.faxes.list()`.","cause":"The `phaxio` module attributes for API keys/secrets were not set, or the module was not properly imported before attempting to use its sub-modules.","error":"AttributeError: module 'phaxio' has no attribute 'faxes'"},{"fix":"Check your internet connection and local firewall settings. Verify Phaxio's service status page for any outages. Try the request again after a short delay.","cause":"Network connectivity issue, firewall blocking access, or temporary unavailability of the Phaxio API server.","error":"requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))"}]}