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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cycls
3
- Version: 0.0.2.56
3
+ Version: 0.0.2.57
4
4
  Summary: Cycls SDK
5
5
  Author: Mohammed J. AlRujayi
6
6
  Author-email: mj@cycls.com
@@ -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=True, tier=""): # API 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"
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "cycls"
3
- version = "0.0.2.56"
3
+ version = "0.0.2.57"
4
4
 
5
5
  packages = [{ include = "cycls" }]
6
6
  include = ["cycls/theme/**/*"]
File without changes
File without changes
File without changes