diff --git a/circuitforge_core/__init__.py b/circuitforge_core/__init__.py index 03d2650..2b6c6b4 100644 --- a/circuitforge_core/__init__.py +++ b/circuitforge_core/__init__.py @@ -1,5 +1,8 @@ __version__ = "0.10.0" -from circuitforge_core.community import CommunityDB, CommunityPost, SharedStore - -__all__ = ["CommunityDB", "CommunityPost", "SharedStore"] +try: + from circuitforge_core.community import CommunityDB, CommunityPost, SharedStore + __all__ = ["CommunityDB", "CommunityPost", "SharedStore"] +except ImportError: + # psycopg2 not installed — install with: pip install circuitforge-core[community] + pass diff --git a/pyproject.toml b/pyproject.toml index 94771fb..6b2682d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,10 +11,12 @@ dependencies = [ "pyyaml>=6.0", "requests>=2.31", "openai>=1.0", - "psycopg2>=2.9", ] [project.optional-dependencies] +community = [ + "psycopg2>=2.9", +] manage = [ "platformdirs>=4.0", "typer[all]>=0.12",