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

Function create_session

tests/test-tf-idf-bm25.py:33–44  ·  view source on GitHub ↗

Initialize the cosdata client

()

Source from the content-addressed store, hash-verified

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

Callers 2

mainFunction · 0.70
main_non_itFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected