-
Notifications
You must be signed in to change notification settings - Fork 140
Expand file tree
/
Copy path__init__.py
More file actions
29 lines (19 loc) · 819 Bytes
/
__init__.py
File metadata and controls
29 lines (19 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""CocoIndex Code - MCP server for indexing and querying codebases."""
from __future__ import annotations
import logging
import os
from typing import TYPE_CHECKING, Any
# Identify this application in cocoindex's telemetry payloads. Must be set
# before any `import cocoindex` runs (the value is read once at telemetry
# init time). See cocoindex-io/cocoindex#1992.
os.environ.setdefault("COCOINDEX_APPLICATION_FOR_TRACKING", "cocoindex-code")
logging.basicConfig(level=logging.WARNING)
from ._version import __version__ # noqa: E402
if TYPE_CHECKING:
from .server import main as main
__all__ = ["main", "__version__"]
def __getattr__(name: str) -> Any:
if name == "main":
from .server import main
return main
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")