DeepFabric 4.6.0__py3-none-any.whl → 4.7.0__py3-none-any.whl
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.
- deepfabric/auth.py +8 -4
- {deepfabric-4.6.0.dist-info → deepfabric-4.7.0.dist-info}/METADATA +1 -1
- {deepfabric-4.6.0.dist-info → deepfabric-4.7.0.dist-info}/RECORD +6 -6
- {deepfabric-4.6.0.dist-info → deepfabric-4.7.0.dist-info}/WHEEL +0 -0
- {deepfabric-4.6.0.dist-info → deepfabric-4.7.0.dist-info}/entry_points.txt +0 -0
- {deepfabric-4.6.0.dist-info → deepfabric-4.7.0.dist-info}/licenses/LICENSE +0 -0
deepfabric/auth.py
CHANGED
|
@@ -60,13 +60,17 @@ def clear_tokens() -> None:
|
|
|
60
60
|
|
|
61
61
|
|
|
62
62
|
def is_authenticated() -> bool:
|
|
63
|
-
"""Check if user is authenticated."""
|
|
64
|
-
|
|
65
|
-
return bool(config.get("access_token") or config.get("api_key"))
|
|
63
|
+
"""Check if user is authenticated via API key or OAuth token."""
|
|
64
|
+
return bool(get_auth_token())
|
|
66
65
|
|
|
67
66
|
|
|
68
67
|
def get_auth_token() -> str | None:
|
|
69
|
-
"""Get authentication token (API key or access token)."""
|
|
68
|
+
"""Get authentication token (API key from env, or stored API key/access token)."""
|
|
69
|
+
# Check environment variable first
|
|
70
|
+
env_api_key = os.getenv("DEEPFABRIC_API_KEY")
|
|
71
|
+
if env_api_key:
|
|
72
|
+
return env_api_key
|
|
73
|
+
# Then check stored config
|
|
70
74
|
config = get_config()
|
|
71
75
|
return config.get("api_key") or config.get("access_token")
|
|
72
76
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
deepfabric/__init__.py,sha256=DA4DT1nmF7VjQ00IA_8J_kSlqGYrK2EvP5H4XPzuKoA,1690
|
|
2
2
|
deepfabric/__main__.py,sha256=Ojx6VFnAWx4wY52VehsWhW85IaEmPb8FP_sGvOk628g,113
|
|
3
|
-
deepfabric/auth.py,sha256=
|
|
3
|
+
deepfabric/auth.py,sha256=7UEvk84XPx7wiXj0QfhIH_MJ5BlI7wQHodwgd4LPO80,12977
|
|
4
4
|
deepfabric/builders.py,sha256=XKlKsAhsed2_M_uHft-VB-n8T1ZhAbIo_7XXc2mE3Ug,11503
|
|
5
5
|
deepfabric/builders_agent.py,sha256=7xaXVNzmW_vBDkxJNKR_9HveljrdljwDAFx3iu-L_-M,48468
|
|
6
6
|
deepfabric/cli.py,sha256=gf7HoXlLn-8SZHHmpNWI7dwXvv_VCzu7wCQraOJkKsc,51236
|
|
@@ -69,8 +69,8 @@ deepfabric/training/api_key_prompt.py,sha256=bzcdzeK6ql_8Vz0cbR2vmxxtMRNRFpzYAJx
|
|
|
69
69
|
deepfabric/training/callback.py,sha256=vYh7nnCNf3xhbJEamWBKNXW4T7XNazXvmRqEkFyIwXI,13045
|
|
70
70
|
deepfabric/training/dataset_utils.py,sha256=klx8DoawEwuMigBDP-RpMAfe7FvYxRbhj599MErxBr4,7313
|
|
71
71
|
deepfabric/training/metrics_sender.py,sha256=_x0Has8ZR8ehXsdmv3nJbRDml5ioju4hZFv5ndsldpQ,10830
|
|
72
|
-
deepfabric-4.
|
|
73
|
-
deepfabric-4.
|
|
74
|
-
deepfabric-4.
|
|
75
|
-
deepfabric-4.
|
|
76
|
-
deepfabric-4.
|
|
72
|
+
deepfabric-4.7.0.dist-info/METADATA,sha256=7lawo4KwJmT8TBJx4pxdHZXsVyMBKtDajxM8No65o6I,20423
|
|
73
|
+
deepfabric-4.7.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
74
|
+
deepfabric-4.7.0.dist-info/entry_points.txt,sha256=zatevils13hfs8x29_vmUyivQ6rTtq7hE2RBusZw1Fo,50
|
|
75
|
+
deepfabric-4.7.0.dist-info/licenses/LICENSE,sha256=-qRt8wmrhQ9aMf7KhmZXc2vrTETYZF-6_T1KCeUhvHY,11340
|
|
76
|
+
deepfabric-4.7.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|