flet-web 0.29.0.dev4983__py3-none-any.whl → 0.29.0.dev5035__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.
Potentially problematic release.
This version of flet-web might be problematic. Click here for more details.
- flet_web/version.py +1 -1
- flet_web/web/flutter.js.map +7 -0
- flet_web/web/flutter_bootstrap.js +2 -2
- flet_web/web/flutter_service_worker.js +2 -2
- flet_web/web/main.dart.js +1 -1
- flet_web/web/pyodide/ffi.d.ts +1118 -0
- flet_web/web/pyodide/package.json +137 -0
- flet_web/web/pyodide/pyodide-lock.json +1 -0
- flet_web/web/pyodide/pyodide.asm.js +17 -0
- flet_web/web/pyodide/pyodide.asm.wasm +0 -0
- flet_web/web/pyodide/pyodide.d.ts +1630 -0
- flet_web/web/pyodide/pyodide.js +6 -0
- flet_web/web/pyodide/pyodide.mjs +4 -0
- flet_web/web/pyodide/python_stdlib.zip +0 -0
- flet_web-0.29.0.dev5035.dist-info/METADATA +18 -0
- {flet_web-0.29.0.dev4983.dist-info → flet_web-0.29.0.dev5035.dist-info}/RECORD +27 -18
- {flet_web-0.29.0.dev4983.dist-info → flet_web-0.29.0.dev5035.dist-info}/WHEEL +2 -1
- flet_web-0.29.0.dev5035.dist-info/top_level.txt +1 -0
- flet_web/fastapi/README.md +0 -146
- flet_web/web/.last_build_id +0 -1
- flet_web-0.29.0.dev4983.dist-info/METADATA +0 -26
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";var loadPyodide=(()=>{var ne=Object.create;var F=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var ie=Object.getOwnPropertyNames;var oe=Object.getPrototypeOf,ae=Object.prototype.hasOwnProperty;var s=(e,t)=>F(e,"name",{value:t,configurable:!0}),p=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,i)=>(typeof require<"u"?require:t)[i]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var se=(e,t)=>{for(var i in t)F(e,i,{get:t[i],enumerable:!0})},$=(e,t,i,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of ie(t))!ae.call(e,a)&&a!==i&&F(e,a,{get:()=>t[a],enumerable:!(r=re(t,a))||r.enumerable});return e};var b=(e,t,i)=>(i=e!=null?ne(oe(e)):{},$(t||!e||!e.__esModule?F(i,"default",{value:e,enumerable:!0}):i,e)),ce=e=>$(F({},"__esModule",{value:!0}),e);var Fe={};se(Fe,{loadPyodide:()=>B,version:()=>x});function le(e){return!isNaN(parseFloat(e))&&isFinite(e)}s(le,"_isNumber");function w(e){return e.charAt(0).toUpperCase()+e.substring(1)}s(w,"_capitalize");function L(e){return function(){return this[e]}}s(L,"_getter");var _=["isConstructor","isEval","isNative","isToplevel"],I=["columnNumber","lineNumber"],P=["fileName","functionName","source"],de=["args"],ue=["evalOrigin"],O=_.concat(I,P,de,ue);function g(e){if(e)for(var t=0;t<O.length;t++)e[O[t]]!==void 0&&this["set"+w(O[t])](e[O[t]])}s(g,"StackFrame");g.prototype={getArgs:function(){return this.args},setArgs:function(e){if(Object.prototype.toString.call(e)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof g)this.evalOrigin=e;else if(e instanceof Object)this.evalOrigin=new g(e);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var e=this.getFileName()||"",t=this.getLineNumber()||"",i=this.getColumnNumber()||"",r=this.getFunctionName()||"";return this.getIsEval()?e?"[eval] ("+e+":"+t+":"+i+")":"[eval]:"+t+":"+i:r?r+" ("+e+":"+t+":"+i+")":e+":"+t+":"+i}};g.fromString=s(function(t){var i=t.indexOf("("),r=t.lastIndexOf(")"),a=t.substring(0,i),n=t.substring(i+1,r).split(","),o=t.substring(r+1);if(o.indexOf("@")===0)var c=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(o,""),l=c[1],d=c[2],u=c[3];return new g({functionName:a,args:n||void 0,fileName:l,lineNumber:d||void 0,columnNumber:u||void 0})},"StackFrame$$fromString");for(h=0;h<_.length;h++)g.prototype["get"+w(_[h])]=L(_[h]),g.prototype["set"+w(_[h])]=function(e){return function(t){this[e]=!!t}}(_[h]);var h;for(E=0;E<I.length;E++)g.prototype["get"+w(I[E])]=L(I[E]),g.prototype["set"+w(I[E])]=function(e){return function(t){if(!le(t))throw new TypeError(e+" must be a Number");this[e]=Number(t)}}(I[E]);var E;for(S=0;S<P.length;S++)g.prototype["get"+w(P[S])]=L(P[S]),g.prototype["set"+w(P[S])]=function(e){return function(t){this[e]=String(t)}}(P[S]);var S,A=g;function fe(){var e=/^\s*at .*(\S+:\d+|\(native\))/m,t=/^(eval@)?(\[native code])?$/;return{parse:s(function(r){if(r.stack&&r.stack.match(e))return this.parseV8OrIE(r);if(r.stack)return this.parseFFOrSafari(r);throw new Error("Cannot parse given Error object")},"ErrorStackParser$$parse"),extractLocation:s(function(r){if(r.indexOf(":")===-1)return[r];var a=/(.+?)(?::(\d+))?(?::(\d+))?$/,n=a.exec(r.replace(/[()]/g,""));return[n[1],n[2]||void 0,n[3]||void 0]},"ErrorStackParser$$extractLocation"),parseV8OrIE:s(function(r){var a=r.stack.split(`
|
|
2
|
+
`).filter(function(n){return!!n.match(e)},this);return a.map(function(n){n.indexOf("(eval ")>-1&&(n=n.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var o=n.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),c=o.match(/ (\(.+\)$)/);o=c?o.replace(c[0],""):o;var l=this.extractLocation(c?c[1]:o),d=c&&o||void 0,u=["eval","<anonymous>"].indexOf(l[0])>-1?void 0:l[0];return new A({functionName:d,fileName:u,lineNumber:l[1],columnNumber:l[2],source:n})},this)},"ErrorStackParser$$parseV8OrIE"),parseFFOrSafari:s(function(r){var a=r.stack.split(`
|
|
3
|
+
`).filter(function(n){return!n.match(t)},this);return a.map(function(n){if(n.indexOf(" > eval")>-1&&(n=n.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),n.indexOf("@")===-1&&n.indexOf(":")===-1)return new A({functionName:n});var o=/((.*".+"[^@]*)?[^@]*)(?:@)/,c=n.match(o),l=c&&c[1]?c[1]:void 0,d=this.extractLocation(n.replace(o,""));return new A({functionName:l,fileName:d[0],lineNumber:d[1],columnNumber:d[2],source:n})},this)},"ErrorStackParser$$parseFFOrSafari")}}s(fe,"ErrorStackParser");var me=new fe;var j=me;var y=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&!process.browser,T=y&&typeof module<"u"&&typeof module.exports<"u"&&typeof p<"u"&&typeof __dirname<"u",H=y&&!T,Le=typeof globalThis.Bun<"u",pe=typeof Deno<"u",z=!y&&!pe,V=z&&typeof window=="object"&&typeof document=="object"&&typeof document.createElement=="function"&&"sessionStorage"in window&&typeof importScripts!="function",q=z&&typeof importScripts=="function"&&typeof self=="object",Te=typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Chrome")==-1&&navigator.userAgent.indexOf("Safari")>-1;var K,U,Y,J,M;async function C(){if(!y||(K=(await import(/* webpackIgnore */"node:url")).default,J=await import(/* webpackIgnore */"node:fs"),M=await import(/* webpackIgnore */"node:fs/promises"),Y=(await import(/* webpackIgnore */"node:vm")).default,U=await import(/* webpackIgnore */"node:path"),W=U.sep,typeof p<"u"))return;let e=J,t=await import(/* webpackIgnore */"node:crypto"),i=await import(/* webpackIgnore */"ws"),r=await import(/* webpackIgnore */"node:child_process"),a={fs:e,crypto:t,ws:i,child_process:r};globalThis.require=function(n){return a[n]}}s(C,"initNodeModules");function ge(e,t){return U.resolve(t||".",e)}s(ge,"node_resolvePath");function ye(e,t){return t===void 0&&(t=location),new URL(e,t).toString()}s(ye,"browser_resolvePath");var D;y?D=ge:D=ye;var W;y||(W="/");function be(e,t){return e.startsWith("file://")&&(e=e.slice(7)),e.includes("://")?{response:fetch(e)}:{binary:M.readFile(e).then(i=>new Uint8Array(i.buffer,i.byteOffset,i.byteLength))}}s(be,"node_getBinaryResponse");function ve(e,t){let i=new URL(e,location);return{response:fetch(i,t?{integrity:t}:{})}}s(ve,"browser_getBinaryResponse");var k;y?k=be:k=ve;async function G(e,t){let{response:i,binary:r}=k(e,t);if(r)return r;let a=await i;if(!a.ok)throw new Error(`Failed to load '${e}': request failed.`);return new Uint8Array(await a.arrayBuffer())}s(G,"loadBinaryFile");var R;if(V)R=s(async e=>await import(/* webpackIgnore */e),"loadScript");else if(q)R=s(async e=>{try{globalThis.importScripts(e)}catch(t){if(t instanceof TypeError)await import(/* webpackIgnore */e);else throw t}},"loadScript");else if(y)R=he;else throw new Error("Cannot determine runtime environment");async function he(e){e.startsWith("file://")&&(e=e.slice(7)),e.includes("://")?Y.runInThisContext(await(await fetch(e)).text()):await import(/* webpackIgnore */K.pathToFileURL(e).href)}s(he,"nodeLoadScript");async function X(e){if(y){await C();let t=await M.readFile(e,{encoding:"utf8"});return JSON.parse(t)}else return await(await fetch(e)).json()}s(X,"loadLockFile");async function Q(){if(T)return __dirname;let e;try{throw new Error}catch(r){e=r}let t=j.parse(e)[0].fileName;if(y&&!t.startsWith("file://")&&(t=`file://${t}`),H){let r=await import(/* webpackIgnore */"node:path");return(await import(/* webpackIgnore */"node:url")).fileURLToPath(r.dirname(t))}let i=t.lastIndexOf(W);if(i===-1)throw new Error("Could not extract indexURL path from pyodide module location");return t.slice(0,i)}s(Q,"calculateDirname");function Z(e){let t=e.FS,i=e.FS.filesystems.MEMFS,r=e.PATH,a={DIR_MODE:16895,FILE_MODE:33279,mount:function(n){if(!n.opts.fileSystemHandle)throw new Error("opts.fileSystemHandle is required");return i.mount.apply(null,arguments)},syncfs:async(n,o,c)=>{try{let l=a.getLocalSet(n),d=await a.getRemoteSet(n),u=o?d:l,m=o?l:d;await a.reconcile(n,u,m),c(null)}catch(l){c(l)}},getLocalSet:n=>{let o=Object.create(null);function c(u){return u!=="."&&u!==".."}s(c,"isRealDir");function l(u){return m=>r.join2(u,m)}s(l,"toAbsolute");let d=t.readdir(n.mountpoint).filter(c).map(l(n.mountpoint));for(;d.length;){let u=d.pop(),m=t.stat(u);t.isDir(m.mode)&&d.push.apply(d,t.readdir(u).filter(c).map(l(u))),o[u]={timestamp:m.mtime,mode:m.mode}}return{type:"local",entries:o}},getRemoteSet:async n=>{let o=Object.create(null),c=await Ee(n.opts.fileSystemHandle);for(let[l,d]of c)l!=="."&&(o[r.join2(n.mountpoint,l)]={timestamp:d.kind==="file"?new Date((await d.getFile()).lastModified):new Date,mode:d.kind==="file"?a.FILE_MODE:a.DIR_MODE});return{type:"remote",entries:o,handles:c}},loadLocalEntry:n=>{let c=t.lookupPath(n).node,l=t.stat(n);if(t.isDir(l.mode))return{timestamp:l.mtime,mode:l.mode};if(t.isFile(l.mode))return c.contents=i.getFileDataAsTypedArray(c),{timestamp:l.mtime,mode:l.mode,contents:c.contents};throw new Error("node type not supported")},storeLocalEntry:(n,o)=>{if(t.isDir(o.mode))t.mkdirTree(n,o.mode);else if(t.isFile(o.mode))t.writeFile(n,o.contents,{canOwn:!0});else throw new Error("node type not supported");t.chmod(n,o.mode),t.utime(n,o.timestamp,o.timestamp)},removeLocalEntry:n=>{var o=t.stat(n);t.isDir(o.mode)?t.rmdir(n):t.isFile(o.mode)&&t.unlink(n)},loadRemoteEntry:async n=>{if(n.kind==="file"){let o=await n.getFile();return{contents:new Uint8Array(await o.arrayBuffer()),mode:a.FILE_MODE,timestamp:new Date(o.lastModified)}}else{if(n.kind==="directory")return{mode:a.DIR_MODE,timestamp:new Date};throw new Error("unknown kind: "+n.kind)}},storeRemoteEntry:async(n,o,c)=>{let l=n.get(r.dirname(o)),d=t.isFile(c.mode)?await l.getFileHandle(r.basename(o),{create:!0}):await l.getDirectoryHandle(r.basename(o),{create:!0});if(d.kind==="file"){let u=await d.createWritable();await u.write(c.contents),await u.close()}n.set(o,d)},removeRemoteEntry:async(n,o)=>{await n.get(r.dirname(o)).removeEntry(r.basename(o)),n.delete(o)},reconcile:async(n,o,c)=>{let l=0,d=[];Object.keys(o.entries).forEach(function(f){let v=o.entries[f],N=c.entries[f];(!N||t.isFile(v.mode)&&v.timestamp.getTime()>N.timestamp.getTime())&&(d.push(f),l++)}),d.sort();let u=[];if(Object.keys(c.entries).forEach(function(f){o.entries[f]||(u.push(f),l++)}),u.sort().reverse(),!l)return;let m=o.type==="remote"?o.handles:c.handles;for(let f of d){let v=r.normalize(f.replace(n.mountpoint,"/")).substring(1);if(c.type==="local"){let N=m.get(v),te=await a.loadRemoteEntry(N);a.storeLocalEntry(f,te)}else{let N=a.loadLocalEntry(f);await a.storeRemoteEntry(m,v,N)}}for(let f of u)if(c.type==="local")a.removeLocalEntry(f);else{let v=r.normalize(f.replace(n.mountpoint,"/")).substring(1);await a.removeRemoteEntry(m,v)}}};e.FS.filesystems.NATIVEFS_ASYNC=a}s(Z,"initializeNativeFS");var Ee=s(async e=>{let t=[];async function i(a){for await(let n of a.values())t.push(n),n.kind==="directory"&&await i(n)}s(i,"collect"),await i(e);let r=new Map;r.set(".",e);for(let a of t){let n=(await e.resolve(a)).join("/");r.set(n,a)}return r},"getFsHandles");function ee(e){let t={noImageDecoding:!0,noAudioDecoding:!0,noWasmDecoding:!1,preRun:Ie(e),quit(i,r){throw t.exited={status:i,toThrow:r},r},print:e.stdout,printErr:e.stderr,thisProgram:e._sysExecutable,arguments:e.args,API:{config:e},locateFile:i=>e.indexURL+i,instantiateWasm:Pe(e.indexURL)};return t}s(ee,"createSettings");function Se(e){return function(t){let i="/";try{t.FS.mkdirTree(e)}catch(r){console.error(`Error occurred while making a home directory '${e}':`),console.error(r),console.error(`Using '${i}' for a home directory instead`),e=i}t.FS.chdir(e)}}s(Se,"createHomeDirectory");function we(e){return function(t){Object.assign(t.ENV,e)}}s(we,"setEnvironment");function Ne(e){return e?[async t=>{t.addRunDependency("fsInitHook");try{await e(t.FS,{sitePackages:t.API.sitePackages})}finally{t.removeRunDependency("fsInitHook")}}]:[]}s(Ne,"callFsInitHook");function _e(e){let t=G(e);return async i=>{let r=i._py_version_major(),a=i._py_version_minor();i.FS.mkdirTree("/lib"),i.API.sitePackages=`/lib/python${r}.${a}/site-packages`,i.FS.mkdirTree(i.API.sitePackages),i.addRunDependency("install-stdlib");try{let n=await t;i.FS.writeFile(`/lib/python${r}${a}.zip`,n)}catch(n){console.error("Error occurred while installing the standard library:"),console.error(n)}finally{i.removeRunDependency("install-stdlib")}}}s(_e,"installStdlib");function Ie(e){let t;return e.stdLibURL!=null?t=e.stdLibURL:t=e.indexURL+"python_stdlib.zip",[...Ne(e.fsInit),_e(t),Se(e.env.HOME),we(e.env),Z]}s(Ie,"getFileSystemInitializationFuncs");function Pe(e){if(typeof WasmOffsetConverter<"u")return;let{binary:t,response:i}=k(e+"pyodide.asm.wasm");return function(r,a){return async function(){try{let n;i?n=await WebAssembly.instantiateStreaming(i,r):n=await WebAssembly.instantiate(await t,r);let{instance:o,module:c}=n;a(o,c)}catch(n){console.warn("wasm instantiation failed!"),console.warn(n)}}(),{}}}s(Pe,"getInstantiateWasmFunc");var x="0.27.5";async function B(e={}){var u,m;await C();let t=e.indexURL||await Q();t=D(t),t.endsWith("/")||(t+="/"),e.indexURL=t;let i={fullStdLib:!1,jsglobals:globalThis,stdin:globalThis.prompt?globalThis.prompt:void 0,lockFileURL:t+"pyodide-lock.json",args:[],env:{},packageCacheDir:t,packages:[],enableRunUntilComplete:!1,checkAPIVersion:!0,BUILD_ID:"bd0388b62e760f8ba04185eb443fec955f25434f49c7b951efe5b1f792dbe5d4"},r=Object.assign(i,e);(u=r.env).HOME??(u.HOME="/home/pyodide"),(m=r.env).PYTHONINSPECT??(m.PYTHONINSPECT="1");let a=ee(r),n=a.API;if(n.lockFilePromise=X(r.lockFileURL),typeof _createPyodideModule!="function"){let f=`${r.indexURL}pyodide.asm.js`;await R(f)}let o;if(e._loadSnapshot){let f=await e._loadSnapshot;ArrayBuffer.isView(f)?o=f:o=new Uint8Array(f),a.noInitialRun=!0,a.INITIAL_MEMORY=o.length}let c=await _createPyodideModule(a);if(a.exited)throw a.exited.toThrow;if(e.pyproxyToStringRepr&&n.setPyProxyToStringMethod(!0),n.version!==x&&r.checkAPIVersion)throw new Error(`Pyodide version does not match: '${x}' <==> '${n.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);c.locateFile=f=>{throw new Error("Didn't expect to load any more file_packager files!")};let l;o&&(l=n.restoreSnapshot(o));let d=n.finalizeBootstrap(l,e._snapshotDeserializer);return n.sys.path.insert(0,n.config.env.HOME),d.version.includes("dev")||n.setCdnUrl(`https://cdn.jsdelivr.net/pyodide/v${d.version}/full/`),n._pyodide.set_excepthook(),await n.packageIndexReady,n.initializeStreams(r.stdin,r.stdout,r.stderr),d}s(B,"loadPyodide");globalThis.loadPyodide=B;return ce(Fe);})();
|
|
4
|
+
try{Object.assign(exports,loadPyodide)}catch(_){}
|
|
5
|
+
globalThis.loadPyodide=loadPyodide.loadPyodide;
|
|
6
|
+
//# sourceMappingURL=pyodide.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var Q=Object.defineProperty;var s=(e,t)=>Q(e,"name",{value:t,configurable:!0}),R=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});function Z(e){return!isNaN(parseFloat(e))&&isFinite(e)}s(Z,"_isNumber");function E(e){return e.charAt(0).toUpperCase()+e.substring(1)}s(E,"_capitalize");function x(e){return function(){return this[e]}}s(x,"_getter");var w=["isConstructor","isEval","isNative","isToplevel"],N=["columnNumber","lineNumber"],_=["fileName","functionName","source"],ee=["args"],te=["evalOrigin"],P=w.concat(N,_,ee,te);function p(e){if(e)for(var t=0;t<P.length;t++)e[P[t]]!==void 0&&this["set"+E(P[t])](e[P[t]])}s(p,"StackFrame");p.prototype={getArgs:function(){return this.args},setArgs:function(e){if(Object.prototype.toString.call(e)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof p)this.evalOrigin=e;else if(e instanceof Object)this.evalOrigin=new p(e);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var e=this.getFileName()||"",t=this.getLineNumber()||"",o=this.getColumnNumber()||"",r=this.getFunctionName()||"";return this.getIsEval()?e?"[eval] ("+e+":"+t+":"+o+")":"[eval]:"+t+":"+o:r?r+" ("+e+":"+t+":"+o+")":e+":"+t+":"+o}};p.fromString=s(function(t){var o=t.indexOf("("),r=t.lastIndexOf(")"),a=t.substring(0,o),n=t.substring(o+1,r).split(","),i=t.substring(r+1);if(i.indexOf("@")===0)var c=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(i,""),l=c[1],d=c[2],u=c[3];return new p({functionName:a,args:n||void 0,fileName:l,lineNumber:d||void 0,columnNumber:u||void 0})},"StackFrame$$fromString");for(b=0;b<w.length;b++)p.prototype["get"+E(w[b])]=x(w[b]),p.prototype["set"+E(w[b])]=function(e){return function(t){this[e]=!!t}}(w[b]);var b;for(v=0;v<N.length;v++)p.prototype["get"+E(N[v])]=x(N[v]),p.prototype["set"+E(N[v])]=function(e){return function(t){if(!Z(t))throw new TypeError(e+" must be a Number");this[e]=Number(t)}}(N[v]);var v;for(h=0;h<_.length;h++)p.prototype["get"+E(_[h])]=x(_[h]),p.prototype["set"+E(_[h])]=function(e){return function(t){this[e]=String(t)}}(_[h]);var h,k=p;function ne(){var e=/^\s*at .*(\S+:\d+|\(native\))/m,t=/^(eval@)?(\[native code])?$/;return{parse:s(function(r){if(r.stack&&r.stack.match(e))return this.parseV8OrIE(r);if(r.stack)return this.parseFFOrSafari(r);throw new Error("Cannot parse given Error object")},"ErrorStackParser$$parse"),extractLocation:s(function(r){if(r.indexOf(":")===-1)return[r];var a=/(.+?)(?::(\d+))?(?::(\d+))?$/,n=a.exec(r.replace(/[()]/g,""));return[n[1],n[2]||void 0,n[3]||void 0]},"ErrorStackParser$$extractLocation"),parseV8OrIE:s(function(r){var a=r.stack.split(`
|
|
2
|
+
`).filter(function(n){return!!n.match(e)},this);return a.map(function(n){n.indexOf("(eval ")>-1&&(n=n.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var i=n.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),c=i.match(/ (\(.+\)$)/);i=c?i.replace(c[0],""):i;var l=this.extractLocation(c?c[1]:i),d=c&&i||void 0,u=["eval","<anonymous>"].indexOf(l[0])>-1?void 0:l[0];return new k({functionName:d,fileName:u,lineNumber:l[1],columnNumber:l[2],source:n})},this)},"ErrorStackParser$$parseV8OrIE"),parseFFOrSafari:s(function(r){var a=r.stack.split(`
|
|
3
|
+
`).filter(function(n){return!n.match(t)},this);return a.map(function(n){if(n.indexOf(" > eval")>-1&&(n=n.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),n.indexOf("@")===-1&&n.indexOf(":")===-1)return new k({functionName:n});var i=/((.*".+"[^@]*)?[^@]*)(?:@)/,c=n.match(i),l=c&&c[1]?c[1]:void 0,d=this.extractLocation(n.replace(i,""));return new k({functionName:l,fileName:d[0],lineNumber:d[1],columnNumber:d[2],source:n})},this)},"ErrorStackParser$$parseFFOrSafari")}}s(ne,"ErrorStackParser");var re=new ne;var C=re;var g=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&!process.browser,A=g&&typeof module<"u"&&typeof module.exports<"u"&&typeof R<"u"&&typeof __dirname<"u",W=g&&!A,Ne=typeof globalThis.Bun<"u",ie=typeof Deno<"u",B=!g&&!ie,$=B&&typeof window=="object"&&typeof document=="object"&&typeof document.createElement=="function"&&"sessionStorage"in window&&typeof importScripts!="function",j=B&&typeof importScripts=="function"&&typeof self=="object",_e=typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Chrome")==-1&&navigator.userAgent.indexOf("Safari")>-1;var z,D,V,H,L;async function T(){if(!g||(z=(await import("node:url")).default,H=await import("node:fs"),L=await import("node:fs/promises"),V=(await import("node:vm")).default,D=await import("node:path"),U=D.sep,typeof R<"u"))return;let e=H,t=await import("node:crypto"),o=await import("ws"),r=await import("node:child_process"),a={fs:e,crypto:t,ws:o,child_process:r};globalThis.require=function(n){return a[n]}}s(T,"initNodeModules");function oe(e,t){return D.resolve(t||".",e)}s(oe,"node_resolvePath");function ae(e,t){return t===void 0&&(t=location),new URL(e,t).toString()}s(ae,"browser_resolvePath");var O;g?O=oe:O=ae;var U;g||(U="/");function se(e,t){return e.startsWith("file://")&&(e=e.slice(7)),e.includes("://")?{response:fetch(e)}:{binary:L.readFile(e).then(o=>new Uint8Array(o.buffer,o.byteOffset,o.byteLength))}}s(se,"node_getBinaryResponse");function ce(e,t){let o=new URL(e,location);return{response:fetch(o,t?{integrity:t}:{})}}s(ce,"browser_getBinaryResponse");var F;g?F=se:F=ce;async function q(e,t){let{response:o,binary:r}=F(e,t);if(r)return r;let a=await o;if(!a.ok)throw new Error(`Failed to load '${e}': request failed.`);return new Uint8Array(await a.arrayBuffer())}s(q,"loadBinaryFile");var I;if($)I=s(async e=>await import(e),"loadScript");else if(j)I=s(async e=>{try{globalThis.importScripts(e)}catch(t){if(t instanceof TypeError)await import(e);else throw t}},"loadScript");else if(g)I=le;else throw new Error("Cannot determine runtime environment");async function le(e){e.startsWith("file://")&&(e=e.slice(7)),e.includes("://")?V.runInThisContext(await(await fetch(e)).text()):await import(z.pathToFileURL(e).href)}s(le,"nodeLoadScript");async function J(e){if(g){await T();let t=await L.readFile(e,{encoding:"utf8"});return JSON.parse(t)}else return await(await fetch(e)).json()}s(J,"loadLockFile");async function K(){if(A)return __dirname;let e;try{throw new Error}catch(r){e=r}let t=C.parse(e)[0].fileName;if(g&&!t.startsWith("file://")&&(t=`file://${t}`),W){let r=await import("node:path");return(await import("node:url")).fileURLToPath(r.dirname(t))}let o=t.lastIndexOf(U);if(o===-1)throw new Error("Could not extract indexURL path from pyodide module location");return t.slice(0,o)}s(K,"calculateDirname");function Y(e){let t=e.FS,o=e.FS.filesystems.MEMFS,r=e.PATH,a={DIR_MODE:16895,FILE_MODE:33279,mount:function(n){if(!n.opts.fileSystemHandle)throw new Error("opts.fileSystemHandle is required");return o.mount.apply(null,arguments)},syncfs:async(n,i,c)=>{try{let l=a.getLocalSet(n),d=await a.getRemoteSet(n),u=i?d:l,m=i?l:d;await a.reconcile(n,u,m),c(null)}catch(l){c(l)}},getLocalSet:n=>{let i=Object.create(null);function c(u){return u!=="."&&u!==".."}s(c,"isRealDir");function l(u){return m=>r.join2(u,m)}s(l,"toAbsolute");let d=t.readdir(n.mountpoint).filter(c).map(l(n.mountpoint));for(;d.length;){let u=d.pop(),m=t.stat(u);t.isDir(m.mode)&&d.push.apply(d,t.readdir(u).filter(c).map(l(u))),i[u]={timestamp:m.mtime,mode:m.mode}}return{type:"local",entries:i}},getRemoteSet:async n=>{let i=Object.create(null),c=await de(n.opts.fileSystemHandle);for(let[l,d]of c)l!=="."&&(i[r.join2(n.mountpoint,l)]={timestamp:d.kind==="file"?new Date((await d.getFile()).lastModified):new Date,mode:d.kind==="file"?a.FILE_MODE:a.DIR_MODE});return{type:"remote",entries:i,handles:c}},loadLocalEntry:n=>{let c=t.lookupPath(n).node,l=t.stat(n);if(t.isDir(l.mode))return{timestamp:l.mtime,mode:l.mode};if(t.isFile(l.mode))return c.contents=o.getFileDataAsTypedArray(c),{timestamp:l.mtime,mode:l.mode,contents:c.contents};throw new Error("node type not supported")},storeLocalEntry:(n,i)=>{if(t.isDir(i.mode))t.mkdirTree(n,i.mode);else if(t.isFile(i.mode))t.writeFile(n,i.contents,{canOwn:!0});else throw new Error("node type not supported");t.chmod(n,i.mode),t.utime(n,i.timestamp,i.timestamp)},removeLocalEntry:n=>{var i=t.stat(n);t.isDir(i.mode)?t.rmdir(n):t.isFile(i.mode)&&t.unlink(n)},loadRemoteEntry:async n=>{if(n.kind==="file"){let i=await n.getFile();return{contents:new Uint8Array(await i.arrayBuffer()),mode:a.FILE_MODE,timestamp:new Date(i.lastModified)}}else{if(n.kind==="directory")return{mode:a.DIR_MODE,timestamp:new Date};throw new Error("unknown kind: "+n.kind)}},storeRemoteEntry:async(n,i,c)=>{let l=n.get(r.dirname(i)),d=t.isFile(c.mode)?await l.getFileHandle(r.basename(i),{create:!0}):await l.getDirectoryHandle(r.basename(i),{create:!0});if(d.kind==="file"){let u=await d.createWritable();await u.write(c.contents),await u.close()}n.set(i,d)},removeRemoteEntry:async(n,i)=>{await n.get(r.dirname(i)).removeEntry(r.basename(i)),n.delete(i)},reconcile:async(n,i,c)=>{let l=0,d=[];Object.keys(i.entries).forEach(function(f){let y=i.entries[f],S=c.entries[f];(!S||t.isFile(y.mode)&&y.timestamp.getTime()>S.timestamp.getTime())&&(d.push(f),l++)}),d.sort();let u=[];if(Object.keys(c.entries).forEach(function(f){i.entries[f]||(u.push(f),l++)}),u.sort().reverse(),!l)return;let m=i.type==="remote"?i.handles:c.handles;for(let f of d){let y=r.normalize(f.replace(n.mountpoint,"/")).substring(1);if(c.type==="local"){let S=m.get(y),X=await a.loadRemoteEntry(S);a.storeLocalEntry(f,X)}else{let S=a.loadLocalEntry(f);await a.storeRemoteEntry(m,y,S)}}for(let f of u)if(c.type==="local")a.removeLocalEntry(f);else{let y=r.normalize(f.replace(n.mountpoint,"/")).substring(1);await a.removeRemoteEntry(m,y)}}};e.FS.filesystems.NATIVEFS_ASYNC=a}s(Y,"initializeNativeFS");var de=s(async e=>{let t=[];async function o(a){for await(let n of a.values())t.push(n),n.kind==="directory"&&await o(n)}s(o,"collect"),await o(e);let r=new Map;r.set(".",e);for(let a of t){let n=(await e.resolve(a)).join("/");r.set(n,a)}return r},"getFsHandles");function G(e){let t={noImageDecoding:!0,noAudioDecoding:!0,noWasmDecoding:!1,preRun:ge(e),quit(o,r){throw t.exited={status:o,toThrow:r},r},print:e.stdout,printErr:e.stderr,thisProgram:e._sysExecutable,arguments:e.args,API:{config:e},locateFile:o=>e.indexURL+o,instantiateWasm:ye(e.indexURL)};return t}s(G,"createSettings");function ue(e){return function(t){let o="/";try{t.FS.mkdirTree(e)}catch(r){console.error(`Error occurred while making a home directory '${e}':`),console.error(r),console.error(`Using '${o}' for a home directory instead`),e=o}t.FS.chdir(e)}}s(ue,"createHomeDirectory");function fe(e){return function(t){Object.assign(t.ENV,e)}}s(fe,"setEnvironment");function me(e){return e?[async t=>{t.addRunDependency("fsInitHook");try{await e(t.FS,{sitePackages:t.API.sitePackages})}finally{t.removeRunDependency("fsInitHook")}}]:[]}s(me,"callFsInitHook");function pe(e){let t=q(e);return async o=>{let r=o._py_version_major(),a=o._py_version_minor();o.FS.mkdirTree("/lib"),o.API.sitePackages=`/lib/python${r}.${a}/site-packages`,o.FS.mkdirTree(o.API.sitePackages),o.addRunDependency("install-stdlib");try{let n=await t;o.FS.writeFile(`/lib/python${r}${a}.zip`,n)}catch(n){console.error("Error occurred while installing the standard library:"),console.error(n)}finally{o.removeRunDependency("install-stdlib")}}}s(pe,"installStdlib");function ge(e){let t;return e.stdLibURL!=null?t=e.stdLibURL:t=e.indexURL+"python_stdlib.zip",[...me(e.fsInit),pe(t),ue(e.env.HOME),fe(e.env),Y]}s(ge,"getFileSystemInitializationFuncs");function ye(e){if(typeof WasmOffsetConverter<"u")return;let{binary:t,response:o}=F(e+"pyodide.asm.wasm");return function(r,a){return async function(){try{let n;o?n=await WebAssembly.instantiateStreaming(o,r):n=await WebAssembly.instantiate(await t,r);let{instance:i,module:c}=n;a(i,c)}catch(n){console.warn("wasm instantiation failed!"),console.warn(n)}}(),{}}}s(ye,"getInstantiateWasmFunc");var M="0.27.5";async function $e(e={}){var u,m;await T();let t=e.indexURL||await K();t=O(t),t.endsWith("/")||(t+="/"),e.indexURL=t;let o={fullStdLib:!1,jsglobals:globalThis,stdin:globalThis.prompt?globalThis.prompt:void 0,lockFileURL:t+"pyodide-lock.json",args:[],env:{},packageCacheDir:t,packages:[],enableRunUntilComplete:!1,checkAPIVersion:!0,BUILD_ID:"bd0388b62e760f8ba04185eb443fec955f25434f49c7b951efe5b1f792dbe5d4"},r=Object.assign(o,e);(u=r.env).HOME??(u.HOME="/home/pyodide"),(m=r.env).PYTHONINSPECT??(m.PYTHONINSPECT="1");let a=G(r),n=a.API;if(n.lockFilePromise=J(r.lockFileURL),typeof _createPyodideModule!="function"){let f=`${r.indexURL}pyodide.asm.js`;await I(f)}let i;if(e._loadSnapshot){let f=await e._loadSnapshot;ArrayBuffer.isView(f)?i=f:i=new Uint8Array(f),a.noInitialRun=!0,a.INITIAL_MEMORY=i.length}let c=await _createPyodideModule(a);if(a.exited)throw a.exited.toThrow;if(e.pyproxyToStringRepr&&n.setPyProxyToStringMethod(!0),n.version!==M&&r.checkAPIVersion)throw new Error(`Pyodide version does not match: '${M}' <==> '${n.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);c.locateFile=f=>{throw new Error("Didn't expect to load any more file_packager files!")};let l;i&&(l=n.restoreSnapshot(i));let d=n.finalizeBootstrap(l,e._snapshotDeserializer);return n.sys.path.insert(0,n.config.env.HOME),d.version.includes("dev")||n.setCdnUrl(`https://cdn.jsdelivr.net/pyodide/v${d.version}/full/`),n._pyodide.set_excepthook(),await n.packageIndexReady,n.initializeStreams(r.stdin,r.stdout,r.stderr),d}s($e,"loadPyodide");export{$e as loadPyodide,M as version};
|
|
4
|
+
//# sourceMappingURL=pyodide.mjs.map
|
|
Binary file
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: flet-web
|
|
3
|
+
Version: 0.29.0.dev5035
|
|
4
|
+
Summary: Flet web client in Flutter.
|
|
5
|
+
Author-email: "Appveyor Systems Inc." <hello@flet.dev>
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://flet.dev
|
|
8
|
+
Project-URL: Repository, https://github.com/flet-dev/flet
|
|
9
|
+
Project-URL: Documentation, https://flet.dev/docs
|
|
10
|
+
Requires-Python: >=3.9
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
Requires-Dist: flet==0.29.0.dev5035
|
|
13
|
+
Requires-Dist: fastapi>=0.115.12
|
|
14
|
+
Requires-Dist: uvicorn[standard]>=0.34.2
|
|
15
|
+
|
|
16
|
+
# Flet Web client in Flutter
|
|
17
|
+
|
|
18
|
+
This package contains a compiled Flutter Flet web client.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
flet_web/__init__.py,sha256=Wyzpvf5VEXil2MRw_AjGLC1AgdvWvGlt8Wu9y6ceC8M,257
|
|
2
|
-
flet_web/
|
|
2
|
+
flet_web/patch_index.py,sha256=G9VUg0lzSXKzGnbJ3EAysKgaYP1ga9Zx2CKXj3AnDNA,3506
|
|
3
|
+
flet_web/uploads.py,sha256=k2ZTFQo_MOXGcsJnKgH8m7_zpmcX-sOauarXbehEjNY,1579
|
|
4
|
+
flet_web/version.py,sha256=LbGycUmxtz-0Z_Y6adLjO_3wRMhoWQAksBtZABTaMIE,27
|
|
3
5
|
flet_web/fastapi/__init__.py,sha256=cQn3Xg5p9NEfLLt6j7uRpxfNz5h2vzDEpOFhIBufShk,306
|
|
4
6
|
flet_web/fastapi/app.py,sha256=g3Aup4ce932sbEUjbqkVZku4gt1NBv0UfH6sqGVe3eg,4883
|
|
5
7
|
flet_web/fastapi/flet_app.py,sha256=QLfPR3p5EYhpGVogxVHSbBHy1BU5YIAl5ryeBi8R_Gc,16961
|
|
@@ -10,10 +12,17 @@ flet_web/fastapi/flet_static_files.py,sha256=KaUT2DTkH0vsTAMWb5fHfFQOmC4bhhk6O83
|
|
|
10
12
|
flet_web/fastapi/flet_upload.py,sha256=6QqRIOuntJ3xUUlfDl47XI3Na2zeCqpZYm1ZFwoFbYM,3115
|
|
11
13
|
flet_web/fastapi/oauth_state.py,sha256=beIRx_JXnzAQIV3QHEroPjtjtO52dJYYctybX8poiSo,308
|
|
12
14
|
flet_web/fastapi/serve_fastapi_web_app.py,sha256=WAjbB3yE5JBaTUMeG2D3128_IHefg2GnGLMMqkCvsoM,2300
|
|
13
|
-
flet_web/
|
|
14
|
-
flet_web/
|
|
15
|
-
flet_web/
|
|
16
|
-
flet_web/web
|
|
15
|
+
flet_web/web/favicon.png,sha256=83Y7iihRHIC1ALYXYVizrRs2MNRA2YbWGL3UD4LTvOI,1028
|
|
16
|
+
flet_web/web/flutter.js,sha256=LCisyaYousUOOREl-8PAyoNma50Jf6RAhHx_xkksxRY,7735
|
|
17
|
+
flet_web/web/flutter.js.map,sha256=y4AbBqA85aovTkp3Si3nj1Muk-uVlfbelLIFkbDVCis,39976
|
|
18
|
+
flet_web/web/flutter_bootstrap.js,sha256=GZDJrNWnbh-LiKD_f__LYxHcPyZPmE2enOoZuPURuEQ,8549
|
|
19
|
+
flet_web/web/flutter_service_worker.js,sha256=x2pojqRG6heWCO1E6dgm-cD3nHMkjiEvznmY_Vk6iK0,8989
|
|
20
|
+
flet_web/web/index.html,sha256=3fh8yxyFyZXFDeS9co1DWQmz2Ri3SOD-Z2kzvTNMS9M,2162
|
|
21
|
+
flet_web/web/main.dart.js,sha256=Mou5hUOgaITH4Bawq_gWTTSCcwvzPdg3ChsGBxvuggw,8561687
|
|
22
|
+
flet_web/web/manifest.json,sha256=_GwcP9mT4sS_BwdYPcDEhnpejqe933LeYIytZIgDnr0,789
|
|
23
|
+
flet_web/web/python-worker.js,sha256=5Bl4FYntq5L_F-QJO44_CNoIkz1XY0eECj86Rc8TqXw,1573
|
|
24
|
+
flet_web/web/python.js,sha256=VzS78idquUNV_OcZOvFX-xf4ZErYIp-FSjv8u9fjWMI,744
|
|
25
|
+
flet_web/web/version.json,sha256=M3wyjx-6vkvcLftRE6e4ugK8oYoYlg19xEaZwbrgfHw,92
|
|
17
26
|
flet_web/web/assets/AssetManifest.bin,sha256=Q4sJXhFAZx8wv3K0TWA-ljDQf7oE2dP8FHjE07QJYdo,666
|
|
18
27
|
flet_web/web/assets/AssetManifest.bin.json,sha256=rfGK2KxFI6MWfK3wvg0dHVnZ9q6zSrcorP5GKV_-uRY,890
|
|
19
28
|
flet_web/web/assets/AssetManifest.json,sha256=zaDhetvObV0uhQRUjT1QEpicnQ-0DtdveW3NT1WKaho,623
|
|
@@ -27,22 +36,22 @@ flet_web/web/assets/packages/record_web/assets/js/record.fixwebmduration.js,sha2
|
|
|
27
36
|
flet_web/web/assets/packages/record_web/assets/js/record.worklet.js,sha256=hkPdAg583tT9IxLhQaZnzx_6lErDQk7E4C4Xc6c35-c,11594
|
|
28
37
|
flet_web/web/assets/packages/wakelock_plus/assets/no_sleep.js,sha256=3OTu8LGXtkCtaqqyIo7h7n3M-L1ta13lSE3RvRZDCng,13344
|
|
29
38
|
flet_web/web/assets/shaders/ink_sparkle.frag,sha256=4Bths5TPZqZBvqh-O0_jeH03L2Nsi8iipnQ4zcKdpvY,8867
|
|
30
|
-
flet_web/web/favicon.png,sha256=83Y7iihRHIC1ALYXYVizrRs2MNRA2YbWGL3UD4LTvOI,1028
|
|
31
|
-
flet_web/web/flutter.js,sha256=LCisyaYousUOOREl-8PAyoNma50Jf6RAhHx_xkksxRY,7735
|
|
32
|
-
flet_web/web/flutter_bootstrap.js,sha256=Xd_fbxXbSZBrNXZVdNo30B4JV4xmraxaSm68Vk8sy1U,8549
|
|
33
|
-
flet_web/web/flutter_service_worker.js,sha256=3NDqrUFxUqD3eOcLi1sLBrhjWEhncK1rrHwMnFUkXNQ,8989
|
|
34
39
|
flet_web/web/icons/apple-touch-icon-192.png,sha256=dIgpzAZUPynN5BlFNa3ix_VCW34Jl0vimki76Kb7Y5o,4699
|
|
35
40
|
flet_web/web/icons/icon-192.png,sha256=rpfj2H4BEMLPI5U8M6eO_boq73OxHYIlrHh1Up2Moro,6622
|
|
36
41
|
flet_web/web/icons/icon-512.png,sha256=LYsJAwoc1oRroLoakYbYHJJQN-cNtOjmj1QCooE71oo,18666
|
|
37
42
|
flet_web/web/icons/icon-maskable-192.png,sha256=JjQtcczM5M1ddM4W5EtJsNJR-kHO9iXzmC_TgWaqsxE,4128
|
|
38
43
|
flet_web/web/icons/icon-maskable-512.png,sha256=Iq5-TQS9BUn2U7T8ztgToh2EiWnLh9W4aTHIGja5c8o,11906
|
|
39
44
|
flet_web/web/icons/loading-animation.png,sha256=Zl6NT_QrVqNUatwcqmSZawFlMxWHsdm493XDBOE4gn4,17040
|
|
40
|
-
flet_web/web/
|
|
41
|
-
flet_web/web/
|
|
42
|
-
flet_web/web/
|
|
43
|
-
flet_web/web/
|
|
44
|
-
flet_web/web/
|
|
45
|
-
flet_web/web/
|
|
46
|
-
flet_web
|
|
47
|
-
flet_web
|
|
48
|
-
flet_web
|
|
45
|
+
flet_web/web/pyodide/ffi.d.ts,sha256=_hT6zvfgPPatx_MFAySF51IEE_yo5HD3TXy1LatFMzw,43637
|
|
46
|
+
flet_web/web/pyodide/package.json,sha256=flXunSCf8Ta8gJF5htg1_0B-fWr_FwCOiCOK4L5fkYQ,3270
|
|
47
|
+
flet_web/web/pyodide/pyodide-lock.json,sha256=vhgHdF2pPaoJ02CxCcF6DlJudNZk0fG5hwqvzOmM5CY,112205
|
|
48
|
+
flet_web/web/pyodide/pyodide.asm.js,sha256=OoifBz5ijCGWxwW0L6DpVbouJcA0sePdWJw1vmdbwBs,1253804
|
|
49
|
+
flet_web/web/pyodide/pyodide.asm.wasm,sha256=9_7-VjE0cUoXq9ZVFtlJYOjb2W_md4p6hClH_JaGs6E,10103326
|
|
50
|
+
flet_web/web/pyodide/pyodide.d.ts,sha256=fiVAY-XRG5JNeWvJK3yDT_JWQ8WEFNZJzF7s4P_WFHk,63066
|
|
51
|
+
flet_web/web/pyodide/pyodide.js,sha256=f9vmblP2j2pOk8KVpmc3F1m-CT0r1AK7RFRVFFhAObY,14928
|
|
52
|
+
flet_web/web/pyodide/pyodide.mjs,sha256=a8TXtPYwjEus06p4TXRx6tm_RfI5ql60MYFdbxz_5Y4,13946
|
|
53
|
+
flet_web/web/pyodide/python_stdlib.zip,sha256=YDCWSWfkR8iHq8RsXwlnxVaIZE11lJbegqPvCfSfXLo,2358894
|
|
54
|
+
flet_web-0.29.0.dev5035.dist-info/METADATA,sha256=6TYP4sk4GEmbQ7I-Mx1BA84Ug_Aw4lEU-0yZ73-BX2I,594
|
|
55
|
+
flet_web-0.29.0.dev5035.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
56
|
+
flet_web-0.29.0.dev5035.dist-info/top_level.txt,sha256=1MXw6P2bxjBa70vz-6oTGqGmmLOWipyD7EaaivWoW1A,9
|
|
57
|
+
flet_web-0.29.0.dev5035.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
flet_web
|
flet_web/fastapi/README.md
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
# Flet - a better UI for FastAPI
|
|
2
|
-
|
|
3
|
-
Flet for FastAPI allows adding interactive real-time dashboards to your FastAPI app as well as host any Flet web app inside FastAPI with production-grade reliability.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
pip install flet-fastapi
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## First app
|
|
12
|
-
|
|
13
|
-
Create `counter.py` with the following content:
|
|
14
|
-
|
|
15
|
-
```python
|
|
16
|
-
import flet as ft
|
|
17
|
-
import flet_fastapi
|
|
18
|
-
|
|
19
|
-
async def main(page: ft.Page):
|
|
20
|
-
counter = ft.Text("0", size=50, data=0)
|
|
21
|
-
|
|
22
|
-
async def add_click(e):
|
|
23
|
-
counter.data += 1
|
|
24
|
-
counter.value = str(counter.data)
|
|
25
|
-
counter.update()
|
|
26
|
-
|
|
27
|
-
page.floating_action_button = ft.FloatingActionButton(
|
|
28
|
-
icon=ft.icons.ADD, on_click=add_click
|
|
29
|
-
)
|
|
30
|
-
await page.add_async(
|
|
31
|
-
ft.Container(counter, alignment=ft.alignment.center, expand=True)
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
app = flet_fastapi.app(main)
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
That's a simple app displaying a counter and a button at the right bottom to increment that counter.
|
|
38
|
-
|
|
39
|
-
`flet_fastapi.app()` configures a single Flet app at the root of FastAPI app with `main()` sessions handler and the following endpoints:
|
|
40
|
-
|
|
41
|
-
`/ws` (WS) - WebSocket handler for the Flet app.
|
|
42
|
-
|
|
43
|
-
`/upload` (PUT) - file uploads handler.
|
|
44
|
-
|
|
45
|
-
`/oauth_callback` (GET) - OAuth flow callback handler.
|
|
46
|
-
|
|
47
|
-
`/` (GET) - Flet app static files with SPA catch-all handler.
|
|
48
|
-
|
|
49
|
-
## Running the app locally
|
|
50
|
-
|
|
51
|
-
Install [Uvicorn](https://www.uvicorn.org/) web server:
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
pip install uvicorn
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Start `uvicorn` with:
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
uvicorn counter:app
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Open the browser and navigate to http://127.0.0.1:8000 to see the app running.
|
|
64
|
-
|
|
65
|
-
## Hosting multiple Flet apps under the same domain
|
|
66
|
-
|
|
67
|
-
```python
|
|
68
|
-
import flet as ft
|
|
69
|
-
import flet_fastapi
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
async def root_main(page: ft.Page):
|
|
73
|
-
await page.add_async(ft.Text("This is root app!"))
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
async def sub_main(page: ft.Page):
|
|
77
|
-
await page.add_async(ft.Text("This is sub app!"))
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
app = flet_fastapi.FastAPI()
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
app.mount("/sub-app", flet_fastapi.app(sub_main))
|
|
84
|
-
app.mount("/", flet_fastapi.app(root_main))
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
Sub-apps must be mapped before the root Flet app as it configures catch-all `index.html` for SPA.
|
|
88
|
-
|
|
89
|
-
Run the app with `uvicorn` and visit http://127.0.0.1:8000 and then http://127.0.0.1:8000/sub-app/ to see both Flet apps running. Notice the trailing slash in `/sub-app/` URL - without the slash the request will be routed to a root app.
|
|
90
|
-
|
|
91
|
-
## Adding Flet to the existing FastAPI app
|
|
92
|
-
|
|
93
|
-
```python
|
|
94
|
-
from contextlib import asynccontextmanager
|
|
95
|
-
|
|
96
|
-
import flet as ft
|
|
97
|
-
import flet_fastapi
|
|
98
|
-
from fastapi import FastAPI
|
|
99
|
-
|
|
100
|
-
@asynccontextmanager
|
|
101
|
-
async def lifespan(app: FastAPI):
|
|
102
|
-
await flet_fastapi.app_manager.start()
|
|
103
|
-
yield
|
|
104
|
-
await flet_fastapi.app_manager.shutdown()
|
|
105
|
-
|
|
106
|
-
app = FastAPI(lifespan=lifespan)
|
|
107
|
-
|
|
108
|
-
async def main(page: ft.Page):
|
|
109
|
-
await page.add_async(ft.Text("Hello, Flet!"))
|
|
110
|
-
|
|
111
|
-
app.mount("/flet-app", flet_fastapi.app(main))
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
When adding Flet app to the existing FastAPI app you need to call `flet_fastapi.app_manager.start()` on app start and `flet_fastapi.app_manager.shutdown()` on shutdown. Use the way that best suites you: lifespan (in the example above) or app events.
|
|
115
|
-
|
|
116
|
-
`app_manager.start()` method starts background tasks cleaning up expired sessions and OAuth flow states.
|
|
117
|
-
|
|
118
|
-
`app_manager.shutdown()` method removes any temporary files created by a Flet app.
|
|
119
|
-
|
|
120
|
-
## Running the app in production
|
|
121
|
-
|
|
122
|
-
It is recommended to run FastAPI in production with [Hypercorn](https://github.com/pgjones/hypercorn/) which is ASGI web server, but it is also possible to run FastAPI apps with [Gunicorn](https://gunicorn.org/) which is a WSGI server, but has more features, like passing proxy headers.
|
|
123
|
-
|
|
124
|
-
To install Gunicorn:
|
|
125
|
-
|
|
126
|
-
```
|
|
127
|
-
pip install gunicorn
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
Start `gunicorn` with:
|
|
131
|
-
|
|
132
|
-
```
|
|
133
|
-
gunicorn -k uvicorn.workers.UvicornWorker counter:app
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
## Reference
|
|
137
|
-
|
|
138
|
-
### Environment variables
|
|
139
|
-
|
|
140
|
-
`FLET_SECRET_KEY` - secret key to sign upload requests. Must be set if upload directory is configured.
|
|
141
|
-
|
|
142
|
-
`FLET_SESSION_TIMEOUT` - the number of seconds to keep session alive after user has disconnected. Default is 3,600 seconds.
|
|
143
|
-
|
|
144
|
-
`FLET_OAUTH_STATE_TIMEOUT` - OAuth state lifetime, in seconds, which is a maximum allowed time between starting OAuth flow and redirecting to OAuth callback URL. Default is 600 seconds.
|
|
145
|
-
|
|
146
|
-
`FLET_MAX_UPLOAD_SIZE` - max allowed size of an uploaded file, bytes.
|
flet_web/web/.last_build_id
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2b895b047c2de07e6cc46404a9075afa
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.3
|
|
2
|
-
Name: flet-web
|
|
3
|
-
Version: 0.29.0.dev4983
|
|
4
|
-
Summary: Flet web client in Flutter.
|
|
5
|
-
License: Apache-2.0
|
|
6
|
-
Author: Appveyor Systems Inc.
|
|
7
|
-
Author-email: hello@flet.dev
|
|
8
|
-
Requires-Python: >=3.9
|
|
9
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
-
Requires-Dist: fastapi
|
|
17
|
-
Requires-Dist: flet (==0.29.0.dev4983)
|
|
18
|
-
Requires-Dist: uvicorn[standard]
|
|
19
|
-
Project-URL: Documentation, https://flet.dev/docs
|
|
20
|
-
Project-URL: Homepage, https://flet.dev
|
|
21
|
-
Project-URL: Repository, https://github.com/flet-dev/flet
|
|
22
|
-
Description-Content-Type: text/markdown
|
|
23
|
-
|
|
24
|
-
# Flet Web client in Flutter
|
|
25
|
-
|
|
26
|
-
This package contains a compiled Flutter Flet web client.
|