MCPcopy Create free account
hub / github.com/cosdata/cosdata / create_session

Function create_session

tests/test-sparse-vector.py:34–45  ·  view source on GitHub ↗

Initialize the cosdata client

()

Source from the content-addressed store, hash-verified

32
33
34def create_session():
35 """Initialize the cosdata client"""
36 # Use environment variable from .env file if available, otherwise prompt
37 password = os.getenv("COSDATA_PASSWORD")
38 if not password:
39 password = getpass.getpass("Enter admin password: ")
40
41 username = os.getenv("COSDATA_USERNAME", "admin")
42
43 global client
44 client = Client(host=host, username=username, password=password, verify=False)
45 return client
46
47
48def create_db(name, description=None, dimension=20000):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected