API Docs
geneva.connect
connect(
uri: str | Path | None = None,
*,
region: str | None = None,
api_key: Credential | str | None = None,
host_override: str | None = None,
storage_options: dict[str, str] | None = None,
checkpoint: str | CheckpointStore | None = None,
system_namespace: list[str] | None = None,
namespace_impl: str | None = None,
namespace_properties: dict[str, str] | None = None,
upload_dir: str | None = None,
**kwargs,
) -> Connection
Create a Geneva Connection to an existing database.
Examples:
>>> import geneva
>>> # Connect to a database in object storage
>>> conn = geneva.connect("s3://my-storage-bucket/my-database")
>>> # Connect using directory namespace
>>> conn = geneva.connect(
... namespace_impl="dir", namespace_properties={"root": "/path"}
... )
>>> # Connect using REST namespace
>>> conn = geneva.connect(
... namespace_impl="rest", namespace_properties={"uri": f"http://127.0.0.1:1234"}
... )
>>> # Connect with Phalanx remote server and separate upload bucket
>>> conn = geneva.connect(
... uri="db://my_database",
... api_key="my-api-key",
... host_override="https://phalanx.example.com",
... upload_dir="s3://my-upload-bucket/manifests",
... )
>>> tbl = conn.open_table("youtube_dataset")
Parameters:
-
uri(str | Path | None, default:None) –LanceDB Database URI, or a S3/GCS path. If not provided and namespace_impl is set, defaults to "namespace://".
-
region(str | None, default:None) –LanceDB cloud region. Set to
Noneon LanceDB Enterprise -
api_key(Credential | str | None, default:None) –Optional API key for enterprise endpoint
-
host_override(str | None, default:None) –Optional host URI for enterprise endpoint
-
system_namespace(list[str] | None, default:None) –Namespace for system tables (manifests, clusters, jobs, errors). Defaults to config value if not provided.
-
namespace_impl(str | None, default:None) –The namespace implementation to use (e.g., "dir", "rest"). If provided, connects using namespace instead of local database.
-
namespace_properties(dict[str, str] | None, default:None) –Configuration properties for the namespace implementation.
-
upload_dir(str | None, default:None) –Optional separate bucket/path for manifest uploads. This allows the client to upload manifests to a separate bucket instead of the data bucket where manifests are uploaded by default.
Returns:
-
Connection - A LanceDB connection–
Source code in geneva/db.py
835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 | |