Robyn

Robyn is a Super Fast Async Python Web Framework with a Rust runtime.

BSD-2-CLAUSE License

Downloads
114.2K
Stars
3.5K
Committers
69

Bot releases are hidden (Show)

Robyn - v0.28.1 - fix event handlers

Published by sansyrox over 1 year ago

What's Changed

Full Changelog: https://github.com/sansyrox/robyn/compare/v0.28.0...v0.28.1

Robyn - v0.28.0 - Create Robyn CLI - Start a new backend project in a jiffy

Published by sansyrox over 1 year ago

What's Changed

Full Changelog: https://github.com/sansyrox/robyn/compare/v0.27.0...v0.28.0

What's Changed

Full Changelog: https://github.com/sansyrox/robyn/compare/v0.26.1...v0.27.0

Robyn - v0.26.1 - Fix hot reloading with the `--dev` flag

Published by sansyrox over 1 year ago

What's Changed

Full Changelog: https://github.com/sansyrox/robyn/compare/v0.26.0...v0.26.1

What's Changed

New Contributors

Full Changelog: https://github.com/sansyrox/robyn/compare/v0.25.0...v0.26.0

What's Changed

New Contributors

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! πŸ”₯

Robyn - v0.24.1 - Fix terminal hijacking in Windows

Published by sansyrox over 1 year ago

What's Changed

i.e. you can exit Robyn gracefully in windows now

Full Changelog: https://github.com/sansyrox/robyn/compare/v0.24.0...v0.24.1

Robyn - v0.24.0 - Allow byte responses in Robyn

Published by sansyrox over 1 year ago

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

New Contributors

Full Changelog: https://github.com/sansyrox/robyn/compare/v0.23.1...v0.24.0

What's Changed

New Contributors

Full Changelog: https://github.com/sansyrox/robyn/compare/v0.23.0...v0.23.1

Robyn - [BREAKING CHANGE ] v0.23.0 - Replace the default port with 8080

Published by sansyrox over 1 year ago

What's Changed

New Contributors

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.

Robyn - v0.22.1 - Implement Support for Python 3.11

Published by sansyrox almost 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/sansyrox/robyn/compare/v0.22.0...v0.22.1

Robyn - v0.22.0 - Allow better response handling and fix windows support

Published by sansyrox almost 2 years ago

What's Changed

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")
Robyn - [BREAKING CHANGE] v0.21.0 - Allow serving non-html type files

Published by sansyrox almost 2 years ago

What's Changed

Full Changelog: https://github.com/sansyrox/robyn/compare/v0.20.0...v0.21.0

Robyn - v0.20.0 - [Breaking Change] - Allow non string response types

Published by sansyrox almost 2 years ago

What's Changed

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"},
    }

What's Changed

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"}),
    }

Robyn - v0.19.1 - Add templating Support and multiple performance enhancements

Published by sansyrox almost 2 years ago

What's Changed

New Contributors

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

Robyn - v0.18.3 - Fix `log-level` in Robyn

Published by sansyrox almost 2 years ago

What's Changed

Full Changelog: https://github.com/sansyrox/robyn/compare/v0.18.2...v0.18.3

Thank you @Shending-Help for finding the issue! πŸ˜„

Sample usage

Environment Variables

There are some environment variables that Robyn looks out for. e.g. ROBYN_URL and ROBYN_PORT.

You can have a robyn.env file to load them automatically in your environment.

The server will check for the robyn.env file in the root of the project. If it is able to find one, it will parse the environment variables and set your environment.

e.g. structure

--project/
  --robyn.env
  --index.py
  ...

Sample robyn.env

ROBYN_PORT=5000
ROBYN_URL=127.0.0.1

What's Changed

New Contributors

Full Changelog: https://github.com/sansyrox/robyn/compare/v0.17.5...v0.18.0

Robyn - v0.18.2 - Retain functional metadata and fix port and host url

Published by sansyrox almost 2 years ago

What's Changed

New Contributors

PR Reviews

Thanks @guilefoylegaurav for the PR reviews!

Full Changelog: https://github.com/sansyrox/robyn/compare/v0.18.1...v0.18.2

Robyn - v0.18.1 - Fix hot reload on Windows and robyn.env

Published by sansyrox almost 2 years ago

What's Changed

Fix

Chore

New Contributors

Full Changelog: https://github.com/sansyrox/robyn/compare/v0.18.0...v0.18.1