{"id":27746,"library":"fleet-python","title":"Fleet Python SDK","description":"Python SDK for interacting with Fleet environments. Currently at version 0.2.126, actively maintained. Provides client for task execution, file management, and environment metadata. Releases are frequent (multiple per week). Requires Python >=3.9.","status":"active","version":"0.2.126","language":"python","source_language":"en","source_url":"https://github.com/fleet-ai/fleet-sdk","tags":["fleet","sdk","ai","client","httpx","pydantic"],"install":[{"cmd":"pip install fleet-python","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Used for making HTTP requests","package":"httpx","optional":false},{"reason":"Used for data validation and settings management","package":"pydantic","optional":false}],"imports":[{"note":"Package name is fleet, not fleet_python","wrong":"from fleet_python import FleetClient","symbol":"FleetClient","correct":"from fleet import FleetClient"},{"note":"Task model is in fleet.models","wrong":"from fleet import Task","symbol":"Task","correct":"from fleet.models import Task"}],"quickstart":{"code":"import os\nfrom fleet import FleetClient\n\nclient = FleetClient(\n    api_key=os.environ.get('FLEET_API_KEY', ''),\n    base_url=os.environ.get('FLEET_BASE_URL', 'https://api.fleet.com')\n)\ntry:\n    tasks = client.list_tasks()\n    print(tasks)\nexcept Exception as e:\n    print(f'Error: {e}')","lang":"python","description":"Initialize FleetClient and list tasks. Ensure FLEET_API_KEY and optionally FLEET_BASE_URL are set as environment variables."},"warnings":[{"fix":"Update attribute access to use metadata dict: task.metadata.get('field_name') instead of task.field_name.","message":"In version 0.2.106, metadata fields were consolidated. Code relying on deprecated field names (e.g., 'task_type') may break. Use the new unified 'metadata' dictionary.","severity":"breaking","affected_versions":">=0.2.106"},{"fix":"Always pass base_url parameter. Use the default only if you are targeting Fleet Cloud.","message":"The old pattern of instantiating FleetClient without an explicit base_url may stop working in future releases.","severity":"deprecated","affected_versions":"<=0.2.125"},{"fix":"Use await client.some_async_method() inside async functions, or ensure you are using the synchronous client correctly.","message":"The SDK uses httpx for async by default. Using blocking calls in an async event loop can lead to performance issues.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use 'import fleet' or 'from fleet import FleetClient'.","cause":"Package is imported as 'fleet', not 'fleet_python'. The PyPI name fleet-python does not match the import name.","error":"ModuleNotFoundError: No module named 'fleet_python'"},{"fix":"Use 'client.tasks.list()' or refer to the official docs for the correct method.","cause":"Method may have been renamed or moved to a submodule in newer versions. Check the current API documentation.","error":"AttributeError: 'FleetClient' object has no attribute 'list_tasks'"},{"fix":"Pass api_key='your_key' to FleetClient constructor.","cause":"api_key is a required parameter since version 0.2.100.","error":"TypeError: __init__() missing 1 required positional argument: 'api_key'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}