devwiki:litestar

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
devwiki:litestar [2023/08/24 09:19] yingdevwiki:litestar [2023/08/25 09:17] – [Concepts] ying
Line 13: Line 13:
   * it provides a active server, allow other pc or program to communicate with it   * it provides a active server, allow other pc or program to communicate with it
   * it use url to point to each function of the app.py <code python>   * it use url to point to each function of the app.py <code python>
-# (python decorator)+# (python decorator: a function repackage method, put below function as a component of decorator function) 
 +# so, the decoration function is like a white-label procedure function, need input function as lego part to output different behaved white-label funciton. 
 @get("/") @get("/")
 async def func_a() -> str: async def func_a() -> str:
  
-# same+# same as below, get("/") return a the get white-label function, and take func_a as component to output a different behaved white-label function, and use the same function variable func_a, (like a repackage of func_a in white-label box)
 func_a = get("/")(func_a) func_a = get("/")(func_a)
 </code> </code>
  
  • devwiki/litestar.txt
  • Last modified: 2023/08/29 09:31
  • by ying