cycls 0.0.2.56__tar.gz → 0.0.2.57__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.
- {cycls-0.0.2.56 → cycls-0.0.2.57}/PKG-INFO +1 -1
- {cycls-0.0.2.56 → cycls-0.0.2.57}/cycls/sdk.py +5 -2
- {cycls-0.0.2.56 → cycls-0.0.2.57}/cycls/web.py +3 -1
- {cycls-0.0.2.56 → cycls-0.0.2.57}/pyproject.toml +1 -1
- {cycls-0.0.2.56 → cycls-0.0.2.57}/README.md +0 -0
- {cycls-0.0.2.56 → cycls-0.0.2.57}/cycls/__init__.py +0 -0
- {cycls-0.0.2.56 → cycls-0.0.2.57}/cycls/runtime.py +0 -0
- {cycls-0.0.2.56 → cycls-0.0.2.57}/cycls/theme/assets/index-C3BC5odN.css +0 -0
- {cycls-0.0.2.56 → cycls-0.0.2.57}/cycls/theme/assets/index-CabnsD7I.js +0 -0
- {cycls-0.0.2.56 → cycls-0.0.2.57}/cycls/theme/index.html +0 -0
|
@@ -25,11 +25,14 @@ class Agent:
|
|
|
25
25
|
|
|
26
26
|
self.registered_functions = []
|
|
27
27
|
|
|
28
|
-
def __call__(self, name=None, header="", intro="", title="", domain=None, auth=False, tier="free"):
|
|
28
|
+
def __call__(self, name=None, header="", intro="", title="", domain=None, auth=False, tier="free", analytics=False):
|
|
29
|
+
if tier=="cycls_pass":
|
|
30
|
+
auth=True
|
|
31
|
+
analytics=True
|
|
29
32
|
def decorator(f):
|
|
30
33
|
self.registered_functions.append({
|
|
31
34
|
"func": f,
|
|
32
|
-
"config": ["theme", False, self.org, self.api_token, header, intro, title, auth, tier],
|
|
35
|
+
"config": ["theme", False, self.org, self.api_token, header, intro, title, auth, tier, analytics],
|
|
33
36
|
# "name": name,
|
|
34
37
|
"name": name or (f.__name__).replace('_', '-'),
|
|
35
38
|
"domain": domain or f"{name}.cycls.ai",
|
|
@@ -49,7 +49,7 @@ XwIDAQAB
|
|
|
49
49
|
-----END PUBLIC KEY-----
|
|
50
50
|
"""
|
|
51
51
|
|
|
52
|
-
def web(func, public_path="", prod=False, org=None, api_token=None, header="", intro="", title="", auth=
|
|
52
|
+
def web(func, public_path="", prod=False, org=None, api_token=None, header="", intro="", title="", auth=False, tier="", analytics=False): # API auth
|
|
53
53
|
from fastapi import FastAPI, Request, HTTPException, status, Depends
|
|
54
54
|
from fastapi.responses import StreamingResponse , HTMLResponse
|
|
55
55
|
from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials
|
|
@@ -72,6 +72,7 @@ def web(func, public_path="", prod=False, org=None, api_token=None, header="", i
|
|
|
72
72
|
prod: bool
|
|
73
73
|
auth: bool
|
|
74
74
|
tier: str
|
|
75
|
+
analytics: bool
|
|
75
76
|
org: Optional[str]
|
|
76
77
|
pk_live: str
|
|
77
78
|
pk_test: str
|
|
@@ -116,6 +117,7 @@ def web(func, public_path="", prod=False, org=None, api_token=None, header="", i
|
|
|
116
117
|
prod=prod,
|
|
117
118
|
auth=auth,
|
|
118
119
|
tier=tier,
|
|
120
|
+
analytics=analytics,
|
|
119
121
|
org=org,
|
|
120
122
|
pk_live="pk_live_Y2xlcmsuY3ljbHMuYWkk",
|
|
121
123
|
pk_test="pk_test_c2VsZWN0LXNsb3RoLTU4LmNsZXJrLmFjY291bnRzLmRldiQ"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|