File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33## [ Unreleased] ( https://github.com/sansyrox/robyn/tree/HEAD )
44
5- [ Full Changelog] ( https://github.com/sansyrox/robyn/compare/v0.11.0...HEAD )
5+ [ Full Changelog] ( https://github.com/sansyrox/robyn/compare/v0.11.1...HEAD )
6+
7+ ** Closed issues:**
8+
9+ - Consider adding startup events [ \# 153] ( https://github.com/sansyrox/robyn/issues/153 )
10+ - Remove poetry dependency [ \# 150] ( https://github.com/sansyrox/robyn/issues/150 )
611
712** Merged pull requests:**
813
14+ - Add Event handlers [ \# 154] ( https://github.com/sansyrox/robyn/pull/154 ) ([ sansyrox] ( https://github.com/sansyrox ) )
15+ - Remove poetry [ \# 152] ( https://github.com/sansyrox/robyn/pull/152 ) ([ sansyrox] ( https://github.com/sansyrox ) )
916- Use print instead of input after starting server [ \# 149] ( https://github.com/sansyrox/robyn/pull/149 ) ([ klaa97] ( https://github.com/klaa97 ) )
1017- Fix dev server [ \# 148] ( https://github.com/sansyrox/robyn/pull/148 ) ([ sansyrox] ( https://github.com/sansyrox ) )
1118- URL queries [ \# 146] ( https://github.com/sansyrox/robyn/pull/146 ) ([ patchgamestudio] ( https://github.com/patchgamestudio ) )
1219- Add project wide flake8 settings [ \# 143] ( https://github.com/sansyrox/robyn/pull/143 ) ([ sansyrox] ( https://github.com/sansyrox ) )
1320
21+ ## [ v0.11.1] ( https://github.com/sansyrox/robyn/tree/v0.11.1 ) (2022-01-11)
22+
23+ [ Full Changelog] ( https://github.com/sansyrox/robyn/compare/v0.11.0...v0.11.1 )
24+
1425## [ v0.11.0] ( https://github.com/sansyrox/robyn/tree/v0.11.0 ) (2022-01-07)
1526
1627[ Full Changelog] ( https://github.com/sansyrox/robyn/compare/v0.10.0...v0.11.0 )
Original file line number Diff line number Diff line change 11[package ]
22name = " robyn"
3- version = " 0.11.1 "
3+ version = " 0.12.0 "
44authors = [" Sanskar Jethi <sansyrox@gmail.com>" ]
55edition = " 2018"
66description = " A web server that is fast!"
Original file line number Diff line number Diff line change @@ -176,6 +176,22 @@ app.add_header("server", "robyn")
176176
177177```
178178
179+ ## Events
180+
181+ You can add startup and shutdown events in robyn. These events will execute before the requests have started serving and after the serving has been completed.
182+
183+ ``` python3
184+
185+ async def startup_handler ():
186+ logger.log(logging.INFO , " Starting up" )
187+
188+ app.startup_handler(startup_handler)
189+
190+ @app.shutdown_handler
191+ def shutdown_handler ():
192+ logger.log(logging.INFO , " Shutting down" )
193+ ```
194+
179195## WebSockets
180196
181197You can now serve websockets using Robyn.
Original file line number Diff line number Diff line change 1010- WebSocket!
1111- Hot Reloading (Still experimental)
1212- Query Params
13+ - Events (Startup and Shutdown)
1314- Community First and truly FOSS!
1415
Original file line number Diff line number Diff line change 11name = " robyn"
2- version = " 0.11.1 "
2+ version = " 0.12.0 "
33description = " A web server that is fast!"
44authors = [" Sanskar Jethi <sansyrox@gmail.com>" ]
55
You can’t perform that action at this time.
0 commit comments