{"id":13460316,"url":"https://github.com/sparckles/Robyn","last_synced_at":"2025-03-24T18:33:33.666Z","repository":{"id":37474825,"uuid":"378100758","full_name":"sparckles/Robyn","owner":"sparckles","description":"Robyn is a Super Fast Async Python Web Framework with a Rust runtime.","archived":false,"fork":false,"pushed_at":"2024-10-28T19:56:28.000Z","size":7557,"stargazers_count":4364,"open_issues_count":132,"forks_count":228,"subscribers_count":36,"default_branch":"main","last_synced_at":"2024-10-29T15:12:56.559Z","etag":null,"topics":["async","backend","hacktoberfest","http-server","python","python3","rust","web"],"latest_commit_sha":null,"homepage":"https://robyn.tech/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sparckles.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["sansyrox"],"open_collective":"robyn_oss"}},"created_at":"2021-06-18T09:32:00.000Z","updated_at":"2024-10-28T16:34:45.000Z","dependencies_parsed_at":"2023-10-14T19:30:09.828Z","dependency_job_id":"ecb44d38-60de-47c4-a186-9d0521907e58","html_url":"https://github.com/sparckles/Robyn","commit_stats":{"total_commits":635,"total_committers":73,"mean_commits":8.698630136986301,"dds":0.5291338582677165,"last_synced_commit":"2d79ed280a64c71b551521b28803cb1881dade54"},"previous_names":["sparckles/robyn","sansyrox/robyn"],"tags_count":129,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparckles%2FRobyn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparckles%2FRobyn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparckles%2FRobyn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparckles%2FRobyn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sparckles","download_url":"https://codeload.github.com/sparckles/Robyn/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239565663,"owners_count":19660158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","backend","hacktoberfest","http-server","python","python3","rust","web"],"created_at":"2024-07-31T10:00:39.270Z","updated_at":"2025-03-24T18:33:33.660Z","avatar_url":"https://github.com/sparckles.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\u003cimg alt=\"Robyn Logo\" src=\"https://user-images.githubusercontent.com/29942790/140995889-5d91dcff-3aa7-4cfb-8a90-2cddf1337dca.png\" width=\"250\" /\u003e\u003cp\u003e\n\n# Robyn\n\n[![Twitter](https://badgen.net/badge/icon/twitter?icon=twitter\u0026label)](https://twitter.com/Robyn_oss)\n[![Downloads](https://static.pepy.tech/personalized-badge/Robyn?period=total\u0026units=international_system\u0026left_color=grey\u0026right_color=blue\u0026left_text=Downloads)](https://pepy.tech/project/Robyn)\n[![GitHub tag](https://img.shields.io/github/tag/sparckles/Robyn?include_prereleases=\u0026sort=semver\u0026color=black)](https://github.com/sparckles/Robyn/releases/)\n[![License](https://img.shields.io/badge/License-BSD_2.0-black)](https://github.com/sparckles/Robyn/blob/main/LICENSE)\n![Python](https://img.shields.io/badge/Support-Version%20%E2%89%A5%203.9-brightgreen)\n\n[![view - Documentation](https://img.shields.io/badge/view-Documentation-blue?style=for-the-badge)](https://robyn.tech/documentation)\n[![Discord](https://img.shields.io/discord/999782964143603713?label=discord\u0026logo=discord\u0026logoColor=white\u0026style=for-the-badge\u0026color=blue)](https://discord.gg/rkERZ5eNU8)\n[![Gurubase](https://img.shields.io/badge/Gurubase-Ask%20Robyn%20Guru-006BFF?style=for-the-badge)](https://gurubase.io/g/robyn)\n\nRobyn is a High-Performance, Community-Driven, and Innovator Friendly Web Framework with a Rust runtime. You can learn more by checking our [community resources](https://robyn.tech/documentation/community-resources)!\n\n\u003cimg width=\"652\" alt=\"image\" src=\"https://github.com/sparckles/Robyn/assets/29942790/4a2bba61-24e7-4ee2-8884-19b40204bfcd\"\u003e\n\n\nSource: [TechEmpower Round 22](https://www.techempower.com/benchmarks/#section=data-r22\u0026test=plaintext)\n\n## 📦 Installation\n\nYou can simply use Pip for installation.\n\n```\npip install robyn\n```\n\nOr, with [conda-forge](https://conda-forge.org/)\n\n```\nconda install -c conda-forge robyn\n```\n\n## 🤔 Usage\n\n### 🚀 Define your API\n\nTo define your API, you can add the following code in an `app.py` file.\n\n```python\nfrom robyn import Robyn\n\napp = Robyn(__file__)\n\n@app.get(\"/\")\nasync def h(request):\n    return \"Hello, world!\"\n\napp.start(port=8080)\n```\n\n### 🏃 Run your code\n\nSimply 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.\n\n```\n$ python3 app.py\n```\n\nTo see the usage\n\n```\nusage: app.py [-h] [--processes PROCESSES] [--workers WORKERS] [--dev] [--log-level LOG_LEVEL]\n\nRobyn, a fast async web framework with a rust runtime.\n\noptions:\n  -h, --help            show this help message and exit\n  --processes PROCESSES\n                        Choose the number of processes. [Default: 1]\n  --workers WORKERS     Choose the number of workers. [Default: 1]\n  --dev                 Development mode. It restarts the server based on file changes.\n  --log-level LOG_LEVEL\n                        Set the log level name\n  --create              Create a new project template.\n  --docs                Open the Robyn documentation.\n  --open-browser        Open the browser on successful start.\n  --version             Show the Robyn version.\n  --compile-rust-path COMPILE_RUST_PATH\n                        Compile rust files in the given path.\n  --create-rust-file CREATE_RUST_FILE\n                        Create a rust file with the given name.\n  --disable-openapi     Disable the OpenAPI documentation.\n  --fast                Enable the fast mode.\n```\n\nLog level can be `DEBUG`, `INFO`, `WARNING`, or `ERROR`.\n\nWhen running the app using `--open-browser` a new browser window will open at the app location, e.g:\n\n```\n$ python3 app.py --open-browser\n```\n\n### 💻 Add more routes\n\nYou can add more routes to your API. Check out the routes in [this file](https://github.com/sparckles/Robyn/blob/main/integration_tests/base_routes.py) as examples.\n\n## 🐍 Python Version Support\n\nRobyn is compatible with the following Python versions:\n\n\u003e Python \u003e= 3.9\n\nIt is recommended to use the latest version of Python for the best performances.\n\nPlease make sure you have the correct version of Python installed before starting to use\nthis project. You can check your Python version by running the following command in your\nterminal:\n\n```bash\npython --version\n```\n\n## 💡 Features\n\n- Under active development!\n- Written in Rust, btw xD\n- A multithreaded Runtime\n- Extensible\n- Automatic OpenAPI generation\n- A simple API\n- Sync and Async Function Support\n- Dynamic URL Routing\n- Multi Core Scaling\n- WebSockets!\n- Middlewares\n- Built in form data handling\n- Dependency Injection\n- Hot Reloading\n- Direct Rust Integration\n- Community First and truly FOSS!\n\n## 🗒️ How to contribute\n\n### 🏁 Get started\n\nPlease read the [code of conduct](https://github.com/sparckles/Robyn/blob/main/CODE_OF_CONDUCT.md) and go through [CONTRIBUTING.md](https://github.com/sparckles/Robyn/blob/main/CONTRIBUTING.md) before contributing to Robyn.\nFeel free to open an issue for any clarifications or suggestions.\n\nIf you're feeling curious. You can take a look at a more detailed architecture [here](https://robyn.tech/documentation/architecture).\n\nIf you still need help to get started, feel free to reach out on our [community discord](https://discord.gg/rkERZ5eNU8).\n\n### ⚙️ To Develop Locally\n\n#### Prerequisites\n\nBefore starting, ensure you have the following installed:\n- Python \u003e= 3.9, \u003c= 3.12 , Support for Python 3.13 is coming soon!\n- Rust (latest stable)\n- C compiler (gcc/clang)\n\n#### Setup\n\n- Clone the repository:\n\n  ```\n  git clone https://github.com/sparckles/Robyn.git\n  ```\n\n- Setup a virtual environment:\n  ```\n  python3 -m venv .venv\n  source .venv/bin/activate\n  ```\n\n- Install required packages\n\n  ```\n  pip install pre-commit poetry maturin\n  ```\n- Install development dependencies\n  ```\n  poetry install --with dev --with test\n  ```\n- Install pre-commit git hooks\n  ```\n  pre-commit install\n  ```\n- Build \u0026 install Robyn Rust package\n  ```\n  maturin develop\n  ```\n- Build \u0026 install Robyn Rust package (**experimental**)\n  ```\n  maturin develop --cargo-extra-args=\"--features=io-uring\"\n  ```\n- Run!\n  ```\n  poetry run test_server\n  ```\n- Run all tests\n  ```\n  pytest\n  ```\n- Run only the integration tests\n  ```\n  pytest integration_tests\n  ```\n- Run only the unit tests (you don't need to be running the test_server for these)\n  ```\n  pytest unit_tests\n  ```\n- Test (refer to `integration_tests/base_routes.py` for more endpoints)\n  ```\n  curl http://localhost:8080/sync/str\n  ```\n\n- **tip:** One liners for testing changes!\n  ```\n  maturin develop \u0026\u0026 poetry run test_server\n\n  maturin develop \u0026\u0026 pytest \n  ```\n\n- **tip:** For IO-uring support, you can use the following command:\n  ```\n  maturin develop --cargo-extra-args=\"--features=io-uring\"\n  ```\n\n- **tip:** To use your local Robyn version in other projects, you can install it using pip:\n  ```\n  pip install -e path/to/robyn/target/wheels/robyn-\u003cversion\u003e-\u003cpython_version\u003e-\u003cplatform\u003e.whl\n  ```\ne.g.\n  ```\n  pip install -e /repos/Robyn/target/wheels/robyn-0.63.0-cp312-cp312-macosx_10_15_universal2.whl\n  ```\n\n#### Troubleshooting\nIf you face any issues, here are some common fixes:\n  - install `patchelf` with `pip install patchelf` if you face `patchelf` not found issue during `maturin develop` (esp. on Arch Linux)\n  - If you get Rust compilation errors, ensure you have a C compiler installed:\n    - Ubuntu/Debian: `sudo apt install build-essential`\n    - Fedora: `sudo dnf install gcc`\n    - macOS: Install Xcode Command Line Tools\n    - Windows: Install Visual Studio Build Tools\n\n\n## ✨ Special thanks\n\n### ✨ Contributors/Supporters\n\nThanks to all the contributors of the project. Robyn will not be what it is without all your support :heart:.\n\n\u003ca href=\"https://github.com/sparckles/Robyn/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=sparckles/Robyn\" /\u003e\n\u003c/a\u003e\n\nSpecial 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. 💖\n\n### ✨ Sponsors\n\nThese sponsors help us make the magic happen!\n\n[![DigitalOcean Referral Badge](https://web-platforms.sfo2.cdn.digitaloceanspaces.com/WWW/Badge%201.svg)](https://www.digitalocean.com/?refcode=3f2b9fd4968d\u0026utm_campaign=Referral_Invite\u0026utm_medium=Referral_Program\u0026utm_source=badge)\n[![Appwrite Logo](https://avatars.githubusercontent.com/u/25003669?s=105\u0026v=1)](https://github.com/appwrite)\n\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=sparckles/Robyn\u0026type=Date)](https://star-history.com/#sparckles/Robyn\u0026Date)\n","funding_links":["https://github.com/sponsors/sansyrox","https://opencollective.com/robyn_oss"],"categories":["语言资源库","Python","Web \u0026 Networking","后端开发框架及项目","Web Frameworks","backend","Web Servers \u0026 Frameworks"],"sub_categories":["rust","后端项目_其他"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparckles%2FRobyn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsparckles%2FRobyn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparckles%2FRobyn/lists"}