Skip to content

Commit f4cb518

Browse files
committed
docs: improve readme
1 parent 5f437d1 commit f4cb518

File tree

4 files changed

+60
-126
lines changed

4 files changed

+60
-126
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Let's walk through the steps to create an issue:
109109
**4.** Select one of the Issue Templates to get started.
110110
<br><br><img src="https://i.imgur.com/xz2KAwU.png" width="750" /><br>
111111

112-
**4.** Fill in the appropriate `Title` and `Issue description` and click on `Submit new issue`.
112+
**5.** Fill in the appropriate `Title` and `Issue description` and click on `Submit new issue`.
113113
<br><br><img src="https://i.imgur.com/XwjtGG1.png" width="750" /><br>
114114

115115
### Tutorials that may help you:

README.md

+48-34
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,15 @@
33
# Robyn
44

55
[![Twitter](https://badgen.net/badge/icon/twitter?icon=twitter&label)](https://twitter.com/robyn_oss)
6-
[![Gitter](https://badges.gitter.im/robyn_/community.svg)](https://gitter.im/robyn_/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
76
[![Downloads](https://static.pepy.tech/personalized-badge/robyn?period=total&units=international_system&left_color=grey&right_color=blue&left_text=Downloads)](https://pepy.tech/project/robyn)
8-
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
97
[![GitHub tag](https://img.shields.io/github/tag/sansyrox/robyn?include_prereleases=&sort=semver&color=black)](https://github.com/sansyrox/robyn/releases/)
108
[![License](https://img.shields.io/badge/License-BSD_2.0-black)](#license)
119
![Python](https://img.shields.io/badge/Support-Version%20%E2%89%A5%203.7-brightgreen)
12-
[![Discord](https://img.shields.io/discord/999782964143603713?label=discord&logo=discord&logoColor=white&style=for-the-badge&color=blue)](https://discord.gg/rkERZ5eNU8)
1310

1411
[![view - Documentation](https://img.shields.io/badge/view-Documentation-blue?style=for-the-badge)](https://sansyrox.github.io/robyn/#/)
12+
[![Discord](https://img.shields.io/discord/999782964143603713?label=discord&logo=discord&logoColor=white&style=for-the-badge&color=blue)](https://discord.gg/rkERZ5eNU8)
1513

16-
Robyn is a fast async Python web server with a runtime written in Rust.
17-
18-
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)
14+
Robyn is a fast async Python web framework coupled with a web server written in Rust. You can learn more by checking our [community resources](https://sansyrox.github.io/robyn/#/community-resources)!
1915

2016
## 📦 Installation
2117

@@ -33,6 +29,10 @@ conda install -c conda-forge robyn
3329

3430
## 🤔 Usage
3531

32+
### 🚀 Define your API
33+
34+
To define your API, you can add the following code in an `app.py` file.
35+
3636
```python
3737
from robyn import Robyn
3838

@@ -43,17 +43,40 @@ async def h(request):
4343
return "Hello, world!"
4444

4545
app.start(port=8080)
46+
```
47+
48+
### 🏃 Run your code
49+
50+
Simply run the app.py file you created. You will then have access to a server on the `localhost:8080`, that you can request from an other program. Robyn provides several options to customize your web server.
51+
52+
```
53+
$ python3 app.py -h
4654
55+
usage: app.py [-h] [--processes PROCESSES] [--workers WORKERS] [--dev] [--log-level LOG_LEVEL]
56+
57+
Robyn, a fast async web framework with a rust runtime.
58+
59+
options:
60+
-h, --help show this help message and exit
61+
--processes PROCESSES Choose the number of processes. [Default: 1]
62+
--workers WORKERS Choose the number of workers. [Default: 1]
63+
--dev Development mode. It restarts the server based on file changes.
64+
--log-level LOG_LEVEL Set the log level name
4765
```
4866

49-
## Python Version Support
67+
Log level can be `DEBUG`, `INFO`, `WARNING`, or `ERROR`.
68+
69+
### 💻 Add more routes
70+
71+
You can add more routes to your API. Check out the routes in [this file](https://github.com/sansyrox/robyn/blob/main/integration_tests/base_routes.py) as examples.
72+
73+
## 🐍 Python Version Support
5074

5175
Robyn is compatible with the following Python versions:
5276

5377
> Python >= 3.7
5478
55-
It is recommended to use the latest version of Python for the best performance
56-
and compatibility
79+
It is recommended to use the latest version of Python for the best performances.
5780

5881
Please make sure you have the correct version of Python installed before starting to use
5982
this project. You can check your Python version by running the following command in your
@@ -79,44 +102,35 @@ python --version
79102
- Hot Reloading
80103
- Community First and truly FOSS!
81104

82-
## 🗒️ Contributor Guidelines
105+
## 🗒️ How to contribute
83106

84-
Feel free to open an issue for any clarification or for any suggestions.
107+
### 🏁 Get started
85108

86-
If you're feeling curious. You can take a look at a more detailed architecture [here](https://github.com/sansyrox/robyn/blob/main/docs/architecture.md).
109+
Please read the [code of conduct](https://github.com/sansyrox/robyn/blob/main/CODE_OF_CONDUCT.md) and go through [CONTRIBUTING.md](https://github.com/sansyrox/robyn/blob/main/CONTRIBUTING.md) before contributing to Robyn.
110+
Feel free to open an issue for any clarifications or suggestions.
87111

88-
## ⚙️ To Develop Locally
112+
If you're feeling curious. You can take a look at a more detailed architecture [here](https://sansyrox.github.io/robyn/#/architecture).
89113

90-
1. Install the development dependencies: `pip install -r dev-requirements.txt`
114+
If you still need help to get started, feel free to reach out on our [community discord](https://discord.gg/rkERZ5eNU8).
91115

92-
1. Install the pre-commit git hooks: `pre-commit install`
116+
### ⚙️ To Develop Locally
93117

94-
1. Add more routes in the `integration_tests/base_routes.py` file (if you like).
118+
1. Install the development dependencies (preferably inside a virtual environment): `pip install -r dev-requirements.txt`
95119

96-
1. Run `maturin develop` or `maturin develop --cargo-extra-args="--features=io-uring"` (if you want to run the experimental version).
120+
2. Install the pre-commit git hooks: `pre-commit install`
97121

98-
1. Run `python3 integration_tests/base_routes.py`
122+
3. Run `maturin develop` or `maturin develop --cargo-extra-args="--features=io-uring"` for using the experimental version of actix-web. This command will build the Robyn Rust package and install it in your virtual environment.
99123

100-
## 🏃 To Run
124+
4. Run `python3 integration_tests/base_routes.py`. This file contains several examples of routes we use for testing purposes. You can modify or add some to your likings.
101125

126+
You can then request the server you ran from an other terminal. Here is a `GET` request done using [curl](https://curl.se/) for example:
102127
```
103-
python3 app.py -h
104-
105-
usage: app.py [-h] [--processes PROCESSES] [--workers WORKERS] [--dev DEV]
106-
107-
Robyn, a fast async web framework with a rust runtime.
108-
109-
optional arguments:
110-
-h, --help show this help message and exit
111-
--processes PROCESSES : allows you to choose the number of parallel processes
112-
--workers WORKERS : allows you to choose the number of workers
113-
--dev DEV : this flag gives the option to enable hot reloading or not and also sets the default log level to debug
114-
--log-level LEVEL : this flag allows you to set the log level
128+
curl http://localhost:8080/sync/str
115129
```
116130

117-
## Contributors/Supporters
131+
## Special thanks
118132

119-
To contribute to Robyn, make sure to first go through the [CONTRIBUTING.md](./CONTRIBUTING.md).
133+
### ✨ Contributors/Supporters
120134

121135
Thanks to all the contributors of the project. Robyn will not be what it is without all your support :heart:.
122136

@@ -126,7 +140,7 @@ Thanks to all the contributors of the project. Robyn will not be what it is with
126140

127141
Special thanks to the [PyO3](https://pyo3.rs/v0.13.2/) community and [Andrew from PyO3-asyncio](https://github.com/awestlake87/pyo3-asyncio) for their amazing libraries and their support for my queries. 💖
128142

129-
## ✨ Sponsors
143+
### ✨ Sponsors
130144

131145
These sponsors help us make the magic happen!
132146

docs/README.md

+10-91
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,20 @@
11
<img alt="Robyn Logo" src="https://user-images.githubusercontent.com/29942790/140995889-5d91dcff-3aa7-4cfb-8a90-2cddf1337dca.png" width="250" />
22

3-
# Robyn
3+
# Robyn's documentation
44

5-
[![Twitter](https://badgen.net/badge/icon/twitter?icon=twitter&label)](https://twitter.com/robyn_oss)
6-
[![Gitter](https://badges.gitter.im/robyn_/community.svg)](https://gitter.im/robyn_/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
7-
[![Downloads](https://static.pepy.tech/personalized-badge/robyn?period=total&units=international_system&left_color=grey&right_color=blue&left_text=Downloads)](https://pepy.tech/project/robyn)
8-
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
9-
[![GitHub tag](https://img.shields.io/github/tag/sansyrox/robyn?include_prereleases=&sort=semver&color=black)](https://github.com/sansyrox/robyn/releases/)
10-
[![License](https://img.shields.io/badge/License-BSD_2.0-black)](#license)
11-
[![Discord](https://img.shields.io/discord/999782964143603713?label=discord&logo=discord&logoColor=white&style=for-the-badge&color=blue)](https://discord.gg/qKF5sSnC)
5+
## 🔎 Overview
126

13-
[![view - Documentation](https://img.shields.io/badge/view-Documentation-blue?style=for-the-badge)](https://sansyrox.github.io/robyn/#/)
7+
Welcome to Robyn's documentation!
148

15-
Robyn is an async Python backend server with a runtime written in Rust, btw.
9+
Robyn is a Python web framework coupled with an async server implementation written in Rust. You can find the source code on [Github](https://github.com/sansyrox/robyn), contributions are very welcome!
1610

17-
## 📦 Installation
11+
On this website, you will find more information on how to use Robyn.
1812

19-
You can simply use Pip for installation.
13+
If you do not find what you were looking for here or have some suggestions to improve the docs, feel free to open an issue on the [Github repo](https://github.com/sansyrox/robyn), or ask for help on the official [Discord server](https://discord.gg/rkERZ5eNU8).
2014

21-
```
22-
pip install robyn
23-
```
15+
## ✨ Special thanks
2416

25-
Or, with [conda-forge](https://conda-forge.org/)
26-
27-
```
28-
conda install -c conda-forge robyn
29-
```
30-
31-
## 🤔 Usage
32-
33-
```python
34-
from robyn import Robyn
35-
36-
app = Robyn(__file__)
37-
38-
39-
@app.get("/")
40-
async def h(request):
41-
return "Hello, world!"
42-
43-
app.start(port=8080)
44-
```
45-
46-
## 💡 Features
47-
48-
- Under active development!
49-
- Written in Rust, btw xD
50-
- A multithreaded Runtime
51-
- Extensible
52-
- A simple API
53-
- Sync and Async Function Support
54-
- Dynamic URL Routing
55-
- Multi Core Scaling
56-
- WebSockets!
57-
- Middlewares
58-
- Hot Reloading
59-
- Community First and truly FOSS!
60-
61-
## 🗒️ Contributor Guidelines
62-
63-
Feel free to open an issue for any clarification or for any suggestions.
64-
65-
If you're feeling curious. You can take a look at a more detailed architecture [here](https://github.com/sansyrox/robyn/blob/main/docs/architecture.md).
66-
67-
## ⚙️ To Develop Locally
68-
69-
1. Install the development dependencies: `pip install -r dev-requirements.txt`
70-
71-
1. Install the pre-commit git hooks: `pre-commit install`
72-
73-
1. Add more routes in the `integration_tests/base_routes.py` file(if you like).
74-
75-
1. Run `maturin develop` or `maturin develop --cargo-extra-args="--features=io-uring"` (if you want to run the experimental version).
76-
77-
1. Run `python3 integration_tests/base_routes.py`
78-
79-
## 🏃 To Run
80-
81-
```
82-
python3 app.py -h
83-
84-
usage: app.py [-h] [--processes PROCESSES] [--workers WORKERS] [--dev DEV]
85-
86-
Robyn, a fast async web framework with a rust runtime.
87-
88-
optional arguments:
89-
-h, --help show this help message and exit
90-
--processes PROCESSES : allows you to choose the number of parallel processes
91-
--workers WORKERS : allows you to choose the number of workers
92-
--dev DEV : this flag gives the option to enable hot reloading or not and also sets the default log level to debug
93-
--log-level LEVEL : this flag allows you to set the log level
94-
```
95-
96-
## ✨ Contributors/Supporters
97-
98-
To contribute to Robyn, make sure to first go through the [CONTRIBUTING.md](https://github.com/sansyrox/robyn/blob/main/CONTRIBUTING.md).
17+
### ✨ Contributors/Supporters
9918

10019
Thanks to all the contributors of the project. Robyn will not be what it is without all your support :heart:.
10120

@@ -105,11 +24,11 @@ Thanks to all the contributors of the project. Robyn will not be what it is with
10524

10625
Special thanks to the [PyO3](https://pyo3.rs/v0.13.2/) community and [Andrew from PyO3-asyncio](https://github.com/awestlake87/pyo3-asyncio) for their amazing libraries and their support for my queries. 💖
10726

108-
## ✨ Sponsors
27+
### ✨ Sponsors
10928

11029
These sponsors help us make the magic happen!
11130

11231
[![DigitalOcean Referral Badge](https://web-platforms.sfo2.cdn.digitaloceanspaces.com/WWW/Badge%201.svg)](https://www.digitalocean.com/?refcode=3f2b9fd4968d&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge)
11332
[![Appwrite Logo](https://avatars.githubusercontent.com/u/25003669?s=105&v=1)](https://github.com/appwrite)
11433

115-
- [Shivay Lamba](https://github.com/shivaylamba)
34+
- [Shivay Lamba](https://github.com/shivaylamba)

docs/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
name="viewport"
1313
content="width=device-width, initial-scale=1.0, minimum-scale=1.0"
1414
/>
15+
<link rel="icon" href="https://user-images.githubusercontent.com/29942790/140995889-5d91dcff-3aa7-4cfb-8a90-2cddf1337dca.png" />
1516
<link
1617
rel="stylesheet"
1718
href="//cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/dist/style.min.css"

0 commit comments

Comments
 (0)