diff --git a/docs/README.md b/docs/README.md index 225836a12..3625c0d67 100644 --- a/docs/README.md +++ b/docs/README.md @@ -17,8 +17,6 @@ Robyn is an async Python backend server with a runtime written in Rust, btw. -Check out the talk at **PyCon Sweden 2021** about [Robyn: An async python web framework with a Rust runtime](https://www.youtube.com/watch?v=DK9teAs72Do) - ## 📦 Installation You can simply use Pip for installation. diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 9321a39bb..42c3d2a69 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -11,5 +11,6 @@ - [Community Resources](community-resources.md) - [Future Roadmap](roadmap.md) - [Plugins](plugins.md) +- [Hosting](hosting.md) - [Sponsors](sponsors.md) diff --git a/docs/features.md b/docs/features.md index 956f03c27..184c3c267 100644 --- a/docs/features.md +++ b/docs/features.md @@ -1,7 +1,9 @@ ## Features -### Synchronous Requests +## Synchronous Requests +Robyn supports both sync methods and async methods for fetching requests. Every method gets a request object from the routing decorator. + ```python3 @app.get("/") @@ -9,7 +11,7 @@ def h(): return "Hello, world" ``` -### Async Requests +## Async Requests ```python3 @app.get("/") @@ -18,12 +20,12 @@ async def h(): ``` -### All kinds of HTTP Requests -Robyn supports both sync methods and async methods for fetching requests. Every method gets a request object from the routing decorator. +## All kinds of HTTP Requests The request object contains the `body` in PUT/POST/PATCH. The `header`s are available in every request object. Robyn supports every HTTP request method. The examples of some of them are below: + #### GET Request ```python3 @@ -77,7 +79,7 @@ app.add_directory( ) ``` -### Dynamic Routes +## Dynamic Routes You can add params in the routes and access them from the request object. ```python3 @@ -87,7 +89,7 @@ async def json(request): return jsonify({"hello": "world"}) ``` -### Returning a JSON Response +## Returning a JSON Response You can also serve JSON responses when serving HTTP request using the following way. ```python3 @@ -99,7 +101,7 @@ async def json(request): return jsonify({"hello": "world"}) ``` -### Global Headers +## Global Headers You can also add global headers for every request. ```python3 @@ -108,7 +110,7 @@ app.add_header("server", "robyn") ``` -### Query Params +## Query Params You can access query params from every HTTP method. @@ -124,7 +126,7 @@ async def query_get(request): ``` -### Events +## Events 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. @@ -140,7 +142,7 @@ def shutdown_handler(): print("Shutting down") ``` -### WebSockets +## WebSockets You can now serve websockets using Robyn. @@ -189,7 +191,7 @@ The three methods: To see a complete service in action, you can go to the folder [../integration_tests/base_routes.py](../integration_tests/base_routes.py) -### Usage +#### Web Socket Usage ```python3 @websocket.on("message") @@ -216,7 +218,7 @@ async def message(): ``` -### Middlewares +## Middlewares You can use both sync and async functions for middlewares! @@ -231,7 +233,7 @@ def hello_after_request(request): print(request) ``` -### MultiCore Scaling +## MultiCore Scaling To run Robyn across multiple cores, you can use the following command: @@ -239,7 +241,7 @@ To run Robyn across multiple cores, you can use the following command: -### Const Requests +## Const Requests You can pre-compute the response for each route. This will compute the response even before execution. This will improve the response time bypassing the need to access the router. diff --git a/docs/getting-started.md b/docs/getting-started.md index 053d5a8c3..85ac39cae 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -44,11 +44,11 @@ app.start(port=5000, url="0.0.0.0") # url is optional, defaults to 127.0.0.1 Let us try to decipher the usage line by line. -> from robyn import Robyn +> `from robyn import Robyn` This statement just imports the Robyn structure from the robyn package. -> app = Robyn(__file__) +> `app = Robyn(__file__)` Here, we are creating the app object. We require the `__file__` object to mount the directory for hot reloading. diff --git a/docs/hosting.md b/docs/hosting.md new file mode 100644 index 000000000..305a25d9a --- /dev/null +++ b/docs/hosting.md @@ -0,0 +1,5 @@ +## Hosting + +The process of hosting a Robyn app on various cloud providers. + +Coming Soon.... diff --git a/docs/roadmap.md b/docs/roadmap.md index e9d368ae0..880923132 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -1,11 +1,13 @@ ## Future Roadmap -- #### More Performance Optimizations -- Add graphql integration -- And more... - - -### Planned Integrations -- #### OpenAPI Integration -- #### Pydantic Integration -- #### GraphQL(Strawberry) Integration +- Add performance optimizations +- OpenAPI Integration +- Pydantic Integration +- Implement Auto Const Requests +- Add ORM support, especially Prisma integration +- Improve Plugin Ecosystem +- Better Documentation +- Improve the Websockets +- Template Support +- Graphql integration with Strawberry +- Invest more time in the community around Robyn. diff --git a/docs/usage.md b/docs/usage.md deleted file mode 100644 index d539f2a0f..000000000 --- a/docs/usage.md +++ /dev/null @@ -1 +0,0 @@ -##