Registry / http-networking / lance-namespace-urllib3-client

lance-namespace-urllib3-client

JSON →
library0.6.1pypypi✓ verified 49d ago

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.

http-networkingdatabase
pip install lance-namespace-urllib3-client
Install & Compatibility
Where this runs
tested against v0.8.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.925 runs
installs and imports cleanly · install 0.0s · import 4.326s · 34.2MB
glibc
py 3.103.925 runs
installs and imports cleanly · install 3.7s · import 4.095s · 34MB
33MB installed
● package 33MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Configuration
from lance_namespace_urllib3_client import Configuration
ApiClient
from lance_namespace_urllib3_client import ApiClient
ApiException
from lance_namespace_urllib3_client import ApiException
TableApi
from lance_namespace_urllib3_client.api.table_api import TableApi
from lance_namespace_urllib3_client.api import TableApi
API classes are nested within `api.<api_name>_api` modules.
TableCreation
from lance_namespace_urllib3_client.model.table_creation import TableCreation
Location
from lance_namespace_urllib3_client.model.location import Location
Name
from lance_namespace_urllib3_client.model.name import Name

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.

import os from pprint import pprint from lance_namespace_urllib3_client import Configuration, ApiClient, ApiException from lance_namespace_urllib3_client.api.table_api import TableApi from lance_namespace_urllib3_client.model.table_creation import TableCreation from lance_namespace_urllib3_client.model.location import Location from lance_namespace_urllib3_client.model.name import Name # Configure API client. Replace with your Lance Namespace server host. # You can also pass API keys for authentication if required by your server. configuration = Configuration( host = os.environ.get('LANCE_NAMESPACE_HOST', 'http://localhost:8080') ) # if os.environ.get('LANCE_API_KEY'): # configuration.api_key['X-Api-Key'] = os.environ.get('LANCE_API_KEY') # Enter a context with an instance of the API client with ApiClient(configuration) as api_client: # Create an instance of the TableApi class api_instance = TableApi(api_client) # Define table details table_name = Name('my_first_table') table_creation_body = TableCreation( location = Location( uri="s3://my-test-bucket/data/my_first_table", # Required: URI where table data is stored ), managed_versioning=True, # Enable or disable managed versioning for the table properties={ "owner": "data_team", "environment": "dev" } ) try: # Call the declare_table API to register a new table api_response = api_instance.declare_table(table_name, table_creation_body) print("Successfully declared table:") pprint(api_response) except ApiException as e: print(f"Exception when calling TableApi->declare_table: {e}") # Example of retrieving a table with ApiClient(configuration) as api_client: api_instance = TableApi(api_client) try: get_table_response = api_instance.get_table(table_name) print("\nSuccessfully retrieved table:") pprint(get_table_response) except ApiException as e: print(f"Exception when calling TableApi->get_table: {e}")
Debug
Known issues
gotchaThe 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.
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.
affects: All versions
gotchaThis 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.
fix
Ensure a Lance Namespace server is deployed and accessible at the configured host before making API calls.
affects: All versions
gotchaAuthentication 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.
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.
affects: All versions
deprecatedThe 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.
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).
affects: Before v0.5.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'lance_namespace_urllib3_client'
The `lance-namespace-urllib3-client` library has not been installed in the current Python environment, or there is a typo in the import statement.
fix
Install the library using pip: `pip install lance-namespace-urllib3-client`. Ensure your import statement is `import lance_namespace_urllib3_client`.
import lance-namespace-urllib3-client
Python package names installed with hyphens (`-`) must be imported using underscores (`_`) instead of hyphens in the `import` statement.
fix
Change the import statement to use underscores: `import lance_namespace_urllib3_client`.
Connection refused lance-namespace-urllib3-client
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`.
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")`.
Upgrade
Version history
0.8.2latest on PyPI
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
6
claudebot
4
ahrefsbot
3
Meta
2
googlebot
1
seranking-bot
1
Resources