{"id":8262,"library":"lakefs-client","title":"lakeFS Python Client (Legacy/Deprecated)","description":"This is the legacy Python client for lakeFS, an open-source data version control system. It provides direct access to the lakeFS HTTP API, automatically generated from an OpenAPI specification. As of its last release, v1.44.0, this client has reached End-of-Life (EOL) and is officially deprecated. Users are strongly advised to migrate to the newer `lakefs-sdk` (for direct API access) or `lakefs` (for a higher-level, more Pythonic interface) packages.","status":"deprecated","version":"1.44.0","language":"en","source_language":"en","source_url":"https://github.com/treeverse/lakeFS/tree/master/clients/python-legacy","tags":["data-versioning","data-lake","etl","deprecated","legacy","api-client"],"install":[{"cmd":"pip install lakefs-client","lang":"bash","label":"Install lakefs-client"}],"dependencies":[],"imports":[{"note":"Configuration is part of the top-level `lakefs_client` module, not directly exportable.","wrong":"from lakefs_client import Configuration","symbol":"Configuration","correct":"import lakefs_client\nconfiguration = lakefs_client.Configuration()"},{"note":"API classes are located within the `lakefs_client.api` submodule.","wrong":"from lakefs_client import RepositoriesApi","symbol":"RepositoriesApi","correct":"from lakefs_client.api import repositories_api"},{"note":"Models are in `lakefs_client.model`, not pluralized `models`.","wrong":"from lakefs_client.models import Repository","symbol":"Repository","correct":"from lakefs_client.model.repository import Repository"}],"quickstart":{"code":"import os\nimport lakefs_client\nfrom lakefs_client.api import repositories_api\n\n# Configure HTTP basic authorization (replace with your lakeFS endpoint and credentials)\nconfiguration = lakefs_client.Configuration(\n    host=os.environ.get('LAKEFS_ENDPOINT', 'http://localhost/api/v1'),\n    username=os.environ.get('LAKEFS_ACCESS_KEY_ID', 'YOUR_ACCESS_KEY_ID'),\n    password=os.environ.get('LAKEFS_SECRET_ACCESS_KEY', 'YOUR_SECRET_ACCESS_KEY')\n)\n\n# Create an instance of the API class\napi_client = lakefs_client.ApiClient(configuration)\napi_instance = repositories_api.RepositoriesApi(api_client)\n\ntry:\n    # List repositories\n    repos = api_instance.list_repositories()\n    print(\"Existing Repositories:\")\n    for repo in repos.results:\n        print(f\"- {repo.id}\")\nexcept lakefs_client.ApiException as e:\n    print(f\"Exception when calling RepositoriesApi->list_repositories: {e}\")\n    print(\"Make sure your lakeFS server is running and credentials are correct.\")","lang":"python","description":"This quickstart demonstrates how to configure the legacy `lakefs-client` and list existing repositories. It uses environment variables for host and credentials, falling back to placeholders if not set. Due to the client's deprecated status, this example serves mostly for understanding the legacy API structure."},"warnings":[{"fix":"Migrate your code to use the modern `lakefs` (High-Level SDK) or `lakefs-sdk` (Generated SDK) packages. Refer to the official lakeFS documentation for migration guides.","message":"The `lakefs-client` package is deprecated and has reached End-of-Life (EOL) with its last release, v1.44.0. It will no longer receive updates, new features, or compatibility guarantees for future lakeFS server versions beyond 1.x.","severity":"breaking","affected_versions":">=1.44.0"},{"fix":"While existing programs using `lakefs-client` v1.x will continue to work with lakeFS server v1.x, any new development or updates should use `lakefs-sdk` or `lakefs` for their stability and support.","message":"The `lakefs-client` SDK is auto-generated and does not offer strong interface guarantees, meaning methods and models might change between minor versions in a non-backward-compatible way for source code.","severity":"gotcha","affected_versions":"<=1.44.0"},{"fix":"Ensure `lakefs_client.Configuration` is explicitly populated with `host`, `username`, and `password` (or `access_token` for JWT). The new `lakefs` SDK handles credential discovery automatically.","message":"Authentication for `lakefs-client` is less flexible than newer SDKs, typically requiring explicit `username` and `password` or `api_key` configuration. It lacks automatic inference from environment variables or `~/.lakectl.yaml` files without manual setup.","severity":"gotcha","affected_versions":"<=1.44.0"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Ensure the package is installed: `pip install lakefs-client`.","cause":"The `lakefs-client` package is not installed or the environment is not active.","error":"ModuleNotFoundError: No module named 'lakefs_client.api'"},{"fix":"Verify that `LAKEFS_ENDPOINT`, `LAKEFS_ACCESS_KEY_ID`, and `LAKEFS_SECRET_ACCESS_KEY` environment variables are correctly set, or that the `Configuration` object is initialized with valid `host`, `username`, and `password`.","cause":"Incorrect lakeFS access credentials (access key ID or secret access key) or an invalid host endpoint.","error":"lakefs_client.ApiException: (401) Reason: Unauthorized"},{"fix":"Change `from lakefs_client import Configuration` to `import lakefs_client; configuration = lakefs_client.Configuration()`.","cause":"Attempting to import `Configuration` directly from `lakefs_client` instead of accessing it as `lakefs_client.Configuration`.","error":"AttributeError: 'module' object has no attribute 'Configuration'"}]}