v0.35.0 - Add ability to share client messages and add --open flag to open browser on successful start
What's Changed
- Adds ability to share messages from client with py by @urjitbhatia in https://github.com/sansyrox/robyn/pull/537
- feat: add --open flag to open browser on successful start of the server by @IdoKendo in https://github.com/sansyrox/robyn/pull/517
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.34.0...v0.35.0
v0.34.0 - Make web sockets standard compliant and allow middlewares to return Response objects
What's Changed
- Don't respond with pong when a pong message is received. by @urjitbhatia in https://github.com/sansyrox/robyn/pull/536
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/sansyrox/robyn/pull/540
- feat: allow before middlewares to return Response objects by @AntoineRR in https://github.com/sansyrox/robyn/pull/534
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.33.0...v0.34.0
v0.33.0 - Adds ip_addr field in the request object and add const style http enums
What's Changed
- feat: add ip_addr field to Request object by @IdoKendo in https://github.com/sansyrox/robyn/pull/530
- feat: Migrated Enum style error codes to constants style by @Mr-Sunglasses in https://github.com/sansyrox/robyn/pull/533
New Contributors
- @Mr-Sunglasses made their first contribution in https://github.com/sansyrox/robyn/pull/533
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.32.0...v0.33.0
v0.32.0 - Implement SubRouters
We're proud to announce the addition of SubRouters to Robyn. This feature allows developers to create subrouters, providing a convenient way to group routes together.
The functionality of SubRouters extends to both normal routes and web sockets, acting as a smaller-scale replica of the main router. SubRouters can be utilized in exactly the same way as the main router, with the minor prerequisite of adding the SubRouter to the main router.
We hope you enjoy the increased flexibility this feature brings to your routing capabilities in Robyn! As always, we look forward to your feedback.
What's Changed
- Update features.md - change query param syntax by @urjitbhatia in https://github.com/sansyrox/robyn/pull/520
- Comply with pyproject definition by @Kludex in https://github.com/sansyrox/robyn/pull/521
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/sansyrox/robyn/pull/523
- Routers by @Noborita9 and @sansyrox in https://github.com/sansyrox/robyn/pull/497
New Contributors
- @urjitbhatia made their first contribution in https://github.com/sansyrox/robyn/pull/520
Sample Usage
SubRouters
You can create subrouters in Robyn. This is useful when you want to group routes together.
Subrouters can be used for both normal routes and web sockets. They are basically a mini version of the main router and can be used in the same way.
The only caveat is that you need to add the subrouter to the main router.
from robyn import Robyn, SubRouter
app = Robyn(__file__)
sub_router = SubRouter("/sub_router")
@sub_router.get("/hello")
def hello():
return "Hello, world"
web_socket = SubRouter("/web_socket")
@web_socket.message()
async def hello():
return "Hello, world"
app.add_sub_router(sub_router)
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.31.0...v0.32.0
v0.31.0 - Add a global exception handler decorator
What's Changed
- feat: add app.exception decorator to handle errors by @IdoKendo in https://github.com/sansyrox/robyn/pull/510
New Contributors
- @IdoKendo made their first contribution in https://github.com/sansyrox/robyn/pull/510
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.30.0...v0.31.0
v0.30.0 - BIRTHDAY RELEASE 🎂 - Add Global Middlewares
What's Changed
- feat: add global middlewares, which are middleware executed before or… by @AntoineRR in https://github.com/sansyrox/robyn/pull/498
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/sansyrox/robyn/pull/516
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.29.0...v0.30.0
v0.29.0 - Add docker support in create robyn app
What's Changed
- documentation update by @yednapg in https://github.com/sansyrox/robyn/pull/493
- Feat: Cli improvements by @Oluwaseun241 in https://github.com/sansyrox/robyn/pull/481
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.28.4...v0.29.0
v0.28.4 - Fix binary file uploading, improve error tracebacks and improve logging
What's Changed
- added discord link by @yednapg in https://github.com/sansyrox/robyn/pull/488
- ✨ feat: display traceback for execute_http_function by @mirecl in https://github.com/sansyrox/robyn/pull/478
- ✨ feat: display Robyn version on start app by @mirecl in https://github.com/sansyrox/robyn/pull/479
- feat: fix binary file uploading by @sansyrox in https://github.com/sansyrox/robyn/pull/491
- feat: improve logging by @sansyrox in https://github.com/sansyrox/robyn/pull/490
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/sansyrox/robyn/pull/489
New Contributors
- @yednapg made their first contribution in https://github.com/sansyrox/robyn/pull/488
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.28.3...v0.28.4
v0.28.2 - Fixes crashing on incorrect PAYLOAD Environment variable
What's Changed
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/sansyrox/robyn/pull/467
- 🔥Fix incorrect set data in ROBYN_MAX_PAYLOAD_SIZE by @mirecl in https://github.com/sansyrox/robyn/pull/474
New Contributors
- @mirecl made their first contribution in https://github.com/sansyrox/robyn/pull/474
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.28.1...v0.28.2
[BREAKING CHANGE ] - v0.27.0 - rename params -> path params and allow cors!
What's Changed
- Rename params with path_params by @carlosm27 in https://github.com/sansyrox/robyn/pull/460
- docs: remove test pypi instructions from pr template by @sansyrox in https://github.com/sansyrox/robyn/pull/462
- feat: Implement global CORS by @sansyrox in https://github.com/sansyrox/robyn/pull/458
- feat: allow configurable payload sizes by @sansyrox in https://github.com/sansyrox/robyn/pull/465
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.26.1...v0.27.0
v0.26.1 - Fix hot reloading with the `--dev` flag
What's Changed
- fix(dev): fix hot reloading with dev flag by @AntoineRR in https://github.com/sansyrox/robyn/pull/446
- docs: Add docs for v0.26.0 by @sansyrox in https://github.com/sansyrox/robyn/pull/451
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.26.0...v0.26.1
v0.26.0 - Better interfaces, improved performance, and benchmarking + many new contributors! ✨
What's Changed
- feat: Robyn providing status codes by @carlosm27 in https://github.com/sansyrox/robyn/pull/429
- feat: Allow global level Response headers by @ParthS007 in https://github.com/sansyrox/robyn/pull/410
- added
star-history
by @hemangjoshi37a in https://github.com/sansyrox/robyn/pull/434 - Install the CodeSee workflow. by @codesee-maps in https://github.com/sansyrox/robyn/pull/438
- Replace integer status codes with Enum values of StatusCodes by @Noborita9 in https://github.com/sansyrox/robyn/pull/436
- feat: Implement performance benchmarking by @sansyrox in https://github.com/sansyrox/robyn/pull/443
- fix: Implement auto installation of uvloop on linux arm by @sansyrox in https://github.com/sansyrox/robyn/pull/445
- chore: update rust dependencies by @AntoineRR in https://github.com/sansyrox/robyn/pull/444
- feat: expose request/connection info by @r3b-fish in https://github.com/sansyrox/robyn/pull/441
- feat: get rid of intermediate representations of requests and responses by @AntoineRR in https://github.com/sansyrox/robyn/pull/397
New Contributors
- @ParthS007 made their first contribution in https://github.com/sansyrox/robyn/pull/410
- @hemangjoshi37a made their first contribution in https://github.com/sansyrox/robyn/pull/434
- @codesee-maps made their first contribution in https://github.com/sansyrox/robyn/pull/438
- @Noborita9 made their first contribution in https://github.com/sansyrox/robyn/pull/436
- @r3b-fish made their first contribution in https://github.com/sansyrox/robyn/pull/441
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.25.0...v0.26.0
v0.25.0 - Implement views, welcome new contributors and Dark mode! 🖤
What's Changed
- fix(test): fix tests on windows by @AntoineRR in https://github.com/sansyrox/robyn/pull/400
- docs: Update PyPi metadata by @sansyrox in https://github.com/sansyrox/robyn/pull/401
- fix: various improvements around the dev flag by @AntoineRR in https://github.com/sansyrox/robyn/pull/388
- chore(ci): fix rust ci warnings by @AntoineRR in https://github.com/sansyrox/robyn/pull/408
- fix: fixed CONTRIBUTE.md link into docs/README.md file, changing it f… by @Kop3sh in https://github.com/sansyrox/robyn/pull/411
- fix: Fix Windows tests by @sansyrox in https://github.com/sansyrox/robyn/pull/402
- Fix docs: support version by @Oluwaseun241 in https://github.com/sansyrox/robyn/pull/404
- chore: improve issue templates by @AntoineRR in https://github.com/sansyrox/robyn/pull/413
- docs: add dark mode to website by @AntoineRR in https://github.com/sansyrox/robyn/pull/416
- style(landing_page): fix the style of github logo on the landing page by @sansyrox in https://github.com/sansyrox/robyn/pull/419
- better way to compare type by @jmishra01 in https://github.com/sansyrox/robyn/pull/421
- feat: Add view controllers by @mikaeelghr in https://github.com/sansyrox/robyn/pull/407
- docs: improve readme by @AntoineRR in https://github.com/sansyrox/robyn/pull/418
- fix: Add proper headers to the templates return types by @sansyrox in https://github.com/sansyrox/robyn/pull/427
- docs: Add documentation for views by @sansyrox in https://github.com/sansyrox/robyn/pull/424
New Contributors
- @Kop3sh made their first contribution in https://github.com/sansyrox/robyn/pull/411
- @Oluwaseun241 made their first contribution in https://github.com/sansyrox/robyn/pull/404
- @jmishra01 made their first contribution in https://github.com/sansyrox/robyn/pull/421
- @mikaeelghr made their first contribution in https://github.com/sansyrox/robyn/pull/407
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.24.1...v0.25.0
Special Thanks to @AntoineRR for implementing the sick dark mode on the docs website! 🔥
v0.24.1 - Fix terminal hijacking in Windows
What's Changed
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/sansyrox/robyn/pull/394
- fix: fix terminal hijacking in windows by @sansyrox in https://github.com/sansyrox/robyn/pull/391
i.e. you can exit Robyn gracefully in windows now
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.24.0...v0.24.1
v0.24.0 - Allow byte responses in Robyn
Sample Usage
@app.get("/binary_output_response_sync")
def binary_output_response_sync(request):
return Response(
status_code=200,
headers={"Content-Type": "application/octet-stream"},
body="OK",
)
@app.get("/binary_output_async")
async def binary_output_async(request):
return b"OK"
@app.get("/binary_output_response_async")
async def binary_output_response_async(request):
return Response(
status_code=200,
headers={"Content-Type": "application/octet-stream"},
body="OK",
)
What's Changed
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/sansyrox/robyn/pull/384
- small correction in docs by @tkanhe in https://github.com/sansyrox/robyn/pull/387
- test: organize and add tests by @AntoineRR in https://github.com/sansyrox/robyn/pull/377
- ci: build artifacts on every push and pull by @sansyrox in https://github.com/sansyrox/robyn/pull/378
- chore: fix requirements files and update packages by @AntoineRR in https://github.com/sansyrox/robyn/pull/389
- Changed Response to use body: bytes by @madhavajay in https://github.com/sansyrox/robyn/pull/375
- docs: add documentation regarding byte response by @sansyrox in https://github.com/sansyrox/robyn/pull/392
New Contributors
- @tkanhe made their first contribution in https://github.com/sansyrox/robyn/pull/387
- @madhavajay made their first contribution in https://github.com/sansyrox/robyn/pull/375
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.23.1...v0.24.0
v0.23.1 - Implement default intelligent status codes on crashes and not founds
What's Changed
- test: improve pytest fixtures by @AntoineRR in https://github.com/sansyrox/robyn/pull/368
- Move pre-commit hooks to use Ruff by @patrick91 in https://github.com/sansyrox/robyn/pull/364
- docs: add appwrite logo as sponsors by @sansyrox in https://github.com/sansyrox/robyn/pull/369
- ci: enable precommit hooks on everything by @sansyrox in https://github.com/sansyrox/robyn/pull/371
- chore: run tests on linux, macos and windows and release builds on ta… by @AntoineRR in https://github.com/sansyrox/robyn/pull/370
- chore(ci): fix robyn installation in test CI by @AntoineRR in https://github.com/sansyrox/robyn/pull/383
- fix: return 404 status code when route isn't found by @AntoineRR in https://github.com/sansyrox/robyn/pull/380
- fix: return 500 status code when route raise by @AntoineRR in https://github.com/sansyrox/robyn/pull/382
New Contributors
- @patrick91 made their first contribution in https://github.com/sansyrox/robyn/pull/364
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.23.0...v0.23.1
[BREAKING CHANGE ] v0.23.0 - Replace the default port with 8080
What's Changed
- docs: Add page icon to index page by @Abdur-rahmaanJ in https://github.com/sansyrox/robyn/pull/365
- test: speed up tests by @AntoineRR in https://github.com/sansyrox/robyn/pull/362
- ci: delete the test PyPI workflow by @sansyrox in https://github.com/sansyrox/robyn/pull/367
- Replace the default port with 8080 by @sansyrox in https://github.com/sansyrox/robyn/pull/352
New Contributors
- @Abdur-rahmaanJ made their first contribution at https://github.com/sansyrox/robyn/pull/365
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.22.1...v0.23.0
This change was implemented as MacOS has some default service running on port 5000. And we had to change the defaults in our testing suite constantly.
v0.22.1 - Implement Support for Python 3.11
What's Changed
- Updates prose to format code block and docs by @rachfop in https://github.com/sansyrox/robyn/pull/356
- chore(ci): add python 3.11 to the build and test CI by @AntoineRR in https://github.com/sansyrox/robyn/pull/358
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/sansyrox/robyn/pull/359
- ci: update precommit config by @sansyrox in https://github.com/sansyrox/robyn/pull/361
New Contributors
- @rachfop made their first contribution in https://github.com/sansyrox/robyn/pull/356
- @pre-commit-ci made their first contribution in https://github.com/sansyrox/robyn/pull/359
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.22.0...v0.22.1
v0.22.0 - Allow better response handling and fix windows support
What's Changed
- fix: better handling of route return type by @AntoineRR in https://github.com/sansyrox/robyn/pull/349
- fix: windows support by @sansyrox in https://github.com/sansyrox/robyn/pull/354
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.21.0...v0.22.0
Latest Docs available at : https://sansyrox.github.io/robyn/#/features?id=response-object
Code Sample
from robyn.robyn import Response
@app.get("/response")
async def response(request):
return Response(status_code=200, headers={}, body="OK")
[BREAKING CHANGE] v0.21.0 - Allow serving non-html type files
What's Changed
- feat: return Response from routes by @AntoineRR in https://github.com/sansyrox/robyn/pull/346
- fix: fix the static file serving by @sansyrox in https://github.com/sansyrox/robyn/pull/347
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.20.0...v0.21.0
v0.20.0 - [Breaking Change] - Allow non string response types
What's Changed
- feat: add an auto benchmark script by @AntoineRR in https://github.com/sansyrox/robyn/pull/329
- feat: allow non string types in response by @sansyrox in https://github.com/sansyrox/robyn/pull/337
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.19.2...v0.20.0
Sample Usage
@app.get("/request_headers")
async def request_headers():
return {
"status_code": 200,
"body": "This is a regular response",
"type": "text",
"headers": {"Header": "header_value"},
}
v0.19.2 - allow response headers and fix headers not working in const requests
What's Changed
- fix: factorizing code by @AntoineRR in https://github.com/sansyrox/robyn/pull/322
- fix: allow response headers and fix headers not working in const requests by @sansyrox in https://github.com/sansyrox/robyn/pull/331
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.19.1...v0.19.2
Usage
You can return headers like:
@app.get("/redirect")
async def redirect(request):
return {
"status_code": "200",
"body": "test message",
"type": "text",
"headers": jsonify({"Header": "value"}),
}
v0.19.1 - Add templating Support and multiple performance enhancements
What's Changed
- docs: fix blog link in website by @sansyrox in https://github.com/sansyrox/robyn/pull/309
- docs: fix middleware section in examples by @sansyrox in https://github.com/sansyrox/robyn/pull/315
- Router refactor by @AntoineRR in https://github.com/sansyrox/robyn/pull/307
- Add Railway deployment process. by @carlosm27 in https://github.com/sansyrox/robyn/pull/316
- docs: update hosting docs by @sansyrox in https://github.com/sansyrox/robyn/pull/319
- Various improvements around the index method by @AntoineRR in https://github.com/sansyrox/robyn/pull/318
New Contributors
- @carlosm27 made their first contribution in https://github.com/sansyrox/robyn/pull/316
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.18.3...v0.19.1
Installation:
pip3 install "robyn[templating]"
Usage: https://sansyrox.github.io/robyn/#/features?id=templates
v0.18.3 - Fix `log-level` in Robyn
What's Changed
- fix: log level not working by @sansyrox in https://github.com/sansyrox/robyn/pull/303
- add route type enum by @suhailmalik07 in https://github.com/sansyrox/robyn/pull/299
Full Changelog: https://github.com/sansyrox/robyn/compare/v0.18.2...v0.18.3
Thank you @Shending-Help for finding the issue! 😄