dfcode-remote 0.1.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/PKG-INFO +2 -1
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote/__init__.py +1 -1
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote/utils/config.py +26 -3
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote.egg-info/PKG-INFO +2 -1
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote.egg-info/requires.txt +1 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/pyproject.toml +2 -1
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/README.md +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote/__main__.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote/cli.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote/dfcode_client/__init__.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote/dfcode_client/client.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote/dfcode_client/sse.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote/dfcode_client/types.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote/lark_client/__init__.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote/lark_client/bot.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote/lark_client/card_builder.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote/lark_client/card_service.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote/lark_client/event_listener.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote/lark_client/handler.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote/utils/__init__.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote/utils/markdown.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote/utils/persistence.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote.egg-info/SOURCES.txt +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote.egg-info/dependency_links.txt +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote.egg-info/entry_points.txt +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/dfcode_remote.egg-info/top_level.txt +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/setup.cfg +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/tests/test_card_builder.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/tests/test_card_service.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/tests/test_dfcode_client.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/tests/test_event_listener.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/tests/test_handler.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/tests/test_markdown.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/tests/test_persistence.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/tests/test_sse.py +0 -0
- {dfcode_remote-0.1.0 → dfcode_remote-0.2.1}/tests/test_types.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dfcode-remote
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Bridge service connecting Feishu (Lark) to dfcode REST API
|
|
5
5
|
Author-email: DFcode Team <bw4199579+dfcode@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -21,6 +21,7 @@ Description-Content-Type: text/markdown
|
|
|
21
21
|
Requires-Dist: lark-oapi>=1.3.0
|
|
22
22
|
Requires-Dist: httpx>=0.27.0
|
|
23
23
|
Requires-Dist: python-dotenv>=1.0.0
|
|
24
|
+
Requires-Dist: python-socks[asyncio]>=2.0.0
|
|
24
25
|
|
|
25
26
|
# DfCode Remote — Feishu Bridge
|
|
26
27
|
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
import os
|
|
2
|
+
import sys
|
|
2
3
|
from dataclasses import dataclass, field
|
|
4
|
+
from pathlib import Path
|
|
3
5
|
|
|
4
6
|
from dotenv import load_dotenv
|
|
5
7
|
|
|
6
8
|
|
|
9
|
+
def _config_dir() -> Path:
|
|
10
|
+
"""Return platform-appropriate config directory."""
|
|
11
|
+
if sys.platform == "win32":
|
|
12
|
+
base = Path(os.environ.get("APPDATA", Path.home() / "AppData" / "Roaming"))
|
|
13
|
+
else:
|
|
14
|
+
base = Path(os.environ.get("XDG_CONFIG_HOME", Path.home() / ".config"))
|
|
15
|
+
return base / "dfcode-remote"
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
CONFIG_DIR = _config_dir()
|
|
19
|
+
|
|
20
|
+
|
|
7
21
|
@dataclass
|
|
8
22
|
class Config:
|
|
9
23
|
"""Application configuration loaded from .env and environment variables."""
|
|
@@ -19,11 +33,20 @@ class Config:
|
|
|
19
33
|
|
|
20
34
|
@staticmethod
|
|
21
35
|
def load() -> "Config":
|
|
22
|
-
"""Load config from .env
|
|
36
|
+
"""Load config from .env files and environment variables.
|
|
23
37
|
|
|
24
|
-
|
|
38
|
+
Priority (highest to lowest):
|
|
39
|
+
1. Environment variables
|
|
40
|
+
2. .env in current working directory
|
|
41
|
+
3. ~/.config/dfcode-remote/.env
|
|
25
42
|
"""
|
|
26
|
-
|
|
43
|
+
# Load global config first (lower priority)
|
|
44
|
+
global_env = CONFIG_DIR / ".env"
|
|
45
|
+
if global_env.exists():
|
|
46
|
+
load_dotenv(global_env)
|
|
47
|
+
|
|
48
|
+
# Load local .env (overrides global)
|
|
49
|
+
load_dotenv(override=True)
|
|
27
50
|
|
|
28
51
|
raw_users = os.getenv("ALLOWED_USERS", "")
|
|
29
52
|
allowed = [u.strip() for u in raw_users.split(",") if u.strip()]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dfcode-remote
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Bridge service connecting Feishu (Lark) to dfcode REST API
|
|
5
5
|
Author-email: DFcode Team <bw4199579+dfcode@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -21,6 +21,7 @@ Description-Content-Type: text/markdown
|
|
|
21
21
|
Requires-Dist: lark-oapi>=1.3.0
|
|
22
22
|
Requires-Dist: httpx>=0.27.0
|
|
23
23
|
Requires-Dist: python-dotenv>=1.0.0
|
|
24
|
+
Requires-Dist: python-socks[asyncio]>=2.0.0
|
|
24
25
|
|
|
25
26
|
# DfCode Remote — Feishu Bridge
|
|
26
27
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "dfcode-remote"
|
|
3
|
-
version = "0.1
|
|
3
|
+
version = "0.2.1"
|
|
4
4
|
description = "Bridge service connecting Feishu (Lark) to dfcode REST API"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -24,6 +24,7 @@ dependencies = [
|
|
|
24
24
|
"lark-oapi>=1.3.0",
|
|
25
25
|
"httpx>=0.27.0",
|
|
26
26
|
"python-dotenv>=1.0.0",
|
|
27
|
+
"python-socks[asyncio]>=2.0.0",
|
|
27
28
|
]
|
|
28
29
|
|
|
29
30
|
[project.scripts]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|