cycls 0.0.2.101__py3-none-any.whl → 0.0.2.103__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.
cycls/app.py CHANGED
@@ -15,13 +15,12 @@ class App(Function):
15
15
 
16
16
  def __init__(self, func, name, theme="default", pip=None, apt=None, copy=None, copy_public=None,
17
17
  auth=False, org=None, header=None, intro=None, title=None, plan="free", analytics=False,
18
- state=False, memory="1Gi"):
18
+ memory="1Gi"):
19
19
  if theme not in THEMES:
20
20
  raise ValueError(f"Unknown theme: {theme}. Available: {THEMES}")
21
21
  self.user_func = func
22
22
  self.theme = theme
23
23
  self.copy_public = copy_public or []
24
- self.state = state
25
24
  self.memory = memory
26
25
 
27
26
  self.config = Config(
@@ -32,7 +31,6 @@ class App(Function):
32
31
  plan=plan,
33
32
  analytics=analytics,
34
33
  org=org,
35
- state=state,
36
34
  )
37
35
 
38
36
  # Build files dict for Function (theme is inside cycls/)
@@ -43,7 +41,7 @@ class App(Function):
43
41
  super().__init__(
44
42
  func=func,
45
43
  name=name,
46
- pip=["fastapi[standard]", "pyjwt", "cryptography", "uvicorn", "python-dotenv", "docker", "agentfs-sdk", "pyturso==0.4.0rc17", *(pip or [])],
44
+ pip=["fastapi[standard]", "pyjwt", "cryptography", "uvicorn", "python-dotenv", "docker", *(pip or [])],
47
45
  apt=apt,
48
46
  copy=files,
49
47
  base_url=_get_base_url(),
cycls/function.py CHANGED
@@ -9,6 +9,9 @@ import sys
9
9
  import shutil
10
10
  from pathlib import Path
11
11
  import tarfile
12
+ from dotenv import load_dotenv
13
+
14
+ load_dotenv()
12
15
 
13
16
  os.environ["DOCKER_BUILDKIT"] = "1"
14
17
 
@@ -0,0 +1 @@
1
+ import{c as p,g as _}from"./index-qcHL6SRo.js";function x(u,m){for(var l=0;l<m.length;l++){const r=m[l];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in u)){const c=Object.getOwnPropertyDescriptor(r,s);c&&Object.defineProperty(u,s,c.get?c:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}var v={exports:{}},F=v.exports,E;function O(){return E||(E=1,(function(u,m){(function(l,r){r()})(F,function(){function l(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function r(e,t,i){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){d(n.response,t,i)},n.onerror=function(){console.error("could not download file")},n.send()}function s(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function c(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof p=="object"&&p.global===p?p:void 0,b=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),d=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!b?function(e,t,i){var n=a.URL||a.webkitURL,o=document.createElement("a");t=t||e.name||"download",o.download=t,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin===location.origin?c(o):s(o.href)?r(e,t,i):c(o,o.target="_blank")):(o.href=n.createObjectURL(e),setTimeout(function(){n.revokeObjectURL(o.href)},4e4),setTimeout(function(){c(o)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,i){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(l(e,i),t);else if(s(e))r(e,t,i);else{var n=document.createElement("a");n.href=e,n.target="_blank",setTimeout(function(){c(n)})}}:function(e,t,i,n){if(n=n||open("","_blank"),n&&(n.document.title=n.document.body.innerText="downloading..."),typeof e=="string")return r(e,t,i);var o=e.type==="application/octet-stream",S=/constructor/i.test(a.HTMLElement)||a.safari,h=/CriOS\/[\d]+/.test(navigator.userAgent);if((h||o&&S||b)&&typeof FileReader<"u"){var w=new FileReader;w.onloadend=function(){var f=w.result;f=h?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=f:location=f,n=null},w.readAsDataURL(e)}else{var j=a.URL||a.webkitURL,y=j.createObjectURL(e);n?n.location=y:location.href=y,n=null,setTimeout(function(){j.revokeObjectURL(y)},4e4)}});a.saveAs=d.saveAs=d,u.exports=d})})(v)),v.exports}var g=O();const R=_(g),L=x({__proto__:null,default:R},[g]);export{L as F};