File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ This library is created to be fully independent, not requiring integration with
24
24
pip install winged-python==0.1.0
25
25
```
26
26
27
- ## Usage Example
27
+ ## Simple Usage Example
28
28
29
29
30
30
``` python
@@ -90,6 +90,26 @@ print(divC.generate())
90
90
</div >
91
91
```
92
92
93
+ ## Usage with FastAPI Render
94
+
95
+ ``` python
96
+ from fastapi import FastAPI
97
+ from fastapi.responses import HTMLResponse
98
+
99
+ from winged.HTML .div import Div
100
+ from winged.HTML .h import H
101
+ from winged.HTML .string import String
102
+
103
+
104
+ @app.get (' /' , response_class = HTMLResponse)
105
+ async def home ():
106
+ divC = Div((" class" , " container" ))
107
+ h = H(" 1" )
108
+ h.add(String(" Hello World" ))
109
+ divC.add(h)
110
+ return divC.get_string() # Return HTML String
111
+ ```
112
+
93
113
## Contributing
94
114
95
115
To contribute, it's simple, follow the guidelines below to prepare your development environment
You can’t perform that action at this time.
0 commit comments