We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
cocoindex.init()
1 parent 915b85d commit 56d6955Copy full SHA for 56d6955
python/cocoindex/lib.py
@@ -12,8 +12,13 @@
12
from .convert import dump_engine_object
13
14
15
-def init(settings: setting.Settings):
16
- """Initialize the cocoindex library."""
+def init(settings: setting.Settings | None):
+ """
17
+ Initialize the cocoindex library.
18
+
19
+ If the settings are not provided, they are loaded from the environment variables.
20
21
+ settings = settings or setting.Settings.from_env()
22
_engine.init(dump_engine_object(settings))
23
setting.set_app_namespace(settings.app_namespace)
24
0 commit comments