{"id":2092,"library":"lance-namespace-urllib3-client","title":"Lance Namespace urllib3 Client","description":"The `lance-namespace-urllib3-client` is an auto-generated Python client library for interacting with a Lance Namespace server, adhering to the Lance Namespace Specification. It provides methods for managing tables, including creation, declaration, and versioning operations. The current version is 0.6.1, and the library follows a rapid release cadence with frequent minor updates and bug fixes.","status":"active","version":"0.6.1","language":"python","source_language":"en","source_url":"https://github.com/lance-format/lance-namespace","tags":["lance","namespace","data","client","api","storage","urllib3"],"install":[{"cmd":"pip install lance-namespace-urllib3-client","lang":"bash","label":"Install with pip"}],"dependencies":[],"imports":[{"symbol":"Configuration","correct":"from lance_namespace_urllib3_client import Configuration"},{"symbol":"ApiClient","correct":"from lance_namespace_urllib3_client import ApiClient"},{"symbol":"ApiException","correct":"from lance_namespace_urllib3_client import ApiException"},{"note":"API classes are nested within `api.<api_name>_api` modules.","wrong":"from lance_namespace_urllib3_client.api import TableApi","symbol":"TableApi","correct":"from lance_namespace_urllib3_client.api.table_api import TableApi"},{"symbol":"TableCreation","correct":"from lance_namespace_urllib3_client.model.table_creation import TableCreation"},{"symbol":"Location","correct":"from lance_namespace_urllib3_client.model.location import Location"},{"symbol":"Name","correct":"from lance_namespace_urllib3_client.model.name import Name"}],"quickstart":{"code":"import os\nfrom pprint import pprint\n\nfrom lance_namespace_urllib3_client import Configuration, ApiClient, ApiException\nfrom lance_namespace_urllib3_client.api.table_api import TableApi\nfrom lance_namespace_urllib3_client.model.table_creation import TableCreation\nfrom lance_namespace_urllib3_client.model.location import Location\nfrom lance_namespace_urllib3_client.model.name import Name\n\n# Configure API client. Replace with your Lance Namespace server host.\n# You can also pass API keys for authentication if required by your server.\nconfiguration = Configuration(\n    host = os.environ.get('LANCE_NAMESPACE_HOST', 'http://localhost:8080')\n)\n# if os.environ.get('LANCE_API_KEY'):\n#     configuration.api_key['X-Api-Key'] = os.environ.get('LANCE_API_KEY')\n\n# Enter a context with an instance of the API client\nwith ApiClient(configuration) as api_client:\n    # Create an instance of the TableApi class\n    api_instance = TableApi(api_client)\n\n    # Define table details\n    table_name = Name('my_first_table')\n    table_creation_body = TableCreation(\n        location = Location(\n            uri=\"s3://my-test-bucket/data/my_first_table\", # Required: URI where table data is stored\n        ),\n        managed_versioning=True, # Enable or disable managed versioning for the table\n        properties={\n            \"owner\": \"data_team\",\n            \"environment\": \"dev\"\n        }\n    )\n\n    try:\n        # Call the declare_table API to register a new table\n        api_response = api_instance.declare_table(table_name, table_creation_body)\n        print(\"Successfully declared table:\")\n        pprint(api_response)\n    except ApiException as e:\n        print(f\"Exception when calling TableApi->declare_table: {e}\")\n\n# Example of retrieving a table\nwith ApiClient(configuration) as api_client:\n    api_instance = TableApi(api_client)\n    try:\n        get_table_response = api_instance.get_table(table_name)\n        print(\"\\nSuccessfully retrieved table:\")\n        pprint(get_table_response)\n    except ApiException as e:\n        print(f\"Exception when calling TableApi->get_table: {e}\")\n","lang":"python","description":"This quickstart demonstrates how to initialize the client, configure its host, and declare a new table with `declare_table`. It also includes an example of retrieving the declared table using `get_table`. Remember to set the `LANCE_NAMESPACE_HOST` environment variable or modify the configuration directly to point to your Lance Namespace server."},"warnings":[{"fix":"Set `configuration.host = 'https://your-lance-namespace-server.com'` or use an environment variable (e.g., `LANCE_NAMESPACE_HOST`) to override the default during initialization.","message":"The default client host is `http://localhost:8080`. Users *must* configure the `host` parameter in `lance_namespace_urllib3_client.Configuration` to point to their actual Lance Namespace server endpoint, otherwise, all API calls will fail.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure a Lance Namespace server is deployed and accessible at the configured host before making API calls.","message":"This client interacts with a Lance Namespace server. It does not provide the server itself. You need a running instance of a Lance Namespace server to use this client effectively.","severity":"gotcha","affected_versions":"All versions"},{"fix":"If your Lance Namespace server requires authentication, uncomment and configure `configuration.api_key` or other auth methods as per your server's security policy.","message":"Authentication mechanisms (e.g., API keys, OAuth) are server-dependent. While the client supports common patterns like `api_key['X-Api-Key']`, it might not be enabled or required by default on your server setup. Consult your server's documentation for required authentication.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always review release notes for new versions to understand API changes and new capabilities, especially around features like table versioning and batch operations (e.g., `BatchCommitTables` in v0.6.0).","message":"The Lance Namespace specification and its clients are under active development. While explicit breaking changes are usually noted, the API can evolve. Features like `managed_versioning` (introduced in v0.5.0) reflect ongoing enhancements.","severity":"deprecated","affected_versions":"Before v0.5.0"}],"env_vars":null,"search_vec":"'0.6.1':48 'adher':26 'api':68 'auto':14 'auto-gener':13 'bug':62 'cadenc':56 'client':4,10,17,67 'creation':39 'current':45 'data':66 'declar':40 'fix':63 'follow':52 'frequent':58 'generat':15 'includ':38 'interact':20 'lanc':1,7,23,29,64 'lance-namespace-urllib3-client':6 'librari':18,51 'manag':36 'method':34 'minor':59 'namespac':2,8,24,30,65 'oper':43 'provid':33 'python':16 'rapid':54 'releas':55 'server':25 'specif':31 'storag':69 'tabl':37 'updat':60 'urllib3':3,9,70 'version':42,46","created_at":"2026-04-09T18:43:11.254160+00:00","updated_at":"2026-04-16T16:05:13.110018+00:00","problems":[{"fix":"Install the library using pip: `pip install lance-namespace-urllib3-client`. Ensure your import statement is `import lance_namespace_urllib3_client`.","cause":"The `lance-namespace-urllib3-client` library has not been installed in the current Python environment, or there is a typo in the import statement.","error":"ModuleNotFoundError: No module named 'lance_namespace_urllib3_client'"},{"fix":"Change the import statement to use underscores: `import lance_namespace_urllib3_client`.","cause":"Python package names installed with hyphens (`-`) must be imported using underscores (`_`) instead of hyphens in the `import` statement.","error":"import lance-namespace-urllib3-client"},{"fix":"Verify that the Lance Namespace server is running and accessible at the configured host and port. If the server is on a different address, update the client's configuration: `configuration = lance_namespace_urllib3_client.Configuration(host=\"http://your_server_host:your_server_port\")`.","cause":"The client is unable to establish a connection with the Lance Namespace server. This typically happens if the server is not running, is listening on a different host or port, or is unreachable due to network issues. The default server host is `http://localhost:2333`.","error":"Connection refused lance-namespace-urllib3-client"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.8.2","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/lance-format/lance-namespace","docs":null,"changelog":null,"pypi":"https://pypi.org/project/lance-namespace-urllib3-client/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["http-networking","database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":null}}