lance-namespace0.4.5
lance-namespace0.4.5
Published
Lance Namespace interface and plugin registry
pip install lance-namespace
Package Downloads
Authors
Project URLs
Requires Python
>=3.8
lance-namespace
Lance Namespace interface and plugin registry.
Overview
This package provides:
LanceNamespaceABC interface for namespace implementationsconnect()factory function for creating namespace instancesregister_namespace_impl()for external implementation registration- Re-exported model types from
lance_namespace_urllib3_client
Installation
pip install lance-namespace
Usage
import lance_namespace
# Connect using native implementations (requires lance package)
ns = lance_namespace.connect("dir", {"root": "/path/to/data"})
ns = lance_namespace.connect("rest", {"uri": "http://localhost:4099"})
# Register a custom implementation
lance_namespace.register_namespace_impl("glue", "lance_glue.GlueNamespace")
ns = lance_namespace.connect("glue", {"catalog": "my_catalog"})
Creating Custom Implementations
from lance_namespace import LanceNamespace
class MyNamespace(LanceNamespace):
def namespace_id(self) -> str:
return "MyNamespace { ... }"
# Override other methods as needed
License
Apache-2.0