Showing preview only (1,242K chars total). Download the full file or copy to clipboard to get everything.
Repository: sparckles/Robyn
Branch: main
Commit: 4c3be944961c
Files: 346
Total size: 1.1 MB
Directory structure:
gitextract_zt3t3gjh/
├── .cargo/
│ └── config
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── blank_issue.md
│ │ ├── bug_report.yml
│ │ ├── config.yml
│ │ └── feature_request.md
│ ├── dependabot.yml
│ ├── pull_request_template.md
│ └── workflows/
│ ├── codspeed.yml
│ ├── lint-pr.yml
│ ├── preview-deployments.yml
│ ├── python-CI.yml
│ ├── release-CI.yml
│ └── rust-CI.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .well-known/
│ └── funding-manifest-urls
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Cargo.toml
├── LICENSE
├── README.md
├── benchmark.sh
├── ci-local.sh
├── docs_src/
│ ├── .eslintrc.json
│ ├── .gitignore
│ ├── README.md
│ ├── jsconfig.json
│ ├── mdx/
│ │ ├── recma.mjs
│ │ ├── rehype.mjs
│ │ └── remark.mjs
│ ├── next.config.mjs
│ ├── package.json
│ ├── postcss.config.js
│ ├── prettier.config.js
│ ├── public/
│ │ ├── funding.json
│ │ └── llms.txt
│ ├── src/
│ │ ├── components/
│ │ │ ├── Button.jsx
│ │ │ ├── Card.jsx
│ │ │ ├── Container.jsx
│ │ │ ├── Footer.jsx
│ │ │ ├── Header.jsx
│ │ │ ├── Prose.jsx
│ │ │ ├── Section.jsx
│ │ │ ├── SimpleLayout.jsx
│ │ │ ├── SocialIcons.jsx
│ │ │ ├── Testimonials.jsx
│ │ │ ├── documentation/
│ │ │ │ ├── ApiDocs.jsx
│ │ │ │ ├── BottomNavbar.jsx
│ │ │ │ ├── Button.jsx
│ │ │ │ ├── Code.jsx
│ │ │ │ ├── Guides.jsx
│ │ │ │ ├── Heading.jsx
│ │ │ │ ├── HeroPattern.jsx
│ │ │ │ ├── LanguageSelector.jsx
│ │ │ │ ├── Layout.jsx
│ │ │ │ ├── Libraries.jsx
│ │ │ │ ├── MobileNavigation.jsx
│ │ │ │ ├── ModeToggle.jsx
│ │ │ │ ├── Navigation.jsx
│ │ │ │ ├── Prose.jsx
│ │ │ │ ├── Search.jsx
│ │ │ │ ├── SectionProvider.jsx
│ │ │ │ ├── Tag.jsx
│ │ │ │ ├── icons/
│ │ │ │ │ ├── BellIcon.jsx
│ │ │ │ │ ├── BoltIcon.jsx
│ │ │ │ │ ├── BookIcon.jsx
│ │ │ │ │ ├── CalendarIcon.jsx
│ │ │ │ │ ├── CartIcon.jsx
│ │ │ │ │ ├── ChatBubbleIcon.jsx
│ │ │ │ │ ├── CheckIcon.jsx
│ │ │ │ │ ├── ChevronRightLeftIcon.jsx
│ │ │ │ │ ├── ClipboardIcon.jsx
│ │ │ │ │ ├── CogIcon.jsx
│ │ │ │ │ ├── CopyIcon.jsx
│ │ │ │ │ ├── DocumentIcon.jsx
│ │ │ │ │ ├── EnvelopeIcon.jsx
│ │ │ │ │ ├── FaceSmileIcon.jsx
│ │ │ │ │ ├── FolderIcon.jsx
│ │ │ │ │ ├── LinkIcon.jsx
│ │ │ │ │ ├── ListIcon.jsx
│ │ │ │ │ ├── MagnifyingGlassIcon.jsx
│ │ │ │ │ ├── MapPinIcon.jsx
│ │ │ │ │ ├── PackageIcon.jsx
│ │ │ │ │ ├── PaperAirplaneIcon.jsx
│ │ │ │ │ ├── PaperClipIcon.jsx
│ │ │ │ │ ├── ShapesIcon.jsx
│ │ │ │ │ ├── ShirtIcon.jsx
│ │ │ │ │ ├── SquaresPlusIcon.jsx
│ │ │ │ │ ├── TagIcon.jsx
│ │ │ │ │ ├── UserIcon.jsx
│ │ │ │ │ └── UsersIcon.jsx
│ │ │ │ └── mdx.jsx
│ │ │ └── releases/
│ │ │ ├── Button.jsx
│ │ │ ├── FeedProvider.jsx
│ │ │ ├── FormattedDate.jsx
│ │ │ ├── IconLink.jsx
│ │ │ ├── Intro.jsx
│ │ │ ├── Layout.jsx
│ │ │ ├── SignUpForm.jsx
│ │ │ └── mdx.jsx
│ │ ├── lib/
│ │ │ ├── formatDate.js
│ │ │ ├── getAllArticles.js
│ │ │ └── remToPx.js
│ │ ├── pages/
│ │ │ ├── _app.jsx
│ │ │ ├── _document.jsx
│ │ │ ├── community.jsx
│ │ │ ├── documentation/
│ │ │ │ ├── en/
│ │ │ │ │ ├── api_reference/
│ │ │ │ │ │ ├── advanced_features.mdx
│ │ │ │ │ │ ├── advanced_routing.mdx
│ │ │ │ │ │ ├── agents.mdx
│ │ │ │ │ │ ├── ai.mdx
│ │ │ │ │ │ ├── architecture_deep_dive.mdx
│ │ │ │ │ │ ├── authentication.mdx
│ │ │ │ │ │ ├── const_requests.mdx
│ │ │ │ │ │ ├── cors.mdx
│ │ │ │ │ │ ├── dependency_injection.mdx
│ │ │ │ │ │ ├── exceptions.mdx
│ │ │ │ │ │ ├── file-uploads.mdx
│ │ │ │ │ │ ├── form_data.mdx
│ │ │ │ │ │ ├── future-roadmap.mdx
│ │ │ │ │ │ ├── getting_started.mdx
│ │ │ │ │ │ ├── graphql-support.mdx
│ │ │ │ │ │ ├── index.mdx
│ │ │ │ │ │ ├── mcps.mdx
│ │ │ │ │ │ ├── middlewares.mdx
│ │ │ │ │ │ ├── multiprocess_execution.mdx
│ │ │ │ │ │ ├── openapi.mdx
│ │ │ │ │ │ ├── pydantic.mdx
│ │ │ │ │ │ ├── redirection.mdx
│ │ │ │ │ │ ├── request_object.mdx
│ │ │ │ │ │ ├── robyn_env.mdx
│ │ │ │ │ │ ├── scaling.mdx
│ │ │ │ │ │ ├── server_sent_events.mdx
│ │ │ │ │ │ ├── templating.mdx
│ │ │ │ │ │ ├── timeout_configuration.mdx
│ │ │ │ │ │ ├── using_rust_directly.mdx
│ │ │ │ │ │ ├── websockets.mdx
│ │ │ │ │ │ └── zh/
│ │ │ │ │ │ └── getting_started.mdx
│ │ │ │ │ ├── architecture.mdx
│ │ │ │ │ ├── community-resources.mdx
│ │ │ │ │ ├── example_app/
│ │ │ │ │ │ ├── authentication-middlewares.mdx
│ │ │ │ │ │ ├── authentication.mdx
│ │ │ │ │ │ ├── deployment.mdx
│ │ │ │ │ │ ├── index.mdx
│ │ │ │ │ │ ├── modeling_routes.mdx
│ │ │ │ │ │ ├── monitoring_and_logging.mdx
│ │ │ │ │ │ ├── openapi.mdx
│ │ │ │ │ │ ├── real_time_notifications.mdx
│ │ │ │ │ │ ├── subrouters.mdx
│ │ │ │ │ │ ├── templates.mdx
│ │ │ │ │ │ └── zh/
│ │ │ │ │ │ ├── index.mdx
│ │ │ │ │ │ └── subrouters.mdx
│ │ │ │ │ ├── framework_performance_comparison.mdx
│ │ │ │ │ ├── hosting.mdx
│ │ │ │ │ ├── index.mdx
│ │ │ │ │ └── plugins.mdx
│ │ │ │ └── zh/
│ │ │ │ ├── api_reference/
│ │ │ │ │ ├── advanced_features.mdx
│ │ │ │ │ ├── authentication.mdx
│ │ │ │ │ ├── const_requests.mdx
│ │ │ │ │ ├── cors.mdx
│ │ │ │ │ ├── dependency_injection.mdx
│ │ │ │ │ ├── exceptions.mdx
│ │ │ │ │ ├── file-uploads.mdx
│ │ │ │ │ ├── form_data.mdx
│ │ │ │ │ ├── future-roadmap.mdx
│ │ │ │ │ ├── getting_started.mdx
│ │ │ │ │ ├── graphql-support.mdx
│ │ │ │ │ ├── index.mdx
│ │ │ │ │ ├── middlewares.mdx
│ │ │ │ │ ├── multiprocess_execution.mdx
│ │ │ │ │ ├── openapi.mdx
│ │ │ │ │ ├── pydantic.mdx
│ │ │ │ │ ├── redirection.mdx
│ │ │ │ │ ├── request_object.mdx
│ │ │ │ │ ├── robyn_env.mdx
│ │ │ │ │ ├── scaling.mdx
│ │ │ │ │ ├── server_sent_events.mdx
│ │ │ │ │ ├── templating.mdx
│ │ │ │ │ ├── timeout_configuration.mdx
│ │ │ │ │ ├── using_rust_directly.mdx
│ │ │ │ │ ├── views.mdx
│ │ │ │ │ └── websockets.mdx
│ │ │ │ ├── architecture.mdx
│ │ │ │ ├── community-resources.mdx
│ │ │ │ ├── example_app/
│ │ │ │ │ ├── authentication-middlewares.mdx
│ │ │ │ │ ├── authentication.mdx
│ │ │ │ │ ├── deployment.mdx
│ │ │ │ │ ├── index.mdx
│ │ │ │ │ ├── modeling_routes.mdx
│ │ │ │ │ ├── monitoring_and_logging.mdx
│ │ │ │ │ ├── openapi.mdx
│ │ │ │ │ ├── real_time_notifications.mdx
│ │ │ │ │ ├── subrouters_and_views.mdx
│ │ │ │ │ └── templates.mdx
│ │ │ │ ├── framework_performance_comparison.mdx
│ │ │ │ ├── hosting.mdx
│ │ │ │ ├── index.mdx
│ │ │ │ └── plugins.mdx
│ │ │ ├── index.jsx
│ │ │ └── releases/
│ │ │ └── index.jsx
│ │ └── styles/
│ │ ├── documentation.css
│ │ ├── prism.css
│ │ ├── releases/
│ │ │ ├── base.css
│ │ │ ├── components.css
│ │ │ ├── tailwind.css
│ │ │ ├── typography.css
│ │ │ └── utilities.css
│ │ └── tailwind.css
│ └── tailwind.config.js
├── examples/
│ ├── agents.py
│ ├── mcp.py
│ └── sse_example.py
├── integration_tests/
│ ├── __init__.py
│ ├── base_routes.py
│ ├── build/
│ │ └── index.html
│ ├── conftest.py
│ ├── downloads/
│ │ └── test.txt
│ ├── helpers/
│ │ ├── __init__.py
│ │ ├── http_methods_helpers.py
│ │ └── network_helpers.py
│ ├── index.html
│ ├── index.py
│ ├── openapi_config.json
│ ├── random_number.rs
│ ├── subroutes/
│ │ ├── __init__.py
│ │ ├── di_subrouter.py
│ │ └── file_api.py
│ ├── templates/
│ │ └── test.html
│ ├── test_add_route_without_decorator.py
│ ├── test_app.py
│ ├── test_authentication.py
│ ├── test_base_url.py
│ ├── test_basic_routes.py
│ ├── test_binary_output.py
│ ├── test_delete_requests.py
│ ├── test_dependency_injection.py
│ ├── test_easy_access_params.py
│ ├── test_exception_handling.py
│ ├── test_file_download.py
│ ├── test_get_requests.py
│ ├── test_json_types.py
│ ├── test_middlewares.py
│ ├── test_multipart_data.py
│ ├── test_openapi.py
│ ├── test_patch_requests.py
│ ├── test_post_requests.py
│ ├── test_put_requests.py
│ ├── test_pydantic.py
│ ├── test_request_json.py
│ ├── test_split_request_params.py
│ ├── test_sse.py
│ ├── test_static_files_with_api_routes.py
│ ├── test_status_code.py
│ ├── test_subrouter.py
│ └── test_web_sockets.py
├── llms.txt
├── noxfile.py
├── pyproject.toml
├── robyn/
│ ├── __init__.py
│ ├── __main__.py
│ ├── _param_utils.py
│ ├── ai.py
│ ├── argument_parser.py
│ ├── authentication.py
│ ├── cli.py
│ ├── dependency_injection.py
│ ├── env_populator.py
│ ├── events.py
│ ├── exceptions.py
│ ├── jsonify.py
│ ├── logger.py
│ ├── mcp.py
│ ├── openapi.py
│ ├── processpool.py
│ ├── py.typed
│ ├── pydantic_support.py
│ ├── reloader.py
│ ├── responses.py
│ ├── robyn.pyi
│ ├── router.py
│ ├── scaffold/
│ │ ├── mongo/
│ │ │ ├── Dockerfile
│ │ │ ├── app.py
│ │ │ └── requirements.txt
│ │ ├── no-db/
│ │ │ ├── Dockerfile
│ │ │ ├── app.py
│ │ │ └── requirements.txt
│ │ ├── postgres/
│ │ │ ├── Dockerfile
│ │ │ ├── app.py
│ │ │ ├── requirements.txt
│ │ │ └── supervisord.conf
│ │ ├── prisma/
│ │ │ ├── Dockerfile
│ │ │ ├── app.py
│ │ │ ├── requirements.txt
│ │ │ └── schema.prisma
│ │ ├── sqlalchemy/
│ │ │ ├── Dockerfile
│ │ │ ├── __init__.py
│ │ │ ├── app.py
│ │ │ ├── models.py
│ │ │ └── requirements.txt
│ │ ├── sqlite/
│ │ │ ├── Dockerfile
│ │ │ ├── app.py
│ │ │ └── requirements.txt
│ │ └── sqlmodel/
│ │ ├── Dockerfile
│ │ ├── app.py
│ │ ├── models.py
│ │ └── requirements.txt
│ ├── status_codes.py
│ ├── swagger.html
│ ├── templating.py
│ ├── types.py
│ └── ws.py
├── scripts/
│ ├── format.sh
│ └── release.sh
├── setup.py
├── src/
│ ├── asyncio.rs
│ ├── blocking.rs
│ ├── callbacks.rs
│ ├── conversion.rs
│ ├── executors/
│ │ ├── mod.rs
│ │ └── web_socket_executors.rs
│ ├── io_helpers/
│ │ └── mod.rs
│ ├── lib.rs
│ ├── routers/
│ │ ├── const_router.rs
│ │ ├── http_router.rs
│ │ ├── middleware_router.rs
│ │ ├── mod.rs
│ │ └── web_socket_router.rs
│ ├── runtime.rs
│ ├── server.rs
│ ├── shared_socket.rs
│ ├── types/
│ │ ├── cookie.rs
│ │ ├── function_info.rs
│ │ ├── headers.rs
│ │ ├── identity.rs
│ │ ├── mod.rs
│ │ ├── multimap.rs
│ │ ├── request.rs
│ │ └── response.rs
│ └── websockets/
│ ├── mod.rs
│ └── registry.rs
└── unit_tests/
├── test_cli.py
├── test_env_populator.py
├── test_openapi_issue_1270.py
├── test_request_object.py
└── test_unsupported_types.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .cargo/config
================================================
[target.x86_64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]
[target.aarch64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: [sansyrox] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
#patreon: # Replace with a single Patreon username
open_collective: robyn_oss # Replace with a single Open Collective username
#ko_fi: # Replace with a single Ko-fi username
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
# liberapay: # Replace with a single Liberapay username
# issuehunt: # Replace with a single IssueHunt username
# otechie: # Replace with a single Otechie username
# lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
# custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
================================================
FILE: .github/ISSUE_TEMPLATE/blank_issue.md
================================================
---
name: 📝 Blank Issue
about: Create a blank issue.
---
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.yml
================================================
name: 🐛 Bug Report
description: Create a bug report
labels: [bug]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill out this bug report!
Please fill out the form below...
- type: textarea
id: description
attributes:
label: Bug Description
description: Please provide a clear and concise description of what the bug is, and what you would expect to happen.
placeholder: The bug is...
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: Steps to Reproduce
description: Please provide the steps to reproduce this bug. You can include your code here if it is relevant.
placeholder: |
1.
2.
3.
validations:
required: false
- type: dropdown
id: os
attributes:
label: Your operating system
options:
- Windows
- MacOS
- Linux
- Other (specify below)
validations:
required: false
- type: dropdown
id: py_version
attributes:
label: Your Python version (`python --version`)
options:
- 3.9
- 3.10
- 3.11
- 3.12
- 3.13
- Other (specify below)
validations:
required: false
- type: dropdown
id: robyn_version
attributes:
label: Your Robyn version
options:
- main branch
- latest
- Other (specify below)
validations:
required: false
- type: textarea
id: additional-info
attributes:
label: Additional Info
description: Any additional info that you think might be useful or relevant to this bug
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: true
contact_links:
- name: Discord Community Support
url: https://discord.gg/rkERZ5eNU8
about: You can ask and answer questions here.
- name: Documentation
url: https://robyn.tech
about: The Robyn documentation.
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: 💡 Feature request
about: Suggest an idea to improve Robyn
labels: [enhancement]
---
<!--
Thank you for considering improving Robyn!
Please describe your idea in depth. If you're not sure what to write, imagine the following:
- How is this important to you? How would you use it?
- Can you think of any alternatives?
- Do you have any ideas about how it can be implemented? Are you willing/able to implement it? Do you need mentoring?
-->
================================================
FILE: .github/dependabot.yml
================================================
# Keep GitHub Actions up to date with GitHub's Dependabot...
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem
version: 2
updates:
- package-ecosystem: github-actions
directory: /
groups:
github-actions:
patterns:
- "*" # Group all Actions updates into a single larger pull request
schedule:
interval: weekly
================================================
FILE: .github/pull_request_template.md
================================================
## Description
This PR fixes #
## Summary
This PR does....
<!--
Thank you for contributing to Robyn!
-->
## PR Checklist
Please ensure that:
- [ ] The PR contains a descriptive title
- [ ] The PR contains a descriptive summary of the changes
- [ ] You build and test your changes before submitting a PR.
- [ ] You have added relevant documentation
- [ ] You have added relevant tests. We prefer integration tests wherever possible
## Pre-Commit Instructions:
- [ ] Ensure that you have run the [pre-commit hooks](https://github.com/sparckles/robyn#%EF%B8%8F-to-develop-locally) on your PR.
================================================
FILE: .github/workflows/codspeed.yml
================================================
name: codspeed-benchmarks
on:
push:
branches:
- "main" # or "master"
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:
jobs:
benchmarks:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.7.5"
- name: Install the project + deps.
run: |
echo "# Syncing Project + Installing project."
uv sync --dev --group test --verbose
- name: Run benchmarks
uses: CodSpeedHQ/action@v3.5.0
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: uv run pytest integration_tests --codspeed
================================================
FILE: .github/workflows/lint-pr.yml
================================================
name: Lint PR
on:
pull_request:
branches: [main]
env:
UV_SYSTEM_PYTHON: 1
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
- uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install dependencies with uv
run: |
uv pip install ruff isort black
- name: Run linters
run: |
uv run ruff check .
uv run isort --check-only --diff .
================================================
FILE: .github/workflows/preview-deployments.yml
================================================
# CI to release the project for Linux, Windows, and MacOS
# The purpose of this action is to verify if the release builds are working or not.
name: Preview Release
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
UV_SYSTEM_PYTHON: 1
jobs:
macos:
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin
- name: Build wheels - x86_64
uses: PyO3/maturin-action@v1
with:
target: x86_64
args: -i python --release --out dist
- name: Build wheels - universal2
uses: PyO3/maturin-action@v1
with:
target: universal2-apple-darwin
args: -i python --release --out dist
- name: Install build wheel - universal2
run: |
uv pip install --force-reinstall dist/robyn*_universal2.whl
cd ~ && python -c 'import robyn'
windows:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
target: [x64, x86]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.target }}
- uses: dtolnay/rust-toolchain@stable
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: -i python --release --out dist
- name: Install build wheel
shell: bash
run: |
uv pip install --force-reinstall dist/robyn*.whl
cd ~ && python -c 'import robyn'
linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
target: [x86_64, i686]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install uv
uses: astral-sh/setup-uv@v3
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Build Wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: auto
args: -i python${{ matrix.python-version }} --release --out dist
- name: Install build wheel
if: matrix.target == 'x86_64'
run: |
uv pip install --force-reinstall dist/robyn*.whl
cd ~ && python -c 'import robyn'
linux-cross:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python:
[
{ version: "3.10", abi: "cp310-cp310" },
{ version: "3.11", abi: "cp311-cp311" },
{ version: "3.12", abi: "cp312-cp312" },
{ version: "3.13", abi: "cp313-cp313" },
{ version: "3.14", abi: "cp314-cp314" },
]
target: [aarch64, armv7]
steps:
- uses: actions/checkout@v3
- name: Build Wheels
uses: PyO3/maturin-action@v1
env:
PYO3_CROSS_LIB_DIR: /opt/python/${{ matrix.python.abi }}/lib
with:
target: ${{ matrix.target }}
manylinux: auto
args: -i python${{matrix.python.version}} --release --out dist
- uses: uraimo/run-on-arch-action@v2
name: Install build wheel
with:
arch: ${{ matrix.target }}
distro: ubuntu22.04
githubToken: ${{ github.token }}
# Mount the dist directory as /artifacts in the container
dockerRunArgs: |
--volume "${PWD}/dist:/artifacts"
install: |
apt update -y
apt install -y software-properties-common
add-apt-repository -y ppa:deadsnakes/ppa
apt update -y
apt install -y gcc musl-dev python3-dev python${{ matrix.python.version }} python${{ matrix.python.version }}-venv
run: |
ls -lrth /artifacts
python${{ matrix.python.version }} -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install --force-reinstall /artifacts/robyn*.whl
cd ~ && python -c 'import robyn'
================================================
FILE: .github/workflows/python-CI.yml
================================================
# CI to test Robyn on major Linux, MacOS and Windows
on: [push, pull_request]
name: Python Continuous integration
jobs:
tests:
strategy:
fail-fast: false
matrix:
os: ["windows", "ubuntu", "macos"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
name: ${{ matrix.os }} tests with python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Set up Nox
uses: wntrblm/nox@2024.03.02
with:
python-versions: ${{ matrix.python-version }}
- name: Test with Nox
run: nox --non-interactive --error-on-missing-interpreter -p ${{ matrix.python-version }}
================================================
FILE: .github/workflows/release-CI.yml
================================================
# CI to release the project for Linux, Windows, and MacOS
name: Release CI
on:
push:
tags:
- v*
workflow_dispatch:
inputs:
enable_linux_cross:
description: 'Enable Linux cross-compilation (ARM64/ARMv7)'
required: false
default: true
type: boolean
env:
UV_SYSTEM_PYTHON: 1
jobs:
macos:
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v3
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin
- name: Build wheels - x86_64
uses: PyO3/maturin-action@v1
with:
target: x86_64
args: -i python --release --out dist
- name: Build wheels - universal2
uses: PyO3/maturin-action@v1
with:
target: universal2-apple-darwin
args: -i python --release --out dist
- name: Install build wheel - universal2
run: |
uv pip install --force-reinstall dist/robyn*_universal2.whl
cd ~ && python -c 'import robyn'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ github.job }}-universal-${{ matrix.python-version }}
path: dist
windows:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
target: [x64, x86]
steps:
- uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v3
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.target }}
- uses: dtolnay/rust-toolchain@stable
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: -i python --release --out dist
- name: Install build wheel
shell: bash
run: |
uv pip install --force-reinstall dist/robyn*.whl
cd ~ && python -c 'import robyn'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ github.job }}-${{ matrix.target }}-${{ matrix.python-version }}
path: dist
linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
target: [x86_64, i686]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Install uv
uses: astral-sh/setup-uv@v3
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Build Wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: auto
args: -i python${{ matrix.python-version }} --release --out dist
- name: Install build wheel
if: matrix.target == 'x86_64'
run: |
uv pip install --force-reinstall dist/robyn*.whl
cd ~ && python -c 'import robyn'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ github.job }}-${{ matrix.target }}-${{ matrix.python-version }}
path: dist
linux-cross:
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.enable_linux_cross)
strategy:
matrix:
python:
[
{ version: "3.10", abi: "cp310-cp310" },
{ version: "3.11", abi: "cp311-cp311" },
{ version: "3.12", abi: "cp312-cp312" },
{ version: "3.13", abi: "cp313-cp313" },
]
target: [aarch64, armv7]
steps:
- uses: actions/checkout@v3
- name: Build Wheels
uses: PyO3/maturin-action@v1
env:
PYO3_CROSS_LIB_DIR: /opt/python/${{ matrix.python.abi }}/lib
with:
target: ${{ matrix.target }}
manylinux: auto
maturin-version: "v1.12.0"
args: -i python${{matrix.python.version}} --release --out dist
- uses: uraimo/run-on-arch-action@v2
name: Install build wheel
with:
arch: ${{ matrix.target }}
distro: ubuntu22.04
githubToken: ${{ github.token }}
# Mount the dist directory as /artifacts in the container
dockerRunArgs: |
--volume "${PWD}/dist:/artifacts"
install: |
apt update -y
apt install -y software-properties-common
add-apt-repository -y ppa:deadsnakes/ppa
apt update -y
apt install -y gcc musl-dev python3-dev python${{ matrix.python.version }} python${{ matrix.python.version }}-venv
run: |
ls -lrth /artifacts
python${{ matrix.python.version }} -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install --force-reinstall /artifacts/robyn*.whl
cd ~ && python -c 'import robyn'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ github.job }}-${{ matrix.target }}-${{ matrix.python.version }}-${{ matrix.python.abi }}
path: dist
merge:
name: Building Single Artifact
runs-on: ubuntu-latest
needs: [macos, windows, linux, linux-cross]
if: always() && needs.macos.result == 'success' && needs.windows.result == 'success' && needs.linux.result == 'success' && (needs.linux-cross.result == 'success' || needs.linux-cross.result == 'skipped')
steps:
- name: Downloading all Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: wheels-*
merge-multiple: true
- run: |
echo "Listing directories"
ls -R
- name: Uploading Artifact's Bundle
uses: actions/upload-artifact@v4
with:
name: wheels
path: artifacts
release:
name: Release
runs-on: ubuntu-latest
needs: [macos, windows, linux, linux-cross, merge]
if: always() && needs.merge.result == 'success'
steps:
- uses: actions/download-artifact@v4
with:
name: wheels
- name: Install uv
uses: astral-sh/setup-uv@v3
- uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Publish to PyPi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
uv pip install --upgrade twine
twine upload --skip-existing *.whl
================================================
FILE: .github/workflows/rust-CI.yml
================================================
# CI to build, test, format, and lint the Rust code
on: [push, pull_request]
name: Rust Continuous integration
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo check
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: cargo clippy
# -- -D warnings
================================================
FILE: .gitignore
================================================
.python-version
/target
# ignore pre compiled binaries
*.so
dist/
#python cache
*__pycache__
*tags
# DS_Store
*.DS_Store
.vscode
# pycharm
.idea
# python venv
.venv
venv
robyn.code-workspace
hello_robyn.py
robyn.env
# nox
.nox/
# new docs dependencies
# dependencies
docs_src/node_modules
docs_src/.pnp
docs_src/.pnp.js
# testing
docs_src/coverage
# next.js
docs_src/.next/
docs_src/out/
# production
docs_src/build
# misc
docs_src/.DS_Store
docs_src/*.pem
# debug
docs_src/npm-debug.log*
docs_src/yarn-debug.log*
docs_src/yarn-error.log*
docs_src/.pnpm-debug.log*
# local env files
docs_src/.env*.local
# vercel
docs_src/.vercel
# generated files
docs_src/public/rss/
#https://github.com/PyO3/maturin/issues/2141
*.pyd
================================================
FILE: .pre-commit-config.yaml
================================================
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.13
hooks:
- id: ruff
args:
- --fix
- id: ruff-format
ci:
autoupdate_schedule: weekly
================================================
FILE: .well-known/funding-manifest-urls
================================================
https://robyn.tech/funding.json
================================================
FILE: CHANGELOG.md
================================================
# Changelog
## [Unreleased](https://github.com/sparckles/robyn/tree/HEAD)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.26.1...HEAD)
**Implemented enhancements:**
- Allow empty returns on websocket handling [\#1263](https://github.com/sparckles/robyn/issues/1263)
**Closed issues:**
- Payload reached size limit. [\#463](https://github.com/sparckles/robyn/issues/463)
- Proposal to rename `params` with `path_params` [\#457](https://github.com/sparckles/robyn/issues/457)
**Merged pull requests:**
- feat: allow configurable payload sizes [\#465](https://github.com/sparckles/robyn/pull/465) ([sansyrox](https://github.com/sansyrox))
- docs: remove test pypi instructions from pr template [\#462](https://github.com/sparckles/robyn/pull/462) ([sansyrox](https://github.com/sansyrox))
- Rename params with path\_params [\#460](https://github.com/sparckles/robyn/pull/460) ([carlosm27](https://github.com/carlosm27))
- feat: Implement global CORS [\#458](https://github.com/sparckles/robyn/pull/458) ([sansyrox](https://github.com/sansyrox))
## [v0.26.1](https://github.com/sparckles/robyn/tree/v0.26.1) (2023-04-05)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.26.0...v0.26.1)
**Fixed bugs:**
- Can't access new or updated route while on dev option [\#439](https://github.com/sparckles/robyn/issues/439)
**Closed issues:**
- Add documentation for `robyn.env` file [\#454](https://github.com/sparckles/robyn/issues/454)
**Merged pull requests:**
- Release v0.26.1 [\#461](https://github.com/sparckles/robyn/pull/461) ([sansyrox](https://github.com/sansyrox))
- \[pre-commit.ci\] pre-commit autoupdate [\#459](https://github.com/sparckles/robyn/pull/459) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- \[pre-commit.ci\] pre-commit autoupdate [\#452](https://github.com/sparckles/robyn/pull/452) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- docs: Add docs for v0.26.0 [\#451](https://github.com/sparckles/robyn/pull/451) ([sansyrox](https://github.com/sansyrox))
- fix\(dev\): fix hot reloading with dev flag [\#446](https://github.com/sparckles/robyn/pull/446) ([AntoineRR](https://github.com/AntoineRR))
## [v0.26.0](https://github.com/sparckles/robyn/tree/v0.26.0) (2023-03-24)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.25.0...v0.26.0)
**Implemented enhancements:**
- \[Feature Request\] Robyn providing Status Codes? [\#423](https://github.com/sparckles/robyn/issues/423)
- \[Feature Request\] Allow global level Response headers [\#335](https://github.com/sparckles/robyn/issues/335)
**Fixed bugs:**
- \[BUG\] `uvloop` ModuleNotFoundError: No module named 'uvloop' on Ubuntu Docker Image [\#395](https://github.com/sparckles/robyn/issues/395)
**Closed issues:**
- \[Feature Request\] When Robyn can have a middleware mechanism like flask or django [\#350](https://github.com/sparckles/robyn/issues/350)
- Forced shutdown locks console. \[BUG\] [\#317](https://github.com/sparckles/robyn/issues/317)
**Merged pull requests:**
- \[pre-commit.ci\] pre-commit autoupdate [\#449](https://github.com/sparckles/robyn/pull/449) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- fix: Implement auto installation of uvloop on linux arm [\#445](https://github.com/sparckles/robyn/pull/445) ([sansyrox](https://github.com/sansyrox))
- chore: update rust dependencies [\#444](https://github.com/sparckles/robyn/pull/444) ([AntoineRR](https://github.com/AntoineRR))
- feat: Implement performance benchmarking [\#443](https://github.com/sparckles/robyn/pull/443) ([sansyrox](https://github.com/sansyrox))
- feat: expose request/connection info [\#441](https://github.com/sparckles/robyn/pull/441) ([r3b-fish](https://github.com/r3b-fish))
- Install the CodeSee workflow. [\#438](https://github.com/sparckles/robyn/pull/438) ([codesee-maps[bot]](https://github.com/apps/codesee-maps))
- \[pre-commit.ci\] pre-commit autoupdate [\#437](https://github.com/sparckles/robyn/pull/437) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- Replace integer status codes with Enum values of StatusCodes [\#436](https://github.com/sparckles/robyn/pull/436) ([Noborita9](https://github.com/Noborita9))
- added `star-history` [\#434](https://github.com/sparckles/robyn/pull/434) ([hemangjoshi37a](https://github.com/hemangjoshi37a))
- \[pre-commit.ci\] pre-commit autoupdate [\#433](https://github.com/sparckles/robyn/pull/433) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- feat: Robyn providing status codes [\#429](https://github.com/sparckles/robyn/pull/429) ([carlosm27](https://github.com/carlosm27))
- feat: Allow global level Response headers [\#410](https://github.com/sparckles/robyn/pull/410) ([ParthS007](https://github.com/ParthS007))
- feat: get rid of intermediate representations of requests and responses [\#397](https://github.com/sparckles/robyn/pull/397) ([AntoineRR](https://github.com/AntoineRR))
## [v0.25.0](https://github.com/sparckles/robyn/tree/v0.25.0) (2023-02-20)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.24.1...v0.25.0)
**Implemented enhancements:**
- using robyn with some frameworks [\#420](https://github.com/sparckles/robyn/issues/420)
**Fixed bugs:**
- Template Rendering is not working in some browsers [\#426](https://github.com/sparckles/robyn/issues/426)
**Closed issues:**
- \[Feature Request\] Show support for Python versions in the README [\#396](https://github.com/sparckles/robyn/issues/396)
- \[BUG\] The dev flag doesn't set the log level to DEBUG [\#385](https://github.com/sparckles/robyn/issues/385)
- \[BUG\] All tests are not passing on windows [\#372](https://github.com/sparckles/robyn/issues/372)
- \[Feature Request\] Add views/view controllers [\#221](https://github.com/sparckles/robyn/issues/221)
**Merged pull requests:**
- fix: Add proper headers to the templates return types [\#427](https://github.com/sparckles/robyn/pull/427) ([sansyrox](https://github.com/sansyrox))
- \[pre-commit.ci\] pre-commit autoupdate [\#425](https://github.com/sparckles/robyn/pull/425) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- docs: Add documentation for views [\#424](https://github.com/sparckles/robyn/pull/424) ([sansyrox](https://github.com/sansyrox))
- better way to compare type [\#421](https://github.com/sparckles/robyn/pull/421) ([jmishra01](https://github.com/jmishra01))
- style\(landing\_page\): fix the style of github logo on the landing page [\#419](https://github.com/sparckles/robyn/pull/419) ([sansyrox](https://github.com/sansyrox))
- docs: improve readme [\#418](https://github.com/sparckles/robyn/pull/418) ([AntoineRR](https://github.com/AntoineRR))
- docs: add dark mode to website [\#416](https://github.com/sparckles/robyn/pull/416) ([AntoineRR](https://github.com/AntoineRR))
- chore: improve issue templates [\#413](https://github.com/sparckles/robyn/pull/413) ([AntoineRR](https://github.com/AntoineRR))
- \[pre-commit.ci\] pre-commit autoupdate [\#412](https://github.com/sparckles/robyn/pull/412) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- fix: fixed CONTRIBUTE.md link into docs/README.md file, changing it f… [\#411](https://github.com/sparckles/robyn/pull/411) ([Kop3sh](https://github.com/Kop3sh))
- chore\(ci\): fix rust ci warnings [\#408](https://github.com/sparckles/robyn/pull/408) ([AntoineRR](https://github.com/AntoineRR))
- feat: Add view controllers [\#407](https://github.com/sparckles/robyn/pull/407) ([mikaeelghr](https://github.com/mikaeelghr))
- Fix docs: support version [\#404](https://github.com/sparckles/robyn/pull/404) ([Oluwaseun241](https://github.com/Oluwaseun241))
- fix: Fix Windows tests [\#402](https://github.com/sparckles/robyn/pull/402) ([sansyrox](https://github.com/sansyrox))
- docs: Update PyPi metadata [\#401](https://github.com/sparckles/robyn/pull/401) ([sansyrox](https://github.com/sansyrox))
- fix\(test\): fix tests on windows [\#400](https://github.com/sparckles/robyn/pull/400) ([AntoineRR](https://github.com/AntoineRR))
- fix: various improvements around the dev flag [\#388](https://github.com/sparckles/robyn/pull/388) ([AntoineRR](https://github.com/AntoineRR))
## [v0.24.1](https://github.com/sparckles/robyn/tree/v0.24.1) (2023-02-09)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.24.0...v0.24.1)
**Closed issues:**
- \[BUG\] \[Windows\] Terminal hanging after Ctrl+C is pressed on Robyn server [\#373](https://github.com/sparckles/robyn/issues/373)
**Merged pull requests:**
- \[pre-commit.ci\] pre-commit autoupdate [\#394](https://github.com/sparckles/robyn/pull/394) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- docs: add documentation regarding byte response [\#392](https://github.com/sparckles/robyn/pull/392) ([sansyrox](https://github.com/sansyrox))
- fix: fix terminal hijacking in windows [\#391](https://github.com/sparckles/robyn/pull/391) ([sansyrox](https://github.com/sansyrox))
- chore: fix requirements files and update packages [\#389](https://github.com/sparckles/robyn/pull/389) ([AntoineRR](https://github.com/AntoineRR))
- small correction in docs [\#387](https://github.com/sparckles/robyn/pull/387) ([tkanhe](https://github.com/tkanhe))
- \[pre-commit.ci\] pre-commit autoupdate [\#384](https://github.com/sparckles/robyn/pull/384) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- ci: build artifacts on every push and pull [\#378](https://github.com/sparckles/robyn/pull/378) ([sansyrox](https://github.com/sansyrox))
- test: organize and add tests [\#377](https://github.com/sparckles/robyn/pull/377) ([AntoineRR](https://github.com/AntoineRR))
- Changed Response to use body: bytes [\#375](https://github.com/sparckles/robyn/pull/375) ([madhavajay](https://github.com/madhavajay))
## [v0.24.0](https://github.com/sparckles/robyn/tree/v0.24.0) (2023-02-06)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.23.1...v0.24.0)
**Closed issues:**
- \[BUG\] Release builds are not working [\#386](https://github.com/sparckles/robyn/issues/386)
- \[BUG\] Can't send raw bytes [\#374](https://github.com/sparckles/robyn/issues/374)
## [v0.23.1](https://github.com/sparckles/robyn/tree/v0.23.1) (2023-01-30)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.23.0...v0.23.1)
**Closed issues:**
- \[BUG\] Return 500 status code when route is raising [\#381](https://github.com/sparckles/robyn/issues/381)
- \[BUG\] Return 404 status code when route isn't set [\#376](https://github.com/sparckles/robyn/issues/376)
- Add Appwrite as a sponsor in the README [\#348](https://github.com/sparckles/robyn/issues/348)
- \[BUG\] Get Stared failed on Windows [\#340](https://github.com/sparckles/robyn/issues/340)
- \[BUG\] Fix CI/CD pipeline [\#310](https://github.com/sparckles/robyn/issues/310)
**Merged pull requests:**
- chore\(ci\): fix robyn installation in test CI [\#383](https://github.com/sparckles/robyn/pull/383) ([AntoineRR](https://github.com/AntoineRR))
- fix: return 500 status code when route raise [\#382](https://github.com/sparckles/robyn/pull/382) ([AntoineRR](https://github.com/AntoineRR))
- fix: return 404 status code when route isn't found [\#380](https://github.com/sparckles/robyn/pull/380) ([AntoineRR](https://github.com/AntoineRR))
- ci: enable precommit hooks on everything [\#371](https://github.com/sparckles/robyn/pull/371) ([sansyrox](https://github.com/sansyrox))
- chore: run tests on linux, macos and windows and release builds on ta… [\#370](https://github.com/sparckles/robyn/pull/370) ([AntoineRR](https://github.com/AntoineRR))
- docs: add appwrite logo as sponsors [\#369](https://github.com/sparckles/robyn/pull/369) ([sansyrox](https://github.com/sansyrox))
- test: improve pytest fixtures [\#368](https://github.com/sparckles/robyn/pull/368) ([AntoineRR](https://github.com/AntoineRR))
- Move pre-commit hooks to use Ruff [\#364](https://github.com/sparckles/robyn/pull/364) ([patrick91](https://github.com/patrick91))
## [v0.23.0](https://github.com/sparckles/robyn/tree/v0.23.0) (2023-01-21)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.22.1...v0.23.0)
**Closed issues:**
- \[Feature Request\] Improve the release and testing pipeline [\#341](https://github.com/sparckles/robyn/issues/341)
**Merged pull requests:**
- ci: delete the test pypi workflow [\#367](https://github.com/sparckles/robyn/pull/367) ([sansyrox](https://github.com/sansyrox))
- docs: Add page icon to index page [\#365](https://github.com/sparckles/robyn/pull/365) ([Abdur-rahmaanJ](https://github.com/Abdur-rahmaanJ))
- test: speed up tests [\#362](https://github.com/sparckles/robyn/pull/362) ([AntoineRR](https://github.com/AntoineRR))
- Replace the default port with 8080 [\#352](https://github.com/sparckles/robyn/pull/352) ([sansyrox](https://github.com/sansyrox))
## [v0.22.1](https://github.com/sparckles/robyn/tree/v0.22.1) (2023-01-16)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.22.0...v0.22.1)
**Closed issues:**
- \[BUG\] Python 3.11 error: metadata-generation-failed [\#357](https://github.com/sparckles/robyn/issues/357)
**Merged pull requests:**
- ci: update precommit config [\#361](https://github.com/sparckles/robyn/pull/361) ([sansyrox](https://github.com/sansyrox))
- \[pre-commit.ci\] pre-commit autoupdate [\#359](https://github.com/sparckles/robyn/pull/359) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- chore\(ci\): add python 3.11 to the build and test CI [\#358](https://github.com/sparckles/robyn/pull/358) ([AntoineRR](https://github.com/AntoineRR))
- Updates prose to format code block and docs [\#356](https://github.com/sparckles/robyn/pull/356) ([rachfop](https://github.com/rachfop))
## [v0.22.0](https://github.com/sparckles/robyn/tree/v0.22.0) (2023-01-14)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.21.0...v0.22.0)
**Closed issues:**
- AttributeError: 'Robyn' object has no attribute 'headers'\[BUG\] [\#353](https://github.com/sparckles/robyn/issues/353)
- \[Feature Request\] Allow support for multiple file types [\#344](https://github.com/sparckles/robyn/issues/344)
- \[Feature Request\] Investigate if we need an unit tests for Python functions created in Rust [\#311](https://github.com/sparckles/robyn/issues/311)
- \[Experimental Feature Request\] Story driven programming [\#258](https://github.com/sparckles/robyn/issues/258)
**Merged pull requests:**
- fix: windows support [\#354](https://github.com/sparckles/robyn/pull/354) ([sansyrox](https://github.com/sansyrox))
- fix: better handling of route return type [\#349](https://github.com/sparckles/robyn/pull/349) ([AntoineRR](https://github.com/AntoineRR))
## [v0.21.0](https://github.com/sparckles/robyn/tree/v0.21.0) (2023-01-06)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.20.0...v0.21.0)
**Closed issues:**
- \[Feature Request\] Support for image file type [\#343](https://github.com/sparckles/robyn/issues/343)
- Not able to see the added logs [\#342](https://github.com/sparckles/robyn/issues/342)
- \[Feature Request\] Hope robyn can support returning f-string format [\#338](https://github.com/sparckles/robyn/issues/338)
- \[Feature Request\] Refactor Robyn response to allow objects other than strings [\#336](https://github.com/sparckles/robyn/issues/336)
- \[BUG\] Custom headers not sent when const=False [\#323](https://github.com/sparckles/robyn/issues/323)
- \[Feature Request\] Add documentation for custom template support in v0.19.0 [\#321](https://github.com/sparckles/robyn/issues/321)
- \[BUG\] Always need to return a string in a route [\#305](https://github.com/sparckles/robyn/issues/305)
**Merged pull requests:**
- fix: fix the static file serving [\#347](https://github.com/sparckles/robyn/pull/347) ([sansyrox](https://github.com/sansyrox))
- feat: return Response from routes [\#346](https://github.com/sparckles/robyn/pull/346) ([AntoineRR](https://github.com/AntoineRR))
## [v0.20.0](https://github.com/sparckles/robyn/tree/v0.20.0) (2022-12-20)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.19.2...v0.20.0)
**Closed issues:**
- \[Feature Request\] Add an automated benchmark script [\#320](https://github.com/sparckles/robyn/issues/320)
**Merged pull requests:**
- feat: allow non string types in response [\#337](https://github.com/sparckles/robyn/pull/337) ([sansyrox](https://github.com/sansyrox))
- feat: add an auto benchmark script [\#329](https://github.com/sparckles/robyn/pull/329) ([AntoineRR](https://github.com/AntoineRR))
## [v0.19.2](https://github.com/sparckles/robyn/tree/v0.19.2) (2022-12-14)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.19.1...v0.19.2)
**Closed issues:**
- \[BUG\] The --dev flag not working on Ubuntu 20.04 [\#332](https://github.com/sparckles/robyn/issues/332)
- \[Feature Request\] Allow the ability of sending the headers from the same route [\#325](https://github.com/sparckles/robyn/issues/325)
**Merged pull requests:**
- fix: allow response headers and fix headers not working in const requests [\#331](https://github.com/sparckles/robyn/pull/331) ([sansyrox](https://github.com/sansyrox))
- fix: factorizing code [\#322](https://github.com/sparckles/robyn/pull/322) ([AntoineRR](https://github.com/AntoineRR))
## [v0.19.1](https://github.com/sparckles/robyn/tree/v0.19.1) (2022-12-03)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.19.0...v0.19.1)
## [v0.19.0](https://github.com/sparckles/robyn/tree/v0.19.0) (2022-12-02)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.18.3...v0.19.0)
**Closed issues:**
- \[Feature Request\] Allow the ability of sending the headers from the same route [\#326](https://github.com/sparckles/robyn/issues/326)
- \[Feature Request\] Allow the ability of sending the headers from the same route [\#324](https://github.com/sparckles/robyn/issues/324)
- \[BUG\] Error in Examples section in Documentation [\#314](https://github.com/sparckles/robyn/issues/314)
- \[BUG\] Wrong link for the blog post on Robyn [\#306](https://github.com/sparckles/robyn/issues/306)
- Add documentation about deployment [\#93](https://github.com/sparckles/robyn/issues/93)
- Add support for templates! [\#10](https://github.com/sparckles/robyn/issues/10)
**Merged pull requests:**
- docs: update hosting docs [\#319](https://github.com/sparckles/robyn/pull/319) ([sansyrox](https://github.com/sansyrox))
- Various improvements around the index method [\#318](https://github.com/sparckles/robyn/pull/318) ([AntoineRR](https://github.com/AntoineRR))
- Add Railway deployment process. [\#316](https://github.com/sparckles/robyn/pull/316) ([carlosm27](https://github.com/carlosm27))
- docs: fix middleware section in examples [\#315](https://github.com/sparckles/robyn/pull/315) ([sansyrox](https://github.com/sansyrox))
- docs: fix blog link in website [\#309](https://github.com/sparckles/robyn/pull/309) ([sansyrox](https://github.com/sansyrox))
- Router refactor [\#307](https://github.com/sparckles/robyn/pull/307) ([AntoineRR](https://github.com/AntoineRR))
## [v0.18.3](https://github.com/sparckles/robyn/tree/v0.18.3) (2022-11-10)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.18.2...v0.18.3)
**Closed issues:**
- \[BUG\] `--log-level` not working [\#300](https://github.com/sparckles/robyn/issues/300)
- \[Feature Request\] Refactor Code to include better types [\#254](https://github.com/sparckles/robyn/issues/254)
**Merged pull requests:**
- fix: log level not working [\#303](https://github.com/sparckles/robyn/pull/303) ([sansyrox](https://github.com/sansyrox))
- add route type enum [\#299](https://github.com/sparckles/robyn/pull/299) ([suhailmalik07](https://github.com/suhailmalik07))
## [v0.18.2](https://github.com/sparckles/robyn/tree/v0.18.2) (2022-11-05)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.18.1...v0.18.2)
**Closed issues:**
- \[Feature Request?\] Update `matchit` crate to the most recent version [\#291](https://github.com/sparckles/robyn/issues/291)
- \[Feature Request\] Add `@wraps` in route dectorators [\#285](https://github.com/sparckles/robyn/issues/285)
- \[Feature Request\] fix clippy issues [\#265](https://github.com/sparckles/robyn/issues/265)
**Merged pull requests:**
- style: add logging for url port and host [\#304](https://github.com/sparckles/robyn/pull/304) ([sansyrox](https://github.com/sansyrox))
- fix config of port and url [\#302](https://github.com/sparckles/robyn/pull/302) ([kimhyun5u](https://github.com/kimhyun5u))
- update rust packages to latest [\#298](https://github.com/sparckles/robyn/pull/298) ([suhailmalik07](https://github.com/suhailmalik07))
- fix: retain metadata of the route functions [\#295](https://github.com/sparckles/robyn/pull/295) ([sansyrox](https://github.com/sansyrox))
- `SocketHeld::new` refactor [\#294](https://github.com/sparckles/robyn/pull/294) ([Jamyw7g](https://github.com/Jamyw7g))
## [v0.18.1](https://github.com/sparckles/robyn/tree/v0.18.1) (2022-10-23)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.18.0...v0.18.1)
**Merged pull requests:**
- fix: replaced match with if let [\#293](https://github.com/sparckles/robyn/pull/293) ([Markaeus](https://github.com/Markaeus))
- Hotfix detecting robyn.env [\#292](https://github.com/sparckles/robyn/pull/292) ([Shending-Help](https://github.com/Shending-Help))
- fix: enable hot reload on windows [\#290](https://github.com/sparckles/robyn/pull/290) ([guilefoylegaurav](https://github.com/guilefoylegaurav))
## [v0.18.0](https://github.com/sparckles/robyn/tree/v0.18.0) (2022-10-12)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.17.5...v0.18.0)
**Closed issues:**
- \[BUG\] The --dev mode spawns more servers without clearing previous ones. [\#249](https://github.com/sparckles/robyn/issues/249)
- \[Feature\] Add support for Env variables and a robyn.yaml config file [\#97](https://github.com/sparckles/robyn/issues/97)
**Merged pull requests:**
- testing env support [\#288](https://github.com/sparckles/robyn/pull/288) ([Shending-Help](https://github.com/Shending-Help))
- Feature add support for env variables [\#286](https://github.com/sparckles/robyn/pull/286) ([Shending-Help](https://github.com/Shending-Help))
- fix: add proper kill process to conftest. \#249 [\#278](https://github.com/sparckles/robyn/pull/278) ([guilefoylegaurav](https://github.com/guilefoylegaurav))
## [v0.17.5](https://github.com/sparckles/robyn/tree/v0.17.5) (2022-09-14)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.17.4...v0.17.5)
**Closed issues:**
- \[BUG\] README.md Discord link is invalid [\#272](https://github.com/sparckles/robyn/issues/272)
- \[Feature Request\] Add Digital Ocean to list of sponsors in Robyn Docs [\#270](https://github.com/sparckles/robyn/issues/270)
- \[Feature Request\] Add PyCon USA lightning talk in resources section [\#204](https://github.com/sparckles/robyn/issues/204)
- \[Feature Request\] Add community/ resources section in Docs or README [\#203](https://github.com/sparckles/robyn/issues/203)
- \[Feature Request\] Update the new architecture on the docs website [\#191](https://github.com/sparckles/robyn/issues/191)
- Add examples section [\#101](https://github.com/sparckles/robyn/issues/101)
**Merged pull requests:**
- Don't run sync functions in pool [\#282](https://github.com/sparckles/robyn/pull/282) ([JackThomson2](https://github.com/JackThomson2))
- Add documentation of Adding GraphQL support | version 1 [\#275](https://github.com/sparckles/robyn/pull/275) ([sansyrox](https://github.com/sansyrox))
- docs: improve documentation [\#269](https://github.com/sparckles/robyn/pull/269) ([sansyrox](https://github.com/sansyrox))
## [v0.17.4](https://github.com/sparckles/robyn/tree/v0.17.4) (2022-08-25)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.17.3...v0.17.4)
**Closed issues:**
- \[BUG?\] Startup failure OSError: \[WinError 87\] The parameter is incorrect [\#252](https://github.com/sparckles/robyn/issues/252)
- \[Feature Request\] Add mypy for pyi\(stubs\) synchronisation [\#226](https://github.com/sparckles/robyn/issues/226)
- not working on mac/windows [\#140](https://github.com/sparckles/robyn/issues/140)
**Merged pull requests:**
- Father, forgive me, for I am adding inline types. [\#266](https://github.com/sparckles/robyn/pull/266) ([sansyrox](https://github.com/sansyrox))
## [v0.17.3](https://github.com/sparckles/robyn/tree/v0.17.3) (2022-08-17)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.17.2...v0.17.3)
**Merged pull requests:**
- fix: parse int status code to str [\#264](https://github.com/sparckles/robyn/pull/264) ([hougesen](https://github.com/hougesen))
## [v0.17.2](https://github.com/sparckles/robyn/tree/v0.17.2) (2022-08-11)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.17.1...v0.17.2)
**Fixed bugs:**
- Cannot run Robyn on Windows [\#139](https://github.com/sparckles/robyn/issues/139)
**Closed issues:**
- \[BUG\] Move away from circle ci [\#240](https://github.com/sparckles/robyn/issues/240)
- Migrate the community to discord [\#239](https://github.com/sparckles/robyn/issues/239)
- \[Feature Request\] Release on test pypi before releasing on the main PyPi [\#224](https://github.com/sparckles/robyn/issues/224)
- For 0.8.x [\#75](https://github.com/sparckles/robyn/issues/75)
- Add a layer of caching in front of router [\#59](https://github.com/sparckles/robyn/issues/59)
**Merged pull requests:**
- Windows fix [\#261](https://github.com/sparckles/robyn/pull/261) ([sansyrox](https://github.com/sansyrox))
- ci: enable fail fast for faster response time in the pipelines [\#260](https://github.com/sparckles/robyn/pull/260) ([sansyrox](https://github.com/sansyrox))
- ci: add github actions to publish every PR on test pypi [\#259](https://github.com/sparckles/robyn/pull/259) ([sansyrox](https://github.com/sansyrox))
- Fix typo in README [\#246](https://github.com/sparckles/robyn/pull/246) ([bartbroere](https://github.com/bartbroere))
- chore\(ci\): move pytest from CircleCi to Github Actions [\#241](https://github.com/sparckles/robyn/pull/241) ([AntoineRR](https://github.com/AntoineRR))
## [v0.17.1](https://github.com/sparckles/robyn/tree/v0.17.1) (2022-07-19)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.17.0...v0.17.1)
**Closed issues:**
- \[Feature Request\] add clippy in ci [\#236](https://github.com/sparckles/robyn/issues/236)
- \[BUG\] Headers not available [\#231](https://github.com/sparckles/robyn/issues/231)
- \[Feature Request\] Add an all contributor bot in the README of the repo [\#225](https://github.com/sparckles/robyn/issues/225)
**Merged pull requests:**
- Add Rust CI [\#237](https://github.com/sparckles/robyn/pull/237) ([AntoineRR](https://github.com/AntoineRR))
- Contributors added in Readme [\#235](https://github.com/sparckles/robyn/pull/235) ([orvil1026](https://github.com/orvil1026))
- fix external project link in README [\#234](https://github.com/sparckles/robyn/pull/234) ([touilleMan](https://github.com/touilleMan))
- fix: fix request headers not being propagated [\#232](https://github.com/sparckles/robyn/pull/232) ([sansyrox](https://github.com/sansyrox))
- Upgrade GitHub Actions and add Python 3.10 [\#230](https://github.com/sparckles/robyn/pull/230) ([cclauss](https://github.com/cclauss))
- OrbUp: Upgrade the CircleCI Orbs [\#229](https://github.com/sparckles/robyn/pull/229) ([cclauss](https://github.com/cclauss))
- CHANGELOG.md: Fix typo [\#228](https://github.com/sparckles/robyn/pull/228) ([cclauss](https://github.com/cclauss))
## [v0.17.0](https://github.com/sparckles/robyn/tree/v0.17.0) (2022-07-06)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.16.6...v0.17.0)
**Closed issues:**
- A refactor [\#176](https://github.com/sparckles/robyn/issues/176)
- \[Proposal\] Const Requests [\#48](https://github.com/sparckles/robyn/issues/48)
**Merged pull requests:**
- Add a const router [\#210](https://github.com/sparckles/robyn/pull/210) ([sansyrox](https://github.com/sansyrox))
## [v0.16.6](https://github.com/sparckles/robyn/tree/v0.16.6) (2022-07-02)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.16.5...v0.16.6)
## [v0.16.5](https://github.com/sparckles/robyn/tree/v0.16.5) (2022-07-01)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.16.4...v0.16.5)
**Closed issues:**
- \[Feature Request\] Add sponsors in the repo and website [\#212](https://github.com/sparckles/robyn/issues/212)
- \[Feature Request\] Add commitizen as a dev dependency [\#211](https://github.com/sparckles/robyn/issues/211)
- Add better logging [\#158](https://github.com/sparckles/robyn/issues/158)
- Remove freeport dependency [\#151](https://github.com/sparckles/robyn/issues/151)
- Add websocket support [\#104](https://github.com/sparckles/robyn/issues/104)
- Maintenance issue [\#56](https://github.com/sparckles/robyn/issues/56)
- Improve Readme [\#4](https://github.com/sparckles/robyn/issues/4)
**Merged pull requests:**
- fix: Fixes the crashing dev mode [\#218](https://github.com/sparckles/robyn/pull/218) ([sansyrox](https://github.com/sansyrox))
- feat: add commitizen as a dev dependency [\#216](https://github.com/sparckles/robyn/pull/216) ([sansyrox](https://github.com/sansyrox))
- Isort imports [\#205](https://github.com/sparckles/robyn/pull/205) ([sansyrox](https://github.com/sansyrox))
- Add bridged logger. Improves performance substantially. [\#201](https://github.com/sparckles/robyn/pull/201) ([sansyrox](https://github.com/sansyrox))
- Adds pre-commit hooks for black, flake8, isort [\#198](https://github.com/sparckles/robyn/pull/198) ([chrismoradi](https://github.com/chrismoradi))
- Resolves port open issue when app is killed \#183 [\#196](https://github.com/sparckles/robyn/pull/196) ([anandtripathi5](https://github.com/anandtripathi5))
- Removing unwraps [\#195](https://github.com/sparckles/robyn/pull/195) ([sansyrox](https://github.com/sansyrox))
## [v0.16.4](https://github.com/sparckles/robyn/tree/v0.16.4) (2022-05-30)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.16.3...v0.16.4)
**Closed issues:**
- \[Feature Request\] Remove extra logs [\#200](https://github.com/sparckles/robyn/issues/200)
- \[Feature Request\] Add precommit hook for black, flake8 and isort [\#194](https://github.com/sparckles/robyn/issues/194)
- \[BUG\] Get rid of Hashmap Clones and Unwraps! [\#186](https://github.com/sparckles/robyn/issues/186)
## [v0.16.3](https://github.com/sparckles/robyn/tree/v0.16.3) (2022-05-18)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.16.2...v0.16.3)
**Closed issues:**
- \[BUG\] Port not being free on app kill [\#183](https://github.com/sparckles/robyn/issues/183)
- Build failure [\#166](https://github.com/sparckles/robyn/issues/166)
## [v0.16.2](https://github.com/sparckles/robyn/tree/v0.16.2) (2022-05-09)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.16.1...v0.16.2)
## [v0.16.1](https://github.com/sparckles/robyn/tree/v0.16.1) (2022-05-09)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.16.0...v0.16.1)
**Closed issues:**
- Add Python stubs [\#130](https://github.com/sparckles/robyn/issues/130)
**Merged pull requests:**
- Setup types for Robyn [\#192](https://github.com/sparckles/robyn/pull/192) ([sansyrox](https://github.com/sansyrox))
- Fix build pipeline [\#190](https://github.com/sparckles/robyn/pull/190) ([sansyrox](https://github.com/sansyrox))
- fix typo :pencil2: in api docs. [\#189](https://github.com/sparckles/robyn/pull/189) ([sombralibre](https://github.com/sombralibre))
- Remove hashmap clones [\#187](https://github.com/sparckles/robyn/pull/187) ([sansyrox](https://github.com/sansyrox))
- Code clean up | Modularise rust code [\#185](https://github.com/sparckles/robyn/pull/185) ([sansyrox](https://github.com/sansyrox))
- Add experimental io-uring [\#184](https://github.com/sparckles/robyn/pull/184) ([sansyrox](https://github.com/sansyrox))
- Implement Response headers [\#179](https://github.com/sparckles/robyn/pull/179) ([sansyrox](https://github.com/sansyrox))
- Code cleanup [\#178](https://github.com/sparckles/robyn/pull/178) ([sansyrox](https://github.com/sansyrox))
## [v0.16.0](https://github.com/sparckles/robyn/tree/v0.16.0) (2022-04-29)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.15.1...v0.16.0)
**Closed issues:**
- \[Feature Request\] Add list of sponsors on the project website [\#182](https://github.com/sparckles/robyn/issues/182)
- Optional build feature for io\_uring [\#177](https://github.com/sparckles/robyn/issues/177)
- Create Custom headers for the response. [\#174](https://github.com/sparckles/robyn/issues/174)
## [v0.15.1](https://github.com/sparckles/robyn/tree/v0.15.1) (2022-03-24)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.15.0...v0.15.1)
**Closed issues:**
- Add middleware support [\#95](https://github.com/sparckles/robyn/issues/95)
**Merged pull requests:**
- Make websocket id accessible [\#173](https://github.com/sparckles/robyn/pull/173) ([sansyrox](https://github.com/sansyrox))
- Use Clippy tool optimized code [\#171](https://github.com/sparckles/robyn/pull/171) ([mrxiaozhuox](https://github.com/mrxiaozhuox))
- Modify headers [\#170](https://github.com/sparckles/robyn/pull/170) ([sansyrox](https://github.com/sansyrox))
- Update README.md [\#168](https://github.com/sparckles/robyn/pull/168) ([Polokghosh53](https://github.com/Polokghosh53))
## [v0.15.0](https://github.com/sparckles/robyn/tree/v0.15.0) (2022-03-17)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.14.0...v0.15.0)
**Closed issues:**
- \[BUG\] Unable to modify headers in middlewares [\#167](https://github.com/sparckles/robyn/issues/167)
- Add Pycon talk link to docs [\#102](https://github.com/sparckles/robyn/issues/102)
## [v0.14.0](https://github.com/sparckles/robyn/tree/v0.14.0) (2022-03-03)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.13.1...v0.14.0)
**Fixed bugs:**
- Build error [\#161](https://github.com/sparckles/robyn/issues/161)
**Merged pull requests:**
- Implement Custom Response objects. [\#165](https://github.com/sparckles/robyn/pull/165) ([sansyrox](https://github.com/sansyrox))
- Remove deprecated endpoints [\#162](https://github.com/sparckles/robyn/pull/162) ([sansyrox](https://github.com/sansyrox))
- Fix: default url param in app.start [\#160](https://github.com/sparckles/robyn/pull/160) ([sansyrox](https://github.com/sansyrox))
- Add middlewares [\#157](https://github.com/sparckles/robyn/pull/157) ([sansyrox](https://github.com/sansyrox))
- Remove arc\(ing\) [\#156](https://github.com/sparckles/robyn/pull/156) ([sansyrox](https://github.com/sansyrox))
## [v0.13.1](https://github.com/sparckles/robyn/tree/v0.13.1) (2022-02-19)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.13.0...v0.13.1)
## [v0.13.0](https://github.com/sparckles/robyn/tree/v0.13.0) (2022-02-15)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.12.1...v0.13.0)
## [v0.12.1](https://github.com/sparckles/robyn/tree/v0.12.1) (2022-02-13)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.12.0...v0.12.1)
**Closed issues:**
- \[BUG\] Default URL cannot be assigned [\#159](https://github.com/sparckles/robyn/issues/159)
- Upcoming release\(s\) [\#141](https://github.com/sparckles/robyn/issues/141)
## [v0.12.0](https://github.com/sparckles/robyn/tree/v0.12.0) (2022-01-21)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.11.1...v0.12.0)
**Closed issues:**
- Consider adding startup events [\#153](https://github.com/sparckles/robyn/issues/153)
- Remove poetry dependency [\#150](https://github.com/sparckles/robyn/issues/150)
**Merged pull requests:**
- Add Event handlers [\#154](https://github.com/sparckles/robyn/pull/154) ([sansyrox](https://github.com/sansyrox))
- Remove poetry [\#152](https://github.com/sparckles/robyn/pull/152) ([sansyrox](https://github.com/sansyrox))
- Use print instead of input after starting server [\#149](https://github.com/sparckles/robyn/pull/149) ([klaa97](https://github.com/klaa97))
- Fix dev server [\#148](https://github.com/sparckles/robyn/pull/148) ([sansyrox](https://github.com/sansyrox))
- URL queries [\#146](https://github.com/sparckles/robyn/pull/146) ([patchgamestudio](https://github.com/patchgamestudio))
- Add project wide flake8 settings [\#143](https://github.com/sparckles/robyn/pull/143) ([sansyrox](https://github.com/sansyrox))
## [v0.11.1](https://github.com/sparckles/robyn/tree/v0.11.1) (2022-01-11)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.11.0...v0.11.1)
## [v0.11.0](https://github.com/sparckles/robyn/tree/v0.11.0) (2022-01-07)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.10.0...v0.11.0)
**Fixed bugs:**
- Hot Reloading goes in an infinite loop [\#115](https://github.com/sparckles/robyn/issues/115)
**Closed issues:**
- Benchmarks to Björn, uvicorn etc. [\#142](https://github.com/sparckles/robyn/issues/142)
- Add Python linter setup [\#129](https://github.com/sparckles/robyn/issues/129)
- Add fixtures in testing [\#84](https://github.com/sparckles/robyn/issues/84)
## [v0.10.0](https://github.com/sparckles/robyn/tree/v0.10.0) (2021-12-20)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.9.0...v0.10.0)
**Closed issues:**
- Add PyPI classifiers [\#127](https://github.com/sparckles/robyn/issues/127)
- Robyn version 0.9.0 doesn't work on Mac M1 Models [\#120](https://github.com/sparckles/robyn/issues/120)
- Inconsistency in steps mentioned in Readme to run locally [\#119](https://github.com/sparckles/robyn/issues/119)
- Async web socket support [\#116](https://github.com/sparckles/robyn/issues/116)
- Reveal Logo to be removed from Future Roadmap [\#107](https://github.com/sparckles/robyn/issues/107)
- Dead Link for Test Drive Button on Robyn Landing Page [\#106](https://github.com/sparckles/robyn/issues/106)
- Add issue template, pr template and community guidelines [\#105](https://github.com/sparckles/robyn/issues/105)
- For v0.7.0 [\#72](https://github.com/sparckles/robyn/issues/72)
- Add better support for requests and response! [\#13](https://github.com/sparckles/robyn/issues/13)
**Merged pull requests:**
- Add async support in WS [\#134](https://github.com/sparckles/robyn/pull/134) ([sansyrox](https://github.com/sansyrox))
- Add help messages and simplify 'dev' option [\#128](https://github.com/sparckles/robyn/pull/128) ([Kludex](https://github.com/Kludex))
- Apply Python highlight on api.md [\#126](https://github.com/sparckles/robyn/pull/126) ([Kludex](https://github.com/Kludex))
- Update comparison.md [\#124](https://github.com/sparckles/robyn/pull/124) ([Kludex](https://github.com/Kludex))
- Update comparison.md [\#123](https://github.com/sparckles/robyn/pull/123) ([Kludex](https://github.com/Kludex))
- Fix readme documentation [\#122](https://github.com/sparckles/robyn/pull/122) ([sansyrox](https://github.com/sansyrox))
- Release v0.9.0 Changelog [\#121](https://github.com/sparckles/robyn/pull/121) ([sansyrox](https://github.com/sansyrox))
- \[FEAT\] Open Source Contribution Templates [\#118](https://github.com/sparckles/robyn/pull/118) ([shivaylamba](https://github.com/shivaylamba))
- FIX : Wrong link for Test Drive [\#117](https://github.com/sparckles/robyn/pull/117) ([shivaylamba](https://github.com/shivaylamba))
## [v0.9.0](https://github.com/sparckles/robyn/tree/v0.9.0) (2021-12-01)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.8.1...v0.9.0)
**Closed issues:**
- Add more HTTP methods [\#74](https://github.com/sparckles/robyn/issues/74)
**Merged pull requests:**
- Fix default url bug [\#111](https://github.com/sparckles/robyn/pull/111) ([sansyrox](https://github.com/sansyrox))
- Web socket integration attempt 2 [\#109](https://github.com/sparckles/robyn/pull/109) ([sansyrox](https://github.com/sansyrox))
## [v0.8.1](https://github.com/sparckles/robyn/tree/v0.8.1) (2021-11-17)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.8.0...v0.8.1)
**Fixed bugs:**
- The default start is running the server at '0.0.0.0' instead of '127.0.0.1' [\#110](https://github.com/sparckles/robyn/issues/110)
## [v0.8.0](https://github.com/sparckles/robyn/tree/v0.8.0) (2021-11-10)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.7.1...v0.8.0)
**Closed issues:**
- Share the TCP web socket across different cores [\#91](https://github.com/sparckles/robyn/issues/91)
- Improve the router [\#52](https://github.com/sparckles/robyn/issues/52)
- \[Stretch Goal\] Create a a way of writing async request [\#32](https://github.com/sparckles/robyn/issues/32)
- Improve the router [\#29](https://github.com/sparckles/robyn/issues/29)
**Merged pull requests:**
- Fix the failing testing suite! [\#100](https://github.com/sparckles/robyn/pull/100) ([sansyrox](https://github.com/sansyrox))
- Requests object is now optional [\#99](https://github.com/sparckles/robyn/pull/99) ([sansyrox](https://github.com/sansyrox))
- Add socket sharing [\#94](https://github.com/sparckles/robyn/pull/94) ([sansyrox](https://github.com/sansyrox))
## [v0.7.1](https://github.com/sparckles/robyn/tree/v0.7.1) (2021-10-28)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.7.0...v0.7.1)
**Closed issues:**
- Remove the solution using dockerisation of tests [\#98](https://github.com/sparckles/robyn/issues/98)
- Functions not working without request param [\#96](https://github.com/sparckles/robyn/issues/96)
- Add actix router [\#85](https://github.com/sparckles/robyn/issues/85)
- Request apart from GET are not working in directory subroutes [\#79](https://github.com/sparckles/robyn/issues/79)
- Add the ability to share the server across the network [\#69](https://github.com/sparckles/robyn/issues/69)
- Add the ability to view headers in the HTTP Methods [\#54](https://github.com/sparckles/robyn/issues/54)
- Add tests! [\#8](https://github.com/sparckles/robyn/issues/8)
## [v0.7.0](https://github.com/sparckles/robyn/tree/v0.7.0) (2021-10-03)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.6.1...v0.7.0)
**Closed issues:**
- Robyn the replacement of Quart [\#86](https://github.com/sparckles/robyn/issues/86)
- Add Pytest support for the test endpoints [\#81](https://github.com/sparckles/robyn/issues/81)
**Merged pull requests:**
- Finally completed router integration [\#90](https://github.com/sparckles/robyn/pull/90) ([sansyrox](https://github.com/sansyrox))
- Address clippy lints [\#89](https://github.com/sparckles/robyn/pull/89) ([SanchithHegde](https://github.com/SanchithHegde))
- Initial docs update [\#83](https://github.com/sparckles/robyn/pull/83) ([sansyrox](https://github.com/sansyrox))
- Add the basics of python testing [\#82](https://github.com/sparckles/robyn/pull/82) ([sansyrox](https://github.com/sansyrox))
- Add a new landing page [\#80](https://github.com/sparckles/robyn/pull/80) ([sansyrox](https://github.com/sansyrox))
## [v0.6.1](https://github.com/sparckles/robyn/tree/v0.6.1) (2021-08-30)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.6.0...v0.6.1)
**Closed issues:**
- Make a new release [\#71](https://github.com/sparckles/robyn/issues/71)
- Update to the pyo3 v0.14 [\#63](https://github.com/sparckles/robyn/issues/63)
- Add the support to serve static directories [\#55](https://github.com/sparckles/robyn/issues/55)
- Add support for mounting directory [\#38](https://github.com/sparckles/robyn/issues/38)
**Merged pull requests:**
- Add the base of http requests [\#78](https://github.com/sparckles/robyn/pull/78) ([sansyrox](https://github.com/sansyrox))
- Add default port and a variable url [\#77](https://github.com/sparckles/robyn/pull/77) ([sansyrox](https://github.com/sansyrox))
- Make the request object accessible in every route [\#76](https://github.com/sparckles/robyn/pull/76) ([sansyrox](https://github.com/sansyrox))
- Add the basics for circle ci and testing framework [\#67](https://github.com/sparckles/robyn/pull/67) ([sansyrox](https://github.com/sansyrox))
- Update to pyo3 v0.14 [\#65](https://github.com/sparckles/robyn/pull/65) ([sansyrox](https://github.com/sansyrox))
- Add the static directory serving [\#64](https://github.com/sparckles/robyn/pull/64) ([sansyrox](https://github.com/sansyrox))
- Create a request object [\#61](https://github.com/sparckles/robyn/pull/61) ([sansyrox](https://github.com/sansyrox))
- Add the ability to add body in PUT, PATCH and DELETE [\#60](https://github.com/sparckles/robyn/pull/60) ([sansyrox](https://github.com/sansyrox))
- Implement a working dev server [\#40](https://github.com/sparckles/robyn/pull/40) ([sansyrox](https://github.com/sansyrox))
- Use Actix as base [\#35](https://github.com/sparckles/robyn/pull/35) ([JackThomson2](https://github.com/JackThomson2))
## [v0.6.0](https://github.com/sparckles/robyn/tree/v0.6.0) (2021-08-11)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.5.3...v0.6.0)
**Closed issues:**
- Add body support for PUT, POST and PATCH [\#53](https://github.com/sparckles/robyn/issues/53)
- Away with limited internet access till 1st August [\#51](https://github.com/sparckles/robyn/issues/51)
- Add doc stings [\#42](https://github.com/sparckles/robyn/issues/42)
- OSX builds are failing [\#41](https://github.com/sparckles/robyn/issues/41)
- Add a dev server implementation [\#37](https://github.com/sparckles/robyn/issues/37)
- Mini Roadmap | A list of issues that would require fixing [\#19](https://github.com/sparckles/robyn/issues/19)
- Add support for Object/JSON Return Type! [\#9](https://github.com/sparckles/robyn/issues/9)
## [v0.5.3](https://github.com/sparckles/robyn/tree/v0.5.3) (2021-07-12)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.5.2...v0.5.3)
**Merged pull requests:**
- Improve the HTML file serving [\#46](https://github.com/sparckles/robyn/pull/46) ([sansyrox](https://github.com/sansyrox))
- Add the basics to add serving of static files [\#36](https://github.com/sparckles/robyn/pull/36) ([sansyrox](https://github.com/sansyrox))
## [v0.5.2](https://github.com/sparckles/robyn/tree/v0.5.2) (2021-07-11)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.5.1...v0.5.2)
## [v0.5.1](https://github.com/sparckles/robyn/tree/v0.5.1) (2021-07-10)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.5.0...v0.5.1)
**Closed issues:**
- Make html file serving more robust [\#45](https://github.com/sparckles/robyn/issues/45)
- Try to serve individual static files using vanilla rust [\#43](https://github.com/sparckles/robyn/issues/43)
- Error on import [\#16](https://github.com/sparckles/robyn/issues/16)
- Add multiple process sharing [\#2](https://github.com/sparckles/robyn/issues/2)
## [v0.5.0](https://github.com/sparckles/robyn/tree/v0.5.0) (2021-07-01)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.4.1...v0.5.0)
**Closed issues:**
- QPS drops drastically after processing many requests [\#31](https://github.com/sparckles/robyn/issues/31)
- Improve the way you parse TCP streams [\#30](https://github.com/sparckles/robyn/issues/30)
- Re-introduce thread pool for the sync functions \(maybe\) [\#22](https://github.com/sparckles/robyn/issues/22)
- Add async listener object in rust stream! [\#11](https://github.com/sparckles/robyn/issues/11)
**Merged pull requests:**
- Make the server http compliant [\#33](https://github.com/sparckles/robyn/pull/33) ([sansyrox](https://github.com/sansyrox))
## [v0.4.1](https://github.com/sparckles/robyn/tree/v0.4.1) (2021-06-26)
[Full Changelog](https://github.com/sparckles/robyn/compare/0.4.0...v0.4.1)
**Closed issues:**
- Add PyPi Metadata [\#5](https://github.com/sparckles/robyn/issues/5)
**Merged pull requests:**
- Build and publish wheels on GitHub Actions [\#26](https://github.com/sparckles/robyn/pull/26) ([messense](https://github.com/messense))
- Code cleanup using PyFunction type [\#25](https://github.com/sparckles/robyn/pull/25) ([sansyrox](https://github.com/sansyrox))
- Add non blocking sync functions [\#23](https://github.com/sparckles/robyn/pull/23) ([sansyrox](https://github.com/sansyrox))
- Add support for sync functions [\#20](https://github.com/sparckles/robyn/pull/20) ([sansyrox](https://github.com/sansyrox))
## [0.4.0](https://github.com/sparckles/robyn/tree/0.4.0) (2021-06-22)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.3.0...0.4.0)
**Closed issues:**
- Add support for Sync functions as well! [\#7](https://github.com/sparckles/robyn/issues/7)
## [v0.3.0](https://github.com/sparckles/robyn/tree/v0.3.0) (2021-06-21)
[Full Changelog](https://github.com/sparckles/robyn/compare/v0.2.3...v0.3.0)
**Closed issues:**
- Architecture link in readme redirects to raw content [\#18](https://github.com/sparckles/robyn/issues/18)
- Link pointing to the wrong destination [\#6](https://github.com/sparckles/robyn/issues/6)
**Merged pull requests:**
- Pure tokio [\#17](https://github.com/sparckles/robyn/pull/17) ([JackThomson2](https://github.com/JackThomson2))
- Remove Mutex lock on Threadpool and routes [\#15](https://github.com/sparckles/robyn/pull/15) ([JackThomson2](https://github.com/JackThomson2))
## [v0.2.3](https://github.com/sparckles/robyn/tree/v0.2.3) (2021-06-18)
[Full Changelog](https://github.com/sparckles/robyn/compare/c14f52e6faa79917e89de4220590da7bf28f6a65...v0.2.3)
**Closed issues:**
- Improve async runtime [\#3](https://github.com/sparckles/robyn/issues/3)
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
================================================
FILE: CODE_OF_CONDUCT.md
================================================
### Robyn Open Source Community Guidelines
- **Be friendly and patient**.
- **Be welcoming**.
- **Be respectful**.
- **Be careful in the words that we choose**.
================================================
FILE: CONTRIBUTING.md
================================================
## Contributing Guidelines
First off, thank you for considering contributing to `Robyn`. This guide details all the general information that one should know before contributing to the project.
Please stick as close as possible to the guidelines. That way, we ensure that you have a smooth experience contributing to this project.
### General Rules:
These are, in general, rules that you should be following while contributing to an Open-Source project :
- Be Nice, Be Respectful (BNBR)
- Check if the Issue you created, exists or not.
- While creating a new issue, make sure you describe the issue clearly.
- Make proper commit messages and document your PR well.
- Always add comments in your Code and explain it at points if possible, add Doctest.
- Always create a Pull Request from a Branch; Never from the Main.
- Follow proper code conventions because writing clean code is important.
- Issues would be assigned on a "First Come, First Served" basis.
- Do mention (@sansyrox) the project maintainer if your PR isn't reviewed within a few days.
## First time contributors:
Pushing files in your own repository is easy, but how to contribute to someone else's project? If you have the same question, then below are the steps that you can follow
to make your first contribution in this repository.
### Pull Request
**1.** The very first step includes forking the project. Click on the `fork` button as shown below to fork the project.
<br><br><img src="https://i.imgur.com/7wapvt2.png" width="750" /><br>
**2.** Clone the forked repository. Open up the GitBash/Command Line and type
```
git clone https://github.com/<YOUR_USER_NAME>/robyn.git
```
**3.** Navigate to the project directory.
```
cd robyn
```
**4.** Add a reference to the original repository.
```
git remote add upstream https://github.com/sparckles/robyn.git
```
**5.** See latest changes to the repo using
```
git remote -v
```
**6.** Create a new branch.
```
git checkout -b <YOUR_BRANCH_NAME>
```
**7.** Always take a pull from the upstream repository to your main branch to keep it even with the main project. This will save you from frequent merge conflicts.
```
git pull upstream main
```
**8.** You can make the required changes now. Make appropriate commits with proper commit messages.
**9.** Add and then commit your changes.
```
git add .
```
```
git commit -m "<YOUR_COMMIT_MESSAGE>"
```
**10.** Push your local branch to the remote repository.
```
git push -u origin <YOUR_BRANCH_NAME>
```
**11.** Once you have pushed the changes to your repository, go to your forked repository. Click on the `Compare & pull request` button as shown below.
<br><br><img src="https://hisham.hm/img/posts/github-comparepr.png" width="750" /><br>
**12.** The image below is what the new page would look like. Give a proper title to your PR and describe the changes made by you in the description box.(Note - Sometimes there are PR templates which are to be filled as instructed.)
<br><br><img src="https://github.blog/wp-content/uploads/2019/02/draft-pull-requests.png?fit=1354%2C780" width="750" /><br>
**13.** Open a pull request by clicking the `Create pull request` button.
`Voila, you have made your first contribution to this project`
## Issue
- Issues can be used to keep track of bugs, enhancements, or other requests. Creating an issue to let the project maintainers know about the changes you are planning to make before raising a PR is a good open-source practice.
<br>
Let's walk through the steps to create an issue:
**1.** On GitHub, navigate to the main page of the repository. [Here](https://github.com/sparckles/robyn.git) in this case.
**2.** Under your repository name, click on the `Issues` button.
<br><br><img src="https://www.stevejgordon.co.uk/wp-content/uploads/2018/01/GitHubIssueTab.png" width="750" /><br>
**3.** Click on the `New issue` button.
<br><br><img src="https://miro.medium.com/max/3696/1*8jiGiKhMdVQDycWSAbjB8A.png" width="750" /><br>
**4.** Select one of the Issue Templates to get started.
<br><br><img src="https://i.imgur.com/xz2KAwU.png" width="750" /><br>
**5.** Fill in the appropriate `Title` and `Issue description` and click on `Submit new issue`.
<br><br><img src="https://i.imgur.com/XwjtGG1.png" width="750" /><br>
### Tutorials that may help you:
- [Git & GitHub Tutorial](https://www.youtube.com/watch?v=RGOj5yH7evk)
- [Resolve merge conflict](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-on-github)
================================================
FILE: Cargo.toml
================================================
[package]
name = "robyn"
version = "0.82.0"
authors = ["Sanskar Jethi <sansyrox@gmail.com>"]
edition = "2021"
description = "Robyn is a Super Fast Async Python Web Framework with a Rust runtime."
license = "BSD License (BSD)"
homepage = "https://github.com/sparckles/robyn"
readme = "README.md"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
name = "robyn"
crate-type = ["cdylib", "rlib"]
[dependencies]
pyo3 = { version = "0.27.2", features = ["extension-module", "py-clone"]}
pyo3-async-runtimes = { version = "0.27", features = ["tokio-runtime"] }
pyo3-async-runtimes-macros = { version = "0.27" }
pyo3-log = "0.13.2"
tokio = { version = "1.40", features = ["full"] }
dashmap = "5.4.3"
anyhow = "1.0.69"
actix = "0.13.4"
actix-web-actors = "4.3.0"
actix-web = "4.4.2"
actix-http = "3.3.1"
actix-files = "0.6.2"
futures = "0.3.27"
futures-util = "0.3.27"
matchit = "0.7.3"
socket2 = { version = "0.5.1", features = ["all"] }
uuid = { version = "1.3.0", features = ["serde", "v4"] }
log = "0.4.17"
pythonize = "0.27"
serde = "1.0.187"
serde_json = "1.0.109"
once_cell = "1.8.0"
actix-multipart = "0.6.1"
parking_lot = "0.12.3"
crossbeam-channel = "0.5"
[features]
io-uring = ["actix-web/experimental-io-uring"]
[profile.release]
codegen-units = 1
lto = "fat"
panic = "abort"
strip = true
opt-level = 3
[profile.release.build-override]
opt-level = 3
[package.metadata.maturin]
name = "robyn"
================================================
FILE: LICENSE
================================================
BSD 2-Clause License
Copyright (c) 2021, Sanskar Jethi
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: README.md
================================================
<p align="center"><img alt="Robyn Logo" src="https://user-images.githubusercontent.com/29942790/140995889-5d91dcff-3aa7-4cfb-8a90-2cddf1337dca.png" width="250" /><p>
# Robyn
[](https://twitter.com/Robyn_oss)
[](https://pepy.tech/project/Robyn)
[](https://github.com/sparckles/Robyn/releases/)
[](https://github.com/sparckles/Robyn/blob/main/LICENSE)

[](https://deepwiki.com/sparckles/Robyn)
[](https://robyn.tech/documentation)
[](https://discord.gg/rkERZ5eNU8)
[](https://gurubase.io/g/robyn)
Robyn 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/en/community-resources#talks)!
<img width="652" alt="image" src="https://github.com/sparckles/Robyn/assets/29942790/4a2bba61-24e7-4ee2-8884-19b40204bfcd">
Source: [TechEmpower Round 22](https://www.techempower.com/benchmarks/#section=data-r22&test=plaintext)
## 📦 Installation
You can simply use Pip for installation.
```bash
pip install robyn
```
Or, with [conda-forge](https://conda-forge.org/)
```bash
conda install -c conda-forge robyn
```
To install with all optional features (Pydantic validation, Jinja2 templating):
```bash
pip install "robyn[all]"
```
## 🤔 Usage
### 🚀 Define your API
To define your API, you can add the following code in an `app.py` file.
```python
from robyn import Robyn
app = Robyn(__file__)
@app.get("/")
async def h(request):
return "Hello, world!"
app.start(port=8080)
```
### 🏃 Run your code
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.
```
$ python3 app.py
```
To see the usage
```
usage: app.py [-h] [--processes PROCESSES] [--workers WORKERS] [--dev] [--log-level LOG_LEVEL]
Robyn, a fast async web framework with a rust runtime.
options:
-h, --help show this help message and exit
--processes PROCESSES
Choose the number of processes. [Default: 1]
--workers WORKERS Choose the number of workers. [Default: 1]
--dev Development mode. It restarts the server based on file changes.
--log-level LOG_LEVEL
Set the log level name
--create Create a new project template.
--docs Open the Robyn documentation.
--open-browser Open the browser on successful start.
--version Show the Robyn version.
--compile-rust-path COMPILE_RUST_PATH
Compile rust files in the given path.
--create-rust-file CREATE_RUST_FILE
Create a rust file with the given name.
--disable-openapi Disable the OpenAPI documentation.
--fast Enable the fast mode.
```
Log level can be `DEBUG`, `INFO`, `WARNING`, or `ERROR`.
When running the app using `--open-browser` a new browser window will open at the app location, e.g:
```
$ python3 app.py --open-browser
```
### 💻 Add more routes
You 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.
### 🐍 Python Version Support
Robyn is compatible with the following Python versions:
> Python >= 3.10
It is recommended to use the latest version of Python for the best performances.
Please make sure you have the correct version of Python installed before starting to use
this project. You can check your Python version by running the following command in your
terminal:
```bash
python --version
```
## 💡 Features
- Under active development!
- A multithreaded Runtime
- Extensible
- A simple API
- Sync and Async Function Support
- Dynamic URL Routing
- Multi Core Scaling
- WebSockets
- Middlewares (before and after request hooks)
- Built in form data handling
- Dependency Injection
- Hot Reloading
- Direct Rust Integration
- Automatic OpenAPI generation
- Jinja2 Templating
- Static File Serving
- File Responses and Downloads
- Authentication Support
- CORS Configuration
- Streaming / SSE Responses
- Startup and Shutdown Events
- Exception Handling
- SubRouters
- Project Scaffolding via CLI
- Experimental io-uring Support
- **🤖 AI Agent Support** - Built-in agent routing and execution
- **🔌 MCP (Model Context Protocol)** - Connect to AI applications as a server
- Community First and truly FOSS!
## 🗒️ How to contribute
### 🏁 Get started
Please 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.
Feel free to open an issue for any clarifications or suggestions.
If you're feeling curious. You can take a look at a more detailed architecture [here](https://robyn.tech/documentation/architecture).
If you still need help to get started, feel free to reach out on our [community discord](https://discord.gg/rkERZ5eNU8).
### ⚙️ To Develop Locally
#### Prerequisites
Before starting, ensure you have the following installed:
- Python >= 3.10, <= 3.14
- Rust (latest stable)
- C compiler (gcc/clang)
#### Setup
- Clone the repository:
```
git clone https://github.com/sparckles/Robyn.git
```
- Setup a virtual environment:
```
python3 -m venv .venv
source .venv/bin/activate
```
- Install required packages
```
pip install pre-commit poetry maturin
```
- Install development dependencies
```
poetry install --with dev --with test
```
- Install pre-commit git hooks
```
pre-commit install
```
- Build & install Robyn Rust package
```
maturin develop
```
- Build & install Robyn Rust package (**experimental**)
```
maturin develop --cargo-extra-args="--features=io-uring"
```
- Run!
```
poetry run test_server
```
- Run all tests
```
pytest
```
- Run only the integration tests
```
pytest integration_tests
```
- Run only the unit tests (you don't need to be running the test_server for these)
```
pytest unit_tests
```
- Test (refer to `integration_tests/base_routes.py` for more endpoints)
```
curl http://localhost:8080/sync/str
```
- **tip:** One liners for testing changes!
```
maturin develop && poetry run test_server
maturin develop && pytest
```
- **tip:** For IO-uring support, you can use the following command:
```
maturin develop --cargo-extra-args="--features=io-uring"
```
- **tip:** To use your local Robyn version in other projects, you can install it using pip:
```
pip install -e path/to/robyn/target/wheels/robyn-<version>-<python_version>-<platform>.whl
```
e.g.
```
pip install -e /repos/Robyn/target/wheels/robyn-0.63.0-cp312-cp312-macosx_10_15_universal2.whl
```
#### Troubleshooting
If you face any issues, here are some common fixes:
- install `patchelf` with `pip install patchelf` if you face `patchelf` not found issue during `maturin develop` (esp. on Arch Linux)
- If you get Rust compilation errors, ensure you have a C compiler installed:
- Ubuntu/Debian: `sudo apt install build-essential`
- Fedora: `sudo dnf install gcc`
- macOS: Install Xcode Command Line Tools
- Windows: Install Visual Studio Build Tools
## ✨ Special thanks
### ✨ Contributors/Supporters
Thanks to all the contributors of the project. Robyn will not be what it is without all your support :heart:.
<a href="https://github.com/sparckles/Robyn/graphs/contributors">
<img src="https://contrib.rocks/image?repo=sparckles/Robyn" />
</a>
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. 💖
### ✨ Sponsors
These sponsors help us make the magic happen!
[](https://www.digitalocean.com/?refcode=3f2b9fd4968d&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge)
[](https://github.com/appwrite)
## Star History
[](https://star-history.com/#sparckles/Robyn&Date)
================================================
FILE: benchmark.sh
================================================
#!/bin/sh
# Benchmark script to get info about Robyn's performances
# You can use this benchmark when developing on Robyn to test if your changes had a huge
# impact on performances. You cannot compare benchmarks from different machine and even
# several runs on the same machine can give very different results sometimes.
# Be aware of this when using this script!
Help() {
echo "Benchmark script to get info about Robyn's performances."
echo
echo "USAGE:"
echo " benchmark [-h|m|n|y]"
echo
echo "OPTIONS:"
echo " -h Print this help."
echo " -m Run 'maturin develop' to compile the Rust part of Robyn."
echo " -n <number> Set the number of requests that oha sends."
echo " -y Skip prompt"
exit 0
}
yes_flag=false
run_maturin=false
number=100000
while getopts hymn: opt; do
case $opt in
h)
Help
;;
y)
yes_flag=true
;;
m)
run_maturin=true
;;
n)
number=$OPTARG
;;
?)
echo 'Error in command line parsing' >&2
Help
exit 1
;;
esac
done
# Prompt user to check if he installed the requirements for running the benchmark
if [ "$yes_flag" = false ]; then
echo "Make sure you are running this in your venv and you installed 'oha' using 'cargo install oha'"
echo "Do you want to proceed?"
while true; do
read -p "" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done
fi
# Compile Rust
if $run_maturin; then
maturin develop
fi
# Run the server in the background
python3 ./integration_tests/base_routes.py &
sleep 1
# oha will display benchmark results
oha -n "$number" http://localhost:8080/sync
# Kill subprocesses after exiting the script (python + robyn server)
# (see https://stackoverflow.com/questions/360201/how-do-i-kill-background-processes-jobs-when-my-shell-script-exits)
trap "trap - TERM && kill 0" INT TERM EXIT
================================================
FILE: ci-local.sh
================================================
#!/usr/bin/env bash
set -euo pipefail
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
CYAN='\033[0;36m'
NC='\033[0m'
FAILED=()
PASSED=()
SKIPPED=()
run_step() {
local name="$1"
shift
echo -e "\n${CYAN}── $name ──${NC}"
echo -e "${YELLOW}$ $*${NC}"
if "$@"; then
PASSED+=("$name")
echo -e "${GREEN}✓ $name${NC}"
else
FAILED+=("$name")
echo -e "${RED}✗ $name${NC}"
fi
}
skip_step() {
local name="$1"
local reason="$2"
SKIPPED+=("$name ($reason)")
echo -e "\n${YELLOW}── $name [SKIPPED: $reason] ──${NC}"
}
usage() {
echo "Usage: $0 [rust|lint|python|all|fix]"
echo ""
echo "Mirrors the GitHub Actions CI workflows locally."
echo ""
echo " rust Rust CI: cargo check, test, fmt --check, clippy"
echo " lint Lint PR: ruff check, isort --check-only"
echo " python Python CI: nox test suite (current Python version)"
echo " all Everything (default)"
echo " fix Auto-fix: cargo fmt, ruff --fix, isort"
exit 0
}
# ── rust-CI.yml ───────────────────────────────────────────────────────────────
run_rust() {
echo -e "\n${CYAN}═══ Rust CI (.github/workflows/rust-CI.yml) ═══${NC}"
run_step "cargo check" cargo check
run_step "cargo test" cargo test
run_step "cargo fmt" cargo fmt --check
run_step "cargo clippy" cargo clippy
}
# ── lint-pr.yml ───────────────────────────────────────────────────────────────
run_lint() {
echo -e "\n${CYAN}═══ Lint PR (.github/workflows/lint-pr.yml) ═══${NC}"
if command -v ruff &>/dev/null; then
run_step "ruff check" ruff check .
else
skip_step "ruff check" "ruff not installed (pip install ruff)"
fi
if command -v isort &>/dev/null; then
run_step "isort check" isort --check-only --diff .
else
skip_step "isort check" "isort not installed (pip install isort)"
fi
}
# ── python-CI.yml ─────────────────────────────────────────────────────────────
run_python() {
echo -e "\n${CYAN}═══ Python CI (.github/workflows/python-CI.yml) ═══${NC}"
local pyver
pyver=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
if command -v nox &>/dev/null; then
run_step "nox (python $pyver)" nox --non-interactive --error-on-missing-interpreter -p "$pyver"
else
skip_step "nox tests" "nox not installed (pip install nox)"
fi
}
# ── fix mode ──────────────────────────────────────────────────────────────────
run_fix() {
echo -e "\n${CYAN}═══ Auto-fix ═══${NC}"
run_step "cargo fmt" cargo fmt
command -v ruff &>/dev/null && run_step "ruff fix" ruff check --fix . || skip_step "ruff fix" "not installed"
command -v isort &>/dev/null && run_step "isort fix" isort . || skip_step "isort fix" "not installed"
}
# ── main ──────────────────────────────────────────────────────────────────────
MODE="${1:-all}"
case "$MODE" in
rust) run_rust ;;
lint) run_lint ;;
python) run_python ;;
fix) run_fix ;;
all) run_rust; run_lint; run_python ;;
-h|--help|help) usage ;;
*) echo "Unknown mode: $MODE"; usage ;;
esac
# ── summary ───────────────────────────────────────────────────────────────────
echo -e "\n${CYAN}═══ Summary ═══${NC}"
for s in "${PASSED[@]+"${PASSED[@]}"}"; do echo -e " ${GREEN}✓${NC} $s"; done
for s in "${SKIPPED[@]+"${SKIPPED[@]}"}"; do echo -e " ${YELLOW}⊘${NC} $s"; done
for s in "${FAILED[@]+"${FAILED[@]}"}"; do echo -e " ${RED}✗${NC} $s"; done
if [ ${#FAILED[@]} -gt 0 ]; then
echo -e "\n${RED}CI would fail: ${#FAILED[@]} check(s) failed.${NC}"
exit 1
else
echo -e "\n${GREEN}All checks passed. Safe to push.${NC}"
exit 0
fi
================================================
FILE: docs_src/.eslintrc.json
================================================
{
"extends": ["next","next/core-web-vitals"],
"rules": {
"react/no-unescaped-entities": "off"
}
}
================================================
FILE: docs_src/.gitignore
================================================
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# local env files
.env*.local
# vercel
.vercel
# generated files
/public/rss/
================================================
FILE: docs_src/README.md
================================================
## Docs Base
This is the documentation website that will be used as a base for Robyn and Starfyre docs.
## Setup
1. Clone this repo
2. Run `npm install`
3. Run `npm run dev`
4. Open `http://localhost:3000` in your browser
================================================
FILE: docs_src/jsconfig.json
================================================
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
}
}
}
================================================
FILE: docs_src/mdx/recma.mjs
================================================
import { mdxAnnotations } from 'mdx-annotations'
import recmaNextjsStaticProps from 'recma-nextjs-static-props'
import { recmaImportImages } from 'recma-import-images'
function recmaRemoveNamedExports() {
return (tree) => {
tree.body = tree.body.map((node) => {
if (node.type === 'ExportNamedDeclaration') {
return node.declaration
}
return node
})
}
}
export const recmaPlugins = [
mdxAnnotations.recma,
recmaRemoveNamedExports,
recmaNextjsStaticProps,
recmaImportImages,
]
================================================
FILE: docs_src/mdx/rehype.mjs
================================================
import { mdxAnnotations } from 'mdx-annotations'
import { visit } from 'unist-util-visit'
import rehypeMdxTitle from 'rehype-mdx-title'
import shiki from 'shiki'
import { toString } from 'mdast-util-to-string'
import * as acorn from 'acorn'
import { slugifyWithCounter } from '@sindresorhus/slugify'
import rehypeSlug from 'rehype-slug'
import { remarkRehypeWrap } from 'remark-rehype-wrap'
import rehypeAutolinkHeadings from 'rehype-autolink-headings'
function rehypeParseCodeBlocks() {
return (tree) => {
visit(tree, 'element', (node, _nodeIndex, parentNode) => {
if (node.tagName === 'code' && node.properties.className) {
parentNode.properties.language = node.properties.className[0]?.replace(
/^language-/,
''
)
}
})
}
}
let highlighter
function rehypeShiki() {
return async (tree) => {
highlighter =
highlighter ?? (await shiki.getHighlighter({ theme: 'css-variables' }))
visit(tree, 'element', (node) => {
if (node.tagName === 'pre' && node.children[0]?.tagName === 'code') {
let codeNode = node.children[0]
let textNode = codeNode.children[0]
node.properties.code = textNode.value
if (node.properties.language) {
let tokens = highlighter.codeToThemedTokens(
textNode.value,
node.properties.language
)
textNode.value = shiki.renderToHtml(tokens, {
elements: {
pre: ({ children }) => children,
code: ({ children }) => children,
line: ({ children }) => `<span>${children}</span>`,
},
})
}
}
})
}
}
function rehypeSlugify() {
return (tree) => {
let slugify = slugifyWithCounter()
visit(tree, 'element', (node) => {
if (node.tagName === 'h2' && !node.properties.id) {
node.properties.id = slugify(toString(node))
}
})
}
}
function rehypeAddMDXExports(getExports) {
return (tree) => {
let exports = Object.entries(getExports(tree))
for (let [name, value] of exports) {
for (let node of tree.children) {
if (
node.type === 'mdxjsEsm' &&
new RegExp(`export\\s+const\\s+${name}\\s*=`).test(node.value)
) {
return
}
}
let exportStr = `export const ${name} = ${value}`
tree.children.push({
type: 'mdxjsEsm',
value: exportStr,
data: {
estree: acorn.parse(exportStr, {
sourceType: 'module',
ecmaVersion: 'latest',
}),
},
})
}
}
}
function getSections(node) {
let sections = []
for (let child of node.children ?? []) {
if (child.type === 'element' && child.tagName === 'h2') {
sections.push(`{
title: ${JSON.stringify(toString(child))},
id: ${JSON.stringify(child.properties.id)},
...${child.properties.annotation}
}`)
} else if (child.children) {
sections.push(...getSections(child))
}
}
return sections
}
export const rehypePlugins = [
rehypeSlug,
[rehypeAutolinkHeadings, { behavior: 'wrap', test: ['h2'] }],
[
remarkRehypeWrap,
{
node: { type: 'element', tagName: 'article' },
start: 'element[tagName=hr]',
transform: (article) => {
article.children.splice(0, 1)
let heading = article.children.find((n) => n.tagName === 'h2')
if (heading) {
article.properties = { ...heading.properties, title: toString(heading) }
heading.properties = {}
} else {
article.properties = {}
}
return article
},
},
],
mdxAnnotations.rehype,
rehypeParseCodeBlocks,
rehypeShiki,
rehypeSlugify,
rehypeMdxTitle,
[
rehypeAddMDXExports,
(tree) => ({
sections: `[${getSections(tree).join()}]`,
}),
],
]
================================================
FILE: docs_src/mdx/remark.mjs
================================================
import { mdxAnnotations } from 'mdx-annotations'
import remarkGfm from 'remark-gfm'
import remarkUnwrapImages from 'remark-unwrap-images'
export const remarkPlugins = [
mdxAnnotations.remark,
remarkGfm,
remarkUnwrapImages,
]
================================================
FILE: docs_src/next.config.mjs
================================================
import nextMDX from '@next/mdx'
import { remarkPlugins } from './mdx/remark.mjs'
import { rehypePlugins } from './mdx/rehype.mjs'
import { recmaPlugins } from './mdx/recma.mjs'
const withMDX = nextMDX({
options: {
remarkPlugins,
rehypePlugins,
recmaPlugins,
providerImportSource: '@mdx-js/react',
},
})
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'mdx'],
experimental: {
scrollRestoration: true,
},
i18n: {
locales: ['en', 'zh'],
defaultLocale: 'en',
localeDetection: false,
},
async redirects() {
return [
{
source: '/documentation',
destination: '/documentation/en',
permanent: false,
},
]
},
}
export default withMDX(nextConfig)
================================================
FILE: docs_src/package.json
================================================
{
"name": "tailwindui-template",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"browserslist": "defaults, not ie <= 11",
"dependencies": {
"@algolia/autocomplete-core": "^1.9.3",
"@algolia/autocomplete-preset-algolia": "^1.9.3",
"@headlessui/react": "^1.7.15",
"@heroicons/react": "^2.0.18",
"@mapbox/rehype-prism": "^0.8.0",
"@mdx-js/loader": "^2.1.5",
"@mdx-js/react": "^2.1.5",
"@next/mdx": "^13.0.2",
"@sindresorhus/slugify": "^2.2.1",
"@tailwindcss/typography": "^0.5.4",
"@vercel/analytics": "^1.0.2",
"algoliasearch": "^4.17.2",
"autoprefixer": "^10.4.12",
"axios": "^1.4.0",
"clsx": "^1.2.1",
"fast-glob": "^3.2.11",
"feed": "^4.2.2",
"focus-visible": "^5.2.0",
"framer-motion": "^10.12.16",
"highlight.js": "^11.8.0",
"mdx-annotations": "^0.1.3",
"meilisearch": "^0.33.0",
"next": "13.4.2",
"next-mdx-remote": "^6.0.0",
"next-router-mock": "^0.9.3",
"postcss-focus-visible": "^6.0.4",
"prism-themes": "^1.9.0",
"prismjs": "^1.29.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-markdown": "^8.0.7",
"recma-import-images": "^0.0.3",
"recma-nextjs-static-props": "^1.0.0",
"rehype-autolink-headings": "^6.1.1",
"rehype-mdx-title": "^2.0.0",
"rehype-slug": "^5.1.0",
"remark-gfm": "^3.0.1",
"remark-rehype-wrap": "^0.0.2",
"remark-unwrap-images": "^3.0.1",
"shiki": "^0.14.2",
"tailwindcss": "^3.3.0",
"zustand": "^4.3.8"
},
"devDependencies": {
"eslint": "8.26.0",
"eslint-config-next": "13.0.2",
"prettier": "^2.8.7",
"prettier-plugin-tailwindcss": "^0.2.6"
}
}
================================================
FILE: docs_src/postcss.config.js
================================================
module.exports = {
plugins: {
tailwindcss: {},
'postcss-focus-visible': {
replaceWith: '[data-focus-visible-added]',
},
autoprefixer: {},
},
}
================================================
FILE: docs_src/prettier.config.js
================================================
module.exports = {
singleQuote: true,
semi: false,
plugins: [require('prettier-plugin-tailwindcss')],
}
================================================
FILE: docs_src/public/funding.json
================================================
{
"version": "v1.0.0",
"entity": {
"type": "individual",
"role": "owner",
"name": "Sanskar Jethi",
"email": "sansyrox@gmail.com",
"phone": "",
"description": "Sanskar is a FOSS engineer who created Robyn and Starfyre. Sanskar has created software for over half his life and used it for almost all of his.",
"webpageUrl": {
"url": "https://robyn.tech/"
}
},
"projects": [
{
"guid": "robyn",
"name": "robyn",
"description": "Robyn is one of the fastest Python web frameworks, which comes with a built in web server and a Rust runtime.",
"webpageUrl": {
"url": "https://robyn.tech/"
},
"repositoryUrl": {
"url": "https://github.com/sparckles/Robyn",
"wellKnown": "https://github.com/sparckles/Robyn/blob/main/.well-known/funding-manifest-urls"
},
"licenses": ["BSD 2-Clause \"Simplified\" License"],
"tags": ["programming", "python", "rust", "web", "backend", "async"]
}
],
"funding": {
"channels": [
{
"guid": "mybank",
"type": "bank",
"address": "",
"description": "Send me an email to get my bank details"
}
],
"plans": [
{
"guid": "mybank",
"status": "active",
"name": "Support Maintainer Part Time",
"description": "Support the maintainer for his work on Robyn part time.",
"amount": 500,
"currency": "GBP",
"frequency": "monthly",
"channels": ["mybank"]
},
{
"guid": "mybank",
"status": "active",
"name": "Support Maintainer Full Time",
"description": "Support the maintainer for his work on Robyn full time.",
"amount": 3000,
"currency": "GBP",
"frequency": "monthly",
"channels": ["mybank"]
},
{
"guid": "150",
"status": "active",
"name": " Support Contributor Part Time",
"description": "Support for one contributor per month",
"amount": 150,
"currency": "GBP",
"frequency": "monthly",
"channels": ["mybank"]
},
{
"guid": "500",
"status": "active",
"name": " Support Contributor Full Time",
"description": "Support for one contributor per month",
"amount": 500,
"currency": "GBP",
"frequency": "monthly",
"channels": ["mybank"]
}
],
"history": []
}
}
================================================
FILE: docs_src/public/llms.txt
================================================
# Robyn
> Robyn is a high-performance, community-driven, and innovator-friendly async web framework for Python with a Rust runtime. It combines Python's ease of use with Rust's performance.
## Quick Facts
- Version: 0.79.0
- Python: >= 3.10
- License: BSD 2.0
- Repository: https://github.com/sparckles/robyn
- Documentation: https://robyn.tech/documentation
- Discord: https://discord.gg/rkERZ5eNU8
## Installation
```bash
pip install robyn
```
## Basic Usage
```python
from robyn import Robyn
app = Robyn(__file__)
@app.get("/")
async def index(request):
return "Hello, World!"
app.start(port=8080)
```
## Key Features
- **Rust Runtime**: Core server written in Rust using actix-web for high performance
- **Async/Sync Support**: Both async and sync route handlers supported
- **Multi-Process Scaling**: Built-in multiprocess execution via `--processes` and `--workers`
- **WebSockets**: Native WebSocket support
- **Middlewares**: Before/after request middlewares
- **Dependency Injection**: Built-in DI system
- **OpenAPI/Swagger**: Automatic OpenAPI documentation generation
- **Hot Reloading**: Development mode with `--dev` flag
- **AI Agents**: Built-in AI agent routing via `robyn.ai`
- **MCP Support**: Model Context Protocol server capabilities via `app.mcp`
- **Templating**: Jinja2 templating support (optional)
- **CORS**: Built-in CORS helper via `ALLOW_CORS()`
- **Authentication**: AuthenticationHandler base class for custom auth
- **Static Files**: Directory serving via `app.serve_directory()`
- **SSE**: Server-Sent Events support via `SSEResponse`
- **Easy Access Parameters**: Typed path/query params with automatic coercion in handler signatures
- **Direct Rust Integration**: Embed Rust code directly in routes
## Project Structure
```
robyn/
├── src/ # Rust source code
│ ├── lib.rs # PyO3 module entry point
│ ├── server.rs # Main HTTP server implementation
│ ├── types/ # Request, Response, Headers, Cookie types
│ ├── routers/ # HTTP, WebSocket, middleware routers
│ ├── executors/ # Route execution handlers
│ └── websockets/ # WebSocket implementation
├── robyn/ # Python package
│ ├── __init__.py # Main Robyn and SubRouter classes
│ ├── router.py # Python router implementation
│ ├── authentication.py # AuthenticationHandler
│ ├── dependency_injection.py
│ ├── openapi.py # OpenAPI generation
│ ├── mcp.py # MCP protocol support
│ ├── ai.py # AI agent support
│ ├── responses.py # Response helpers (serve_file, html, SSE)
│ ├── ws.py # WebSocket class
│ └── robyn.pyi # Type stubs
├── integration_tests/ # Integration test suite
├── unit_tests/ # Unit test suite
├── docs_src/ # Documentation (Next.js)
├── granian/ # Bundled Granian server (fork)
└── examples/ # Example applications
```
## Core Classes
### Robyn / SubRouter
Main application class and sub-router for modular routes.
```python
from robyn import Robyn, SubRouter
app = Robyn(__file__)
api = SubRouter(__file__, prefix="/api")
@api.get("/users")
def get_users(request):
return {"users": []}
app.include_router(api)
```
### Request Object
```python
request.method # HTTP method
request.url # Url object (scheme, host, path)
request.headers # Headers dict-like
request.query_params # QueryParams
request.path_params # Dict of URL params
request.body # Raw bytes
request.json() # Parse JSON body
request.form_data # Multipart form data
request.ip_addr # Client IP
request.identity # Identity (if authenticated)
```
### Response Object
```python
from robyn import Response
Response(
status_code=200,
headers={"Content-Type": "application/json"},
description="body content" # or body bytes
)
```
### Decorators
```python
@app.get("/path")
@app.post("/path")
@app.put("/path")
@app.delete("/path")
@app.patch("/path")
@app.head("/path")
@app.options("/path")
@app.before_request("/path") # Middleware before
@app.after_request("/path") # Middleware after
@app.startup_handler # Server startup
@app.shutdown_handler # Server shutdown
```
### WebSockets
```python
from robyn import WebSocketDisconnect
@app.websocket("/ws")
async def handler(websocket):
try:
while True:
msg = await websocket.receive_text()
await websocket.send_text(f"Echo: {msg}")
except WebSocketDisconnect:
pass
@handler.on_connect
def on_connect(websocket):
return "Connected"
@handler.on_close
def on_close(websocket):
return "Closed"
```
### Easy Access Parameters
Declare typed path and query parameters directly in handler signatures. Works for both HTTP and WebSocket handlers.
```python
from typing import List, Optional
# HTTP: path params + query params with type coercion
@app.get("/items/:id")
async def get_item(id: int, q: str, page: int = 1):
return {"id": id, "q": q, "page": page}
# Optional, List, and bool params
@app.get("/search")
def search(name: str, tags: List[str], active: bool = False, age: Optional[int] = None):
return {"name": name, "tags": tags, "active": active, "age": age}
# WebSocket: typed query params on handler and callbacks
@app.websocket("/ws")
async def handler(websocket, room: str = "default", page: int = 1):
while True:
msg = await websocket.receive_text()
await websocket.send_text(f"room={room} page={page} msg={msg}")
@handler.on_connect
def on_connect(websocket, room: str = "default"):
return f"connected to {room}"
```
### MCP (Model Context Protocol)
```python
@app.mcp.resource("time://current")
def get_time():
return datetime.now().isoformat()
@app.mcp.tool(name="calc", description="Calculate", input_schema={...})
def calculate(args):
return eval(args["expression"])
@app.mcp.prompt(name="explain", description="Explain code", arguments=[...])
def explain_prompt(args):
return f"Please explain: {args['code']}"
```
## CLI Commands
```bash
python app.py # Start server
python app.py --dev # Development mode (hot reload)
python app.py --processes 4 # Multi-process
python app.py --workers 2 # Workers per process
python app.py --log-level DEBUG # Log level
python app.py --open-browser # Open browser on start
python app.py --create # Create new project scaffold
python app.py --docs # Open documentation
```
## Development Setup
```bash
# Clone
git clone https://github.com/sparckles/robyn.git
cd robyn
# Virtual environment
python3 -m venv .venv && source .venv/bin/activate
# Install tools
pip install pre-commit poetry maturin
# Install dependencies
poetry install --with dev --with test
# Build Rust extension
maturin develop
# Run tests
pytest
```
## Key Dependencies
- **PyO3**: Rust-Python bindings
- **actix-web**: Rust HTTP server (via cookie crate)
- **orjson**: Fast JSON serialization
- **multiprocess**: Multi-process support
- **uvloop**: Fast event loop (non-Windows)
- **watchdog**: File watching for hot reload
## Configuration
Environment variables:
- `ROBYN_HOST`: Server host (default: 127.0.0.1)
- `ROBYN_PORT`: Server port (default: 8080)
- `ROBYN_DEV_MODE`: Enable dev mode
- `ROBYN_BROWSER_OPEN`: Open browser on start
- `ROBYN_CLIENT_TIMEOUT`: Client timeout seconds
- `ROBYN_KEEP_ALIVE_TIMEOUT`: Keep-alive timeout
## Documentation Structure
Main docs at `docs_src/src/pages/documentation/`:
- `api_reference/getting_started.mdx` - Quick start guide
- `api_reference/request_object.mdx` - Request handling
- `api_reference/middlewares.mdx` - Middleware usage
- `api_reference/websockets.mdx` - WebSocket guide
- `api_reference/authentication.mdx` - Auth patterns
- `api_reference/openapi.mdx` - OpenAPI docs
- `api_reference/agents.mdx` - AI agent integration
- `api_reference/mcps.mdx` - MCP server guide
- `example_app/` - Full example application tutorial
================================================
FILE: docs_src/src/components/Button.jsx
================================================
import Link from 'next/link'
import clsx from 'clsx'
const variantStyles = {
primary:
'font-semibold text-zinc-100 bg-zinc-700 hover:bg-zinc-600 active:bg-zinc-700 active:text-zinc-100/70',
secondary:
'font-medium bg-zinc-800/50 text-zinc-300 hover:bg-zinc-800 hover:text-zinc-50 active:bg-zinc-800/50 active:text-zinc-50/70',
}
export function Button({ variant = 'primary', className, href, ...props }) {
className = clsx(
'inline-flex items-center gap-2 justify-center rounded-md py-2 px-3 text-sm outline-offset-2 transition active:transition-none',
variantStyles[variant],
className
)
return href ? (
<Link href={href} className={className} {...props} />
) : (
<button className={className} {...props} />
)
}
================================================
FILE: docs_src/src/components/Card.jsx
================================================
import Link from 'next/link'
import clsx from 'clsx'
function ChevronRightIcon(props) {
return (
<svg viewBox="0 0 16 16" fill="none" aria-hidden="true" {...props}>
<path
d="M6.75 5.75 9.25 8l-2.5 2.25"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
)
}
export function Card({ as: Component = 'div', className, children }) {
return (
<Component
className={clsx(className, 'group relative flex flex-col items-start')}
>
{children}
</Component>
)
}
Card.Link = function CardLink({ children, ...props }) {
return (
<>
<div className="absolute -inset-x-4 -inset-y-6 z-0 scale-95 bg-zinc-800/50 opacity-0 transition group-hover:scale-100 group-hover:opacity-100 sm:-inset-x-6 sm:rounded-2xl" />
<Link {...props}>
<span className="absolute -inset-x-4 -inset-y-6 z-20 sm:-inset-x-6 sm:rounded-2xl" />
<span className="relative z-10">{children}</span>
</Link>
</>
)
}
Card.Title = function CardTitle({ as: Component = 'h2', href, children }) {
return (
<Component className="text-base font-semibold tracking-tight text-zinc-100">
{href ? <Card.Link href={href}>{children}</Card.Link> : children}
</Component>
)
}
Card.Description = function CardDescription({ children }) {
return <p className="relative z-10 mt-2 text-sm text-zinc-400">{children}</p>
}
Card.Cta = function CardCta({ children }) {
return (
<div
aria-hidden="true"
className="relative z-10 mt-4 flex items-center text-sm font-medium text-yellow-500"
>
{children}
<ChevronRightIcon className="ml-1 h-4 w-4 stroke-current" />
</div>
)
}
Card.Eyebrow = function CardEyebrow({
as: Component = 'p',
decorate = false,
className,
children,
...props
}) {
return (
<Component
className={clsx(
className,
'relative z-10 order-first mb-3 flex items-center text-sm text-zinc-500',
decorate && 'pl-3.5'
)}
{...props}
>
{decorate && (
<span
className="absolute inset-y-0 left-0 flex items-center"
aria-hidden="true"
>
<span className="h-4 w-0.5 rounded-full bg-zinc-500" />
</span>
)}
{children}
</Component>
)
}
================================================
FILE: docs_src/src/components/Container.jsx
================================================
import { forwardRef } from 'react'
import clsx from 'clsx'
const OuterContainer = forwardRef(function OuterContainer(
{ className, children, ...props },
ref
) {
return (
<div ref={ref} className={clsx('sm:px-8', className)} {...props}>
<div className="mx-auto max-w-7xl lg:px-8">{children}</div>
</div>
)
})
const InnerContainer = forwardRef(function InnerContainer(
{ className, children, ...props },
ref
) {
return (
<div
ref={ref}
className={clsx('relative px-4 sm:px-8 lg:px-12', className)}
{...props}
>
<div className="mx-auto max-w-3xl lg:max-w-5xl">{children}</div>
</div>
)
})
export const Container = forwardRef(function Container(
{ children, ...props },
ref
) {
return (
<OuterContainer ref={ref} {...props}>
<InnerContainer>{children}</InnerContainer>
</OuterContainer>
)
})
Container.Outer = OuterContainer
Container.Inner = InnerContainer
================================================
FILE: docs_src/src/components/Footer.jsx
================================================
import Link from 'next/link'
import { Container } from '@/components/Container'
import { GitHubIcon } from './SocialIcons'
function NavLink({ href, children, ...props }) {
return (
<Link {...props} href={href} className="transition hover:text-yellow-400">
{children}
</Link>
)
}
export function GithubButton() {
return (
<button
type="button"
aria-label="Toggle dark mode"
className="group rounded-full border-2 border-yellow-500 bg-zinc-800/90 px-3 py-2 shadow-lg shadow-zinc-800/5 ring-1 ring-white/10 backdrop-blur transition hover:ring-white/20"
>
<GitHubIcon className="block h-6 w-6 fill-zinc-700 stroke-zinc-500 transition group-hover:stroke-zinc-400" />
</button>
)
}
export function Footer() {
return (
<>
<Container
className="bottom-2 right-2 z-40"
style={{ position: 'fixed' }}
>
<div className="flex md:flex-1">
<div className="pointer-events-auto ">
<Link target="_blank" href="https://github.com/sparckles/robyn">
<GithubButton />
</Link>
</div>
</div>
</Container>
<footer className="mt-32">
<Container.Outer>
<div className="border-t border-zinc-700/40 pb-16 pt-10">
<Container.Inner>
<div className="flex flex-col items-center justify-between gap-6 sm:flex-row">
<div className="flex flex-wrap justify-center gap-x-6 gap-y-1 text-sm font-medium text-zinc-200">
<NavLink href="/">Home</NavLink>
<NavLink href="/documentation">Documentation</NavLink>
<NavLink href="/releases">Releases</NavLink>
<NavLink href="/community">Community</NavLink>
<NavLink href="https://discord.gg/rkERZ5eNU8" target="_blank">
Discord
</NavLink>
</div>
<p className="text-sm text-zinc-500">
© {new Date().getFullYear()} Sparckles OSS. All rights
reserved.
</p>
</div>
</Container.Inner>
</div>
</Container.Outer>
</footer>
</>
)
}
================================================
FILE: docs_src/src/components/Header.jsx
================================================
import { Fragment, useEffect, useRef, useState } from 'react'
import Image from 'next/image'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { Popover, Transition } from '@headlessui/react'
import clsx from 'clsx'
import { Container } from '@/components/Container'
import robynLogo from '@/images/robyn_logo.jpg'
import { MobileSearch, Search } from '@/components/documentation/Search'
function CloseIcon(props) {
return (
<svg viewBox="0 0 24 24" aria-hidden="true" {...props}>
<path
d="m17.25 6.75-10.5 10.5M6.75 6.75l10.5 10.5"
fill="none"
stroke="currentColor"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
)
}
function ChevronDownIcon(props) {
return (
<svg viewBox="0 0 8 6" aria-hidden="true" {...props}>
<path
d="M1.75 1.75 4 4.25l2.25-2.5"
fill="none"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
)
}
function MobileNavItem({ href, children }) {
return (
<li>
<Popover.Button as={Link} href={href} className="block py-2">
{children}
</Popover.Button>
</li>
)
}
function MobileNavigation(props) {
return (
<Popover {...props}>
<Popover.Button className="group flex items-center rounded-full bg-zinc-800/90 px-4 py-2 text-sm font-medium text-zinc-200 shadow-lg shadow-zinc-800/5 ring-1 ring-white/10 backdrop-blur hover:ring-white/20">
Menu
<ChevronDownIcon className="ml-3 h-auto w-2 stroke-zinc-500 group-hover:stroke-zinc-400" />
</Popover.Button>
<Transition.Root>
<Transition.Child
as={Fragment}
enter="duration-150 ease-out"
enterFrom="opacity-0"
enterTo="opacity-100"
leave="duration-150 ease-in"
leaveFrom="opacity-100"
leaveTo="opacity-0"
>
<Popover.Overlay className="fixed inset-0 z-50 bg-black/80 backdrop-blur-sm" />
</Transition.Child>
<Transition.Child
as={Fragment}
enter="duration-150 ease-out"
enterFrom="opacity-0 scale-95"
enterTo="opacity-100 scale-100"
leave="duration-150 ease-in"
leaveFrom="opacity-100 scale-100"
leaveTo="opacity-0 scale-95"
>
<Popover.Panel
focus
className="fixed inset-x-4 top-8 z-50 origin-top rounded-3xl bg-zinc-900 p-8 ring-1 ring-zinc-800"
>
<div className="flex flex-row-reverse items-center justify-between">
<Popover.Button aria-label="Close menu" className="-m-1 p-1">
<CloseIcon className="h-6 w-6 text-zinc-400" />
</Popover.Button>
<h2 className="text-sm font-medium text-zinc-400">Navigation</h2>
</div>
<nav className="mt-6">
<ul className="-my-2 divide-y divide-zinc-100/5 text-base text-zinc-300">
<MobileNavItem href="/documentation">
Documentation
</MobileNavItem>
<MobileNavItem href="/releases">Releases</MobileNavItem>
<MobileNavItem href="/community">Community</MobileNavItem>
<MobileNavItem href="https://github.com/sparckles/robyn">
GitHub
</MobileNavItem>
</ul>
</nav>
</Popover.Panel>
</Transition.Child>
</Transition.Root>
</Popover>
)
}
function NavItem({ href, children, ...props }) {
let isActive = useRouter().pathname === href
return (
<li>
<Link
href={href}
className={clsx(
'relative block px-3 py-2 transition',
isActive ? 'text-yellow-500' : 'hover:text-yellow-500'
)}
{...props}
>
{children}
{isActive && (
<span className="absolute inset-x-1 -bottom-px h-px bg-gradient-to-r from-orange-800/0 via-yellow-800/40 to-yellow-500/0 " />
)}
</Link>
</li>
)
}
function DesktopNavigation(props) {
return (
<nav {...props}>
<ul className="flex rounded-full bg-zinc-800/90 px-3 text-sm font-medium text-zinc-200 shadow-lg shadow-zinc-800/5 ring-1 ring-white/10 backdrop-blur">
<NavItem href="/documentation">Documentation</NavItem>
<NavItem href="/releases">Releases</NavItem>
<NavItem href="/community">Community</NavItem>
<NavItem href="https://discord.gg/rkERZ5eNU8" target="_blank">
Discord
</NavItem>
</ul>
</nav>
)
}
function GitHubStars() {
const [stars, setStars] = useState('6.1k')
const [loading, setLoading] = useState(false)
const fetchStars = async () => {
if (loading) return
setLoading(true)
try {
const response = await fetch('https://api.github.com/repos/sparckles/robyn')
const data = await response.json()
if (data.stargazers_count) {
const count = data.stargazers_count
const formatted = count >= 1000
? `${(count / 1000).toFixed(1)}k`
: count.toString()
setStars(formatted)
}
} catch (error) {
console.error('Failed to fetch GitHub stars:', error)
} finally {
setLoading(false)
}
}
useEffect(() => {
fetchStars()
const interval = setInterval(fetchStars, 300000)
return () => clearInterval(interval)
}, [])
return (
<a
href="https://github.com/sparckles/robyn"
target="_blank"
rel="noopener noreferrer"
className="pointer-events-auto flex items-center gap-2 rounded-full bg-zinc-800/90 px-3 py-2 text-sm font-medium text-zinc-200 shadow-lg shadow-zinc-800/5 ring-1 ring-white/10 backdrop-blur hover:ring-white/20 transition-all"
onClick={fetchStars}
>
<svg className="h-4 w-4" fill="currentColor" viewBox="0 0 24 24">
<path d="M12 0C5.374 0 0 5.373 0 12 0 17.302 3.438 21.8 8.207 23.387c.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.509 11.509 0 0112 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12z"/>
</svg>
<svg className="h-4 w-4" fill="currentColor" viewBox="0 0 20 20">
<path
fillRule="evenodd"
d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"
clipRule="evenodd"
/>
</svg>
<span className={loading ? 'opacity-60' : ''}>{stars}</span>
</a>
)
}
function clamp(number, a, b) {
let min = Math.min(a, b)
let max = Math.max(a, b)
return Math.min(Math.max(number, min), max)
}
function Avatar({ large = false, className, ...props }) {
return (
<Link
href="/"
aria-label="Home"
className={clsx(className, 'pointer-events-auto')}
{...props}
>
<Image
src={robynLogo}
alt=""
sizes={large ? '4rem' : '2.25rem'}
className={clsx(
'rounded-md bg-zinc-800 object-cover',
large ? 'h-16 w-16' : 'h-9 w-9'
)}
priority
/>
</Link>
)
}
export function Header() {
let isHomePage = useRouter().pathname === '/'
let headerRef = useRef()
let avatarRef = useRef()
let isInitial = useRef(true)
useEffect(() => {
let downDelay = avatarRef.current?.offsetTop ?? 0
let upDelay = 64
function setProperty(property, value) {
document.documentElement.style.setProperty(property, value)
}
function removeProperty(property) {
document.documentElement.style.removeProperty(property)
}
function updateHeaderStyles() {
let { top, height } = headerRef.current.getBoundingClientRect()
let scrollY = clamp(
window.scrollY,
0,
document.body.scrollHeight - window.innerHeight
)
if (isInitial.current) {
setProperty('--header-position', 'sticky')
}
setProperty('--content-offset', `${downDelay}px`)
if (isInitial.current || scrollY < downDelay) {
setProperty('--header-height', `${downDelay + height}px`)
setProperty('--header-mb', `${-downDelay}px`)
} else if (top + height < -upDelay) {
let offset = Math.max(height, scrollY - upDelay)
setProperty('--header-height', `${offset}px`)
setProperty('--header-mb', `${height - offset}px`)
} else if (top === 0) {
setProperty('--header-height', `${scrollY + height}px`)
setProperty('--header-mb', `${-scrollY}px`)
}
if (top === 0 && scrollY > 0 && scrollY >= downDelay) {
setProperty('--header-inner-position', 'fixed')
removeProperty('--header-top')
removeProperty('--avatar-top')
} else {
removeProperty('--header-inner-position')
setProperty('--header-top', '0px')
setProperty('--avatar-top', '0px')
}
}
function updateStyles() {
updateHeaderStyles()
isInitial.current = false
}
updateStyles()
window.addEventListener('scroll', updateStyles, { passive: true })
window.addEventListener('resize', updateStyles)
return () => {
window.removeEventListener('scroll', updateStyles)
window.removeEventListener('resize', updateStyles)
}
}, [isHomePage])
return (
<>
<header
className="pointer-events-none relative z-50 flex flex-col"
style={{
height: 'var(--header-height)',
marginBottom: 'var(--header-mb)',
}}
>
<div
ref={headerRef}
className="top-0 z-10 h-16 pt-6"
style={{ position: 'var(--header-position)' }}
>
<Container
className="top-[var(--header-top,theme(spacing.6))] w-full"
style={{ position: 'var(--header-inner-position)' }}
>
<div className="relative flex gap-4">
<div className="flex flex-1">{<Avatar />}</div>
<div className="flex flex-1 justify-end md:justify-center">
<MobileNavigation className="pointer-events-auto md:hidden" />
<DesktopNavigation className="pointer-events-auto hidden md:block" />
</div>
<div className="flex justify-end md:flex-1">
<div className="flex items-center gap-3">
<GitHubStars />
<div className="pointer-events-auto">
<Search />
<MobileSearch />
</div>
</div>
</div>
</div>
</Container>
</div>
</header>
{isHomePage && <div style={{ height: 'var(--content-offset)' }} />}
</>
)
}
================================================
FILE: docs_src/src/components/Prose.jsx
================================================
import clsx from 'clsx'
export function Prose({ children, className }) {
return <div className={clsx(className, 'prose-invert')}>{children}</div>
}
================================================
FILE: docs_src/src/components/Section.jsx
================================================
import { useId } from 'react'
export function Section({ title, children }) {
let id = useId()
return (
<section
aria-labelledby={id}
className="md:border-l md:border-zinc-700/40 md:pl-6"
>
<div className="grid max-w-3xl grid-cols-1 items-baseline gap-y-8 md:grid-cols-4">
<h2 id={id} className="text-sm font-semibold text-zinc-100">
{title}
</h2>
<div className="md:col-span-3">{children}</div>
</div>
</section>
)
}
================================================
FILE: docs_src/src/components/SimpleLayout.jsx
================================================
import { Container } from '@/components/Container'
export function SimpleLayout({ title, intro, children }) {
return (
<Container className="mt-16 sm:mt-32">
<header className="max-w-2xl">
<h1 className="text-4xl font-bold tracking-tight text-zinc-100 sm:text-5xl">
{title}
</h1>
<p className="mt-6 text-base text-zinc-400">{intro}</p>
</header>
<div className="mt-16 sm:mt-20">{children}</div>
</Container>
)
}
================================================
FILE: docs_src/src/components/SocialIcons.jsx
================================================
export function TwitterIcon(props) {
return (
<svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" {...props}>
<path d="M20.055 7.983c.011.174.011.347.011.523 0 5.338-3.92 11.494-11.09 11.494v-.003A10.755 10.755 0 0 1 3 18.186c.308.038.618.057.928.058a7.655 7.655 0 0 0 4.841-1.733c-1.668-.032-3.13-1.16-3.642-2.805a3.753 3.753 0 0 0 1.76-.07C5.07 13.256 3.76 11.6 3.76 9.676v-.05a3.77 3.77 0 0 0 1.77.505C3.816 8.945 3.288 6.583 4.322 4.737c1.98 2.524 4.9 4.058 8.034 4.22a4.137 4.137 0 0 1 1.128-3.86A3.807 3.807 0 0 1 19 5.274a7.657 7.657 0 0 0 2.475-.98c-.29.934-.9 1.729-1.713 2.233A7.54 7.54 0 0 0 22 5.89a8.084 8.084 0 0 1-1.945 2.093Z" />
</svg>
)
}
export function InstagramIcon(props) {
return (
<svg viewBox="0 0 24 24" aria-hidden="true" {...props}>
<path d="M12 3c-2.444 0-2.75.01-3.71.054-.959.044-1.613.196-2.185.418A4.412 4.412 0 0 0 4.51 4.511c-.5.5-.809 1.002-1.039 1.594-.222.572-.374 1.226-.418 2.184C3.01 9.25 3 9.556 3 12s.01 2.75.054 3.71c.044.959.196 1.613.418 2.185.23.592.538 1.094 1.039 1.595.5.5 1.002.808 1.594 1.038.572.222 1.226.374 2.184.418C9.25 20.99 9.556 21 12 21s2.75-.01 3.71-.054c.959-.044 1.613-.196 2.185-.419a4.412 4.412 0 0 0 1.595-1.038c.5-.5.808-1.002 1.038-1.594.222-.572.374-1.226.418-2.184.044-.96.054-1.267.054-3.711s-.01-2.75-.054-3.71c-.044-.959-.196-1.613-.419-2.185A4.412 4.412 0 0 0 19.49 4.51c-.5-.5-1.002-.809-1.594-1.039-.572-.222-1.226-.374-2.184-.418C14.75 3.01 14.444 3 12 3Zm0 1.622c2.403 0 2.688.009 3.637.052.877.04 1.354.187 1.67.31.421.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.671.043.95.052 1.234.052 3.637s-.009 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.421-.358.72-.673 1.036a2.79 2.79 0 0 1-1.035.673c-.317.123-.794.27-1.671.31-.95.043-1.234.052-3.637.052s-2.688-.009-3.637-.052c-.877-.04-1.354-.187-1.67-.31a2.789 2.789 0 0 1-1.036-.673 2.79 2.79 0 0 1-.673-1.035c-.123-.317-.27-.794-.31-1.671-.043-.95-.052-1.234-.052-3.637s.009-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.421.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.671-.31.95-.043 1.234-.052 3.637-.052Z" />
<path d="M12 15a3 3 0 1 1 0-6 3 3 0 0 1 0 6Zm0-7.622a4.622 4.622 0 1 0 0 9.244 4.622 4.622 0 0 0 0-9.244Zm5.884-.182a1.08 1.08 0 1 1-2.16 0 1.08 1.08 0 0 1 2.16 0Z" />
</svg>
)
}
export function GitHubIcon(props) {
return (
<svg viewBox="0 0 24 24" aria-hidden="true" {...props}>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M12 2C6.475 2 2 6.588 2 12.253c0 4.537 2.862 8.369 6.838 9.727.5.09.687-.218.687-.487 0-.243-.013-1.05-.013-1.91C7 20.059 6.35 18.957 6.15 18.38c-.113-.295-.6-1.205-1.025-1.448-.35-.192-.85-.667-.013-.68.788-.012 1.35.744 1.538 1.051.9 1.551 2.338 1.116 2.912.846.088-.666.35-1.115.638-1.371-2.225-.256-4.55-1.14-4.55-5.062 0-1.115.387-2.038 1.025-2.756-.1-.256-.45-1.307.1-2.717 0 0 .837-.269 2.75 1.051.8-.23 1.65-.346 2.5-.346.85 0 1.7.115 2.5.346 1.912-1.333 2.75-1.05 2.75-1.05.55 1.409.2 2.46.1 2.716.637.718 1.025 1.628 1.025 2.756 0 3.934-2.337 4.806-4.562 5.062.362.32.675.936.675 1.897 0 1.371-.013 2.473-.013 2.82 0 .268.188.589.688.486a10.039 10.039 0 0 0 4.932-3.74A10.447 10.447 0 0 0 22 12.253C22 6.588 17.525 2 12 2Z"
/>
</svg>
)
}
export function LinkedInIcon(props) {
return (
<svg viewBox="0 0 24 24" aria-hidden="true" {...props}>
<path d="M18.335 18.339H15.67v-4.177c0-.996-.02-2.278-1.39-2.278-1.389 0-1.601 1.084-1.601 2.205v4.25h-2.666V9.75h2.56v1.17h.035c.358-.674 1.228-1.387 2.528-1.387 2.7 0 3.2 1.778 3.2 4.091v4.715zM7.003 8.575a1.546 1.546 0 01-1.548-1.549 1.548 1.548 0 111.547 1.549zm1.336 9.764H5.666V9.75H8.34v8.589zM19.67 3H4.329C3.593 3 3 3.58 3 4.297v15.406C3 20.42 3.594 21 4.328 21h15.338C20.4 21 21 20.42 21 19.703V4.297C21 3.58 20.4 3 19.666 3h.003z" />
</svg>
)
}
export function DiscordIcon(props) {
return (
<svg
style={{ color: '#738ADB' }}
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
fill="currentColor"
class="bi bi-discord"
viewBox="0 0 16 16"
{...props}
>
<path
d="M13.545 2.907a13.227 13.227 0 0 0-3.257-1.011.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.19 12.19 0 0 0-3.658 0 8.258 8.258 0 0 0-.412-.833.051.051 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.041.041 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032c.001.014.01.028.021.037a13.276 13.276 0 0 0 3.995 2.02.05.05 0 0 0 .056-.019c.308-.42.582-.863.818-1.329a.05.05 0 0 0-.01-.059.051.051 0 0 0-.018-.011 8.875 8.875 0 0 1-1.248-.595.05.05 0 0 1-.02-.066.051.051 0 0 1 .015-.019c.084-.063.168-.129.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.052.052 0 0 1 .053.007c.08.066.164.132.248.195a.051.051 0 0 1-.004.085 8.254 8.254 0 0 1-1.249.594.05.05 0 0 0-.03.03.052.052 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019 13.235 13.235 0 0 0 4.001-2.02.049.049 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.034.034 0 0 0-.02-.019Zm-8.198 7.307c-.789 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612Zm5.316 0c-.788 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612Z"
fill="blue"
></path>
</svg>
)
}
================================================
FILE: docs_src/src/components/Testimonials.jsx
================================================
import { useEffect } from 'react'
let testimonials = [
{
body: "Robyn has revolutionized the way I develop web solutions. Its seamless integration of Python's async capabilities with a Rust runtime not only ensures reliability and scalability but also provides quick project setup, a delightful user experience, and robust plugin support. With its exceptional speed and multithreaded efficiency, Robyn's real-time communication through WebSockets and dynamic URL routing has empowered me to create highly performant and interactive applications while maintaining full control over navigation and workflows. A game-changer for modern web development!",
author: {
name: 'Kunal Kushwaha',
handle: 'kunalstwt',
imageUrl: '/testimonials/kunalstwt.jpg',
title: 'DevRel manager at Civo',
},
},
{
body: "Having worked with a company building a Rust based open source search engine for over a year, I strongly believe in the notion that rewriting software with Rust can significantly improve software performance. Sanskar's idea to recreate Flask with Rust, was just incredible. Having used Robyn myself, it is refreshing to see such a performant Python framework and just the amazing developer ecosystem around it. Yes it still new and being developed, but I can say this with confidence that given the underlying Rust-based multithreaded run time will provide immense performance for running high throughout applications. I am glad to be one of the early sponsors and adopters for Robyn!",
author: {
name: 'Shivay Lamba',
handle: 'howdevelop',
imageUrl: '/testimonials/howdevelop.jpg',
title: 'Developer Experience Engineer at MeiliSearch',
},
},
{
body: "I'm impressed with Robyn. It's a fast asynchronous web framework for the Python ecosystem that's built on top of Rust. The syntax is similar to other popular web frameworks, so it's easy to learn and be productive with. I've been using it to build web applications and services, and I'm really happy with the results. I'm also impressed with the Robyn community. They are very supportive and the developers are very responsive to feedback",
author: {
name: 'Carlos A. Marcano Vargas',
handle: 'carlos_marcv',
imageUrl: '/testimonials/carlos_marcv.jpg',
title: 'Technical Writer',
},
},
// More testimonials...
{
body: 'Great to see a Community Driven Open Source project, achieve new heights! Robyn is built by the community for the community',
author: {
name: 'Eddie Jaoude',
handle: 'eddiejaoude',
imageUrl: '/testimonials/eddiejaoude.jpg',
title: 'Creator of EddieHub',
},
},
// More testimonials...
{
body: 'I used to be a Batman fan, but having met Robyn I now think the sidekick has become the hero. Free, OSS, straight forward and powerful, what is not to love?',
author: {
name: 'GrahamTheDev',
handle: 'GrahamTheDev',
imageUrl: '/testimonials/GrahamTheDev.jpg',
title: 'The Accessibility First DevRel ',
},
},
{
body: 'Having used both, Flask and Django for writing web applications in Python in the past, Robyn looks like their combined successor in terms of ergonomics and features available. Its reliance on a Rust runtime for performance and security is the cherry on the cake!',
author: {
name: 'Daniel Bodky',
handle: 'd_bodky',
imageUrl: '/testimonials/d_bodky.jpg',
title: 'Consultant, Trainer, Speaker @NETWAYS',
},
},
// More testimonials...
{
body: 'Robyn has made a big difference in my projects. Its flexible structure allows my work to adapt smoothly to my needs, even when I face complex challenges. The community-driven and open-source nature of Robyn makes it a welcoming place for developers like me. Plus, its simple yet powerful API has greatly streamlined my development process, reducing my wor oad. I highly recommend it!',
author: {
name: 'Julia Furst Morgado',
handle: 'juliafmorgado',
imageUrl: '/testimonials/juliafmorgado.jpg',
title: 'Global technologist @Veeam',
},
},
// More testimonials...
{
body: 'Robyn opens a new chapter in the Python web frameworks scene: the Rust powered one, where performance and safety are not the sole protagonists.',
author: {
name: 'Giovanni Barillari',
handle: 'gi0baro',
imageUrl: '/testimonials/gi0baro.jpeg',
title: 'Author of Granian and Emmett',
},
},
// More testimonials...
{
body: "I collaborate with Robyn's team and I must say, Sanskar does an excellent job maintaining the community. The project as a whole is immensely beneficial, both for collaboration and its practical uses. The tool is impressive, easy to use and the entire community is very welcoming to first-time contributors",
author: {
name: 'Jyoti Bisht',
handle: 'joeyousss',
imageUrl: '/testimonials/joeyousss.jpg',
title: 'Open Source Developer',
},
},
// More testimonials...
{
body: "Robyn is a breath of fresh air in web development. Merging Python's simplicity with Rust's speed, it offers a seamless experience for developers. Its features are precisely what today's web projects need. I'm particularly impressed with its community focus; it's evident that everyone's voice matters in shaping Robyn's journey. In a sea of web frameworks, Robyn stands out not just for its tech but also for its heart.",
author: {
name: 'Francesco Ciulla',
handle: 'FrancescoCiull4',
imageUrl: '/testimonials/FrancescoCiull4.jpg',
title: 'DevRel at daily.dev',
},
},
// More testimonials...
]
//shuflle testimonials
function classNames(...classes) {
return classes.filter(Boolean).join(' ')
}
const chunk = (arr, size) =>
Array.from({ length: Math.ceil(arr.length / size) }, (v, i) =>
arr.slice(i * size, i * size + size)
)
export default function Testimonials() {
let chunkedTestimonials = [];
// Separate testimonials into groups of 3, 4, and 3
const firstGroup = chunk(testimonials.slice(0, 3), 3);
const secondGroup = chunk(testimonials.slice(3, 7), 4);
const thirdGroup = chunk(testimonials.slice(7), 3);
// Concatenate the groups in the desired order
chunkedTestimonials = firstGroup.concat(secondGroup, thirdGroup);
return (
<div className="relative isolate pb-32 pt-24 sm:pt-32">
<div
className="absolute inset-x-0 top-1/2 -z-10 -translate-y-1/2 transform-gpu overflow-hidden opacity-30 blur-3xl"
aria-hidden="true"
>
<div
className="ml-[max(50%,38rem)] aspect-[1313/771] w-[82.0625rem] flex-none origin-top-right rotate-[30deg] bg-yellow-400 xl:mr-[calc(50%-12rem)]"
style={{
clipPath:
'polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)',
}}
/>
</div>
<div
className="absolute inset-x-0 top-0 -z-10 flex transform-gpu overflow-hidden pt-32 opacity-25 blur-3xl sm:pt-40 xl:justify-end"
aria-hidden="true"
>
<div
className="ml-[-22rem] aspect-[1313/771] w-[82.0625rem] flex-none origin-top-right rotate-[30deg] xl:ml-0 xl:mr-[calc(50%-12rem)]"
style={{
clipPath:
'polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)',
}}
/>
</div>
<div className="mx-auto max-w-7xl px-6 lg:px-8">
<div className="mx-auto max-w-xl text-center">
<h2 className="text-lg font-semibold leading-8 tracking-tight text-yellow-400">
Testimonials
</h2>
<p className="mt-2 text-3xl font-bold tracking-tight text-white sm:text-4xl">
Some amazing people have said nice things about us.
</p>
</div>
<div className="mx-auto mt-16 grid max-w-2xl grid-cols-1 grid-rows-1 gap-8 text-sm leading-6 text-gray-900 sm:mt-20 sm:grid-cols-1 xl:mx-0 xl:max-w-none xl:grid-flow-col xl:grid-cols-3">
{chunkedTestimonials.map((columnGroup, columnGroupIdx) => (
<div key={columnGroupIdx} className="space-y-8 ">
{columnGroup.map((testimonial) => (
<figure
key={testimonial.author.handle}
className="rounded-2xl bg-white/5 p-6 shadow-lg ring-1 ring-gray-900/5 duration-200 hover:bg-white/10"
>
<blockquote className="text-white">
<p>{`"${testimonial.body}"`}</p>
</blockquote>
<figcaption className="mt-6 flex items-center gap-x-4">
<img
className="h-10 w-10 rounded-full bg-gray-50"
src={testimonial.author.imageUrl}
alt=""
/>
<div>
<div className="font-semibold text-white">
{testimonial.author.name}
</div>
<div className="text-yellow-400">{`@${testimonial.author.handle}`}</div>
<div className="font-normal text-white">
{testimonial.author.title}
</div>
</div>
</figcaption>
</figure>
))}
</div>
))}
</div>
</div>
</div>
)
}
================================================
FILE: docs_src/src/components/documentation/ApiDocs.jsx
================================================
import { Button } from '@/components/documentation/Button'
import { Heading } from '@/components/documentation/Heading'
const guides = [
{
href: '/documentation/en/api_reference',
name: 'Installation',
description: 'Start using Robyn in your project.',
},
{
href: '/documentation/en/api_reference/getting_started',
name: 'Getting Started',
description: 'Start with creating basic routes in Robyn.',
},
{
href: '/documentation/en/api_reference/request_object',
name: 'The Request Object',
description: 'Learn about the Request Object in Robyn.',
},
{
href: '/documentation/en/api_reference/robyn_env',
name: 'The Robyn Env file',
description: 'Learn about the Robyn variables',
},
{
href: '/documentation/en/api_reference/middlewares',
name: 'Middlewares, Events and Websockets',
description: 'Learn about Middlewares, Events and Websockets in Robyn.',
},
{
href: '/documentation/en/api_reference/authentication',
name: 'Authentication',
description: 'Learn about Authentication in Robyn.',
},
{
href: '/documentation/en/api_reference/const_requests',
name: 'Const Requests and Multi Core Scaling',
description: 'Learn about Const Requests and Multi Core Scaling in Robyn.',
},
{
href: '/documentation/en/api_reference/cors',
name: 'CORS',
description: 'CORS',
},
{
href: '/documentation/en/api_reference/templating',
name: 'Templating',
description: 'Learn about Templating in Robyn.',
},
{
href: '/documentation/en/api_reference/redirection',
name: 'Redirection',
description: 'Learn how to redirect requests to different endpoints.',
},
{
href: '/documentation/en/api_reference/file-uploads',
name: 'File Uploads',
description:
'Learn how to upload and download files to your server using Robyn.',
},
{
href: '/documentation/en/api_reference/form_data',
name: 'Form Data and Multi Part Form Data',
description: 'Learn how to handle form data.',
},
{
href: '/documentation/en/api_reference/websockets',
name: 'Websockets',
description: 'Learn how to use Websockets in Robyn.',
},
{
href: '/documentation/en/api_reference/server_sent_events',
name: 'Server-Sent Events',
description: 'Learn how to implement Server-Sent Events for real-time communication.',
},
{
href: '/documentation/en/api_reference/exceptions',
name: 'Exceptions',
description: 'Learn how to handle exceptions in Robyn.',
},
{
href: '/documentation/en/api_reference/scaling',
name: 'Scaling the Application',
description: 'Learn how to scaled Robyn across multiple cores.',
},
{
href: '/documentation/en/api_reference/advanced_features',
name: 'Advanced Features',
description: 'Learn about advanced features in Robyn.',
},
{
href: '/documentation/en/api_reference/multiprocess_execution',
name: 'Multiprocess Execution',
description: 'Learn about the behaviour or variables during multithreading',
},
{
href: '/documentation/en/api_reference/using_rust_directly',
name: 'Direct Rust Usage',
description: 'Learn about directly using Rust in Robyn.',
},
{
href: '/documentation/en/api_reference/graphql-support',
name: 'GraphQL Support',
description: 'Learn about GraphQL Support in Robyn.',
},
{
href: '/documentation/en/api_reference/openapi',
name: 'OpenAPI Documentation',
description: 'Learn how to generate OpenAPI docs for your applications.',
},
{
href: '/documentation/en/api_reference/dependency_injection',
name: 'Dependency Injection',
description: 'Learn about Dependency Injection in Robyn.',
},
]
export function ApiDocs() {
return (
<div className="my-16 xl:max-w-none">
<Heading level={2} id="api_docs">
<h3 className="text-white">Api Docs</h3>
</Heading>
<div className="not-prose mt-4 grid grid-cols-1 gap-8 border-t border-white/5 pt-10 sm:grid-cols-2 xl:grid-cols-4">
{guides.map((guide) => (
<div key={guide.href}>
<h3 className="text-sm font-semibold text-white">{guide.name}</h3>
<p className="mt-1 text-sm text-zinc-400">{guide.description}</p>
<p className="mt-4">
<Button href={guide.href} variant="text" arrow="right">
Read more
</Button>
</p>
</div>
))}
</div>
</div>
)
}
================================================
FILE: docs_src/src/components/documentation/BottomNavbar.jsx
================================================
import { forwardRef } from 'react'
import Link from 'next/link'
import clsx from 'clsx'
import { motion, useScroll, useTransform } from 'framer-motion'
import { MobileNavigation } from '@/components/documentation/MobileNavigation'
import { useMobileNavigationStore } from '@/components/documentation/MobileNavigation'
import { MobileSearch, Search } from '@/components/documentation/Search'
export const BottomNavbar = forwardRef(function Header({ className }, ref) {
let { scrollY } = useScroll()
let bgOpacityLight = useTransform(scrollY, [0, 72], [0.5, 0.9])
let bgOpacityDark = useTransform(scrollY, [0, 72], [0.2, 0.8])
return (
<>
<motion.div
ref={ref}
className={clsx(
className,
'fixed inset-x-0 bottom-0 z-50 flex h-14 max-w-fit items-center justify-between gap-12 px-4 transition sm:px-6 lg:left-72 lg:z-30 lg:px-8 xl:left-80'
)}
style={{
'--bg-opacity-light': bgOpacityLight,
'--bg-opacity-dark': bgOpacityDark,
}}
>
<div className="flex items-center gap-5 lg:hidden">
<MobileNavigation />
</div>
</motion.div>
</>
)
})
================================================
FILE: docs_src/src/components/documentation/Button.jsx
================================================
import Link from 'next/link'
import clsx from 'clsx'
function ArrowIcon(props) {
return (
<svg viewBox="0 0 20 20" fill="none" aria-hidden="true" {...props}>
<path
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
d="m11.5 6.5 3 3.5m0 0-3 3.5m3-3.5h-9"
/>
</svg>
)
}
const variantStyles = {
primary:
'rounded-full py-1 px-3 bg-orange-400/10 text-orange-400 ring-1 ring-inset ring-orange-400/20 hover:bg-orange-400/10 hover:text-orange-300 hover:ring-orange-300',
secondary:
'rounded-full py-1 px-3 bg-zinc-800/40 text-zinc-400 ring-1 ring-inset ring-zinc-800 hover:bg-zinc-800 hover:text-zinc-300',
filled: 'rounded-full py-1 px-3 bg-orange-500 text-white hover:bg-orange-400',
outline:
'rounded-full py-1 px-3 ring-1 ring-inset text-zinc-400 ring-white/10 hover:bg-white/5 hover:text-white',
text: 'text-orange-400 hover:text-orange-500',
}
export function Button({
variant = 'primary',
className,
children,
arrow,
...props
}) {
let Component = props.href ? Link : 'button'
className = clsx(
'inline-flex gap-0.5 justify-center overflow-hidden text-sm font-medium transition',
variantStyles[variant],
className
)
let arrowIcon = (
<ArrowIcon
className={clsx(
'mt-0.5 h-5 w-5',
variant === 'text' && 'relative top-px',
arrow === 'left' && '-ml-1 rotate-180',
arrow === 'right' && '-mr-1'
)}
/>
)
return (
<Component className={className} {...props}>
{arrow === 'left' && arrowIcon}
{children}
{arrow === 'right' && arrowIcon}
</Component>
)
}
================================================
FILE: docs_src/src/components/documentation/Code.jsx
================================================
import {
Children,
createContext,
useContext,
useEffect,
useRef,
useState,
} from 'react'
import { Tab } from '@headlessui/react'
import clsx from 'clsx'
import { create } from 'zustand'
import { Tag } from '@/components/documentation/Tag'
const languageNames = {
js: 'JavaScript',
ts: 'TypeScript',
javascript: 'JavaScript',
typescript: 'TypeScript',
php: 'PHP',
python: 'Python',
ruby: 'Ruby',
go: 'Go',
}
function getPanelTitle({ title, language }) {
return title ?? languageNames[language] ?? 'Code'
}
function ClipboardIcon(props) {
return (
<svg viewBox="0 0 20 20" aria-hidden="true" {...props}>
<path
strokeWidth="0"
d="M5.5 13.5v-5a2 2 0 0 1 2-2l.447-.894A2 2 0 0 1 9.737 4.5h.527a2 2 0 0 1 1.789 1.106l.447.894a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2Z"
/>
<path
fill="none"
strokeLinejoin="round"
d="M12.5 6.5a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2m5 0-.447-.894a2 2 0 0 0-1.79-1.106h-.527a2 2 0 0 0-1.789 1.106L7.5 6.5m5 0-1 1h-3l-1-1"
/>
</svg>
)
}
function CopyButton({ code }) {
let [copyCount, setCopyCount] = useState(0)
let copied = copyCount > 0
useEffect(() => {
if (copyCount > 0) {
let timeout = setTimeout(() => setCopyCount(0), 1000)
return () => {
clearTimeout(timeout)
}
}
}, [copyCount])
return (
<button
type="button"
className={clsx(
'group/button text-2xs absolute right-4 top-3.5 overflow-hidden rounded-full py-1 pl-2 pr-3 font-medium opacity-0 backdrop-blur transition focus:opacity-100 group-hover:opacity-100',
copied
? 'bg-orange-400/10 ring-1 ring-inset ring-orange-400/20'
: 'bg-white/2.5 hover:bg-white/5'
)}
onClick={() => {
window.navigator.clipboard.writeText(code).then(() => {
setCopyCount((count) => count + 1)
})
}}
>
<span
aria-hidden={copied}
className={clsx(
'pointer-events-none flex items-center gap-0.5 text-zinc-400 transition duration-300',
copied && '-translate-y-1.5 opacity-0'
)}
>
<ClipboardIcon className="h-5 w-5 fill-zinc-500/20 stroke-zinc-500 transition-colors group-hover/button:stroke-zinc-400" />
Copy
</span>
<span
aria-hidden={!copied}
className={clsx(
'pointer-events-none absolute inset-0 flex items-center justify-center text-orange-400 transition duration-300',
!copied && 'translate-y-1.5 opacity-0'
)}
>
Copied!
</span>
</button>
)
}
function CodePanelHeader({ tag, label }) {
if (!tag && !label) {
return null
}
return (
<div className="border-b-white/7.5 bg-white/1 flex h-9 items-center gap-2 border-y border-b-white/5 border-t-transparent bg-zinc-900 px-4">
{tag && (
<div className="dark flex">
<Tag variant="small">{tag}</Tag>
</div>
)}
{tag && label && (
<span className="h-0.5 w-0.5 rounded-full bg-zinc-500" />
)}
{label && (
<span className="font-mono text-xs text-zinc-400">{label}</span>
)}
</div>
)
}
function CodePanel({ tag, label, code, children }) {
let child = Children.only(children)
return (
<div className="bg-white/2.5 group">
<CodePanelHeader
tag={child.props.tag ?? tag}
label={child.props.label ?? label}
/>
<div className="relative">
<pre className="overflow-x-auto p-4 text-xs text-white">{children}</pre>
<CopyButton code={child.props.code ?? code} />
</div>
</div>
)
}
function CodeGroupHeader({ title, children, selectedIndex }) {
let hasTabs = Children.count(children) > 1
if (!title && !hasTabs) {
return null
}
return (
<div className="flex min-h-[calc(theme(spacing.12)+1px)] flex-wrap items-start gap-x-4 border-b border-zinc-800 bg-transparent bg-zinc-800 px-4">
{title && (
<h3 className="mr-auto pt-3 text-xs font-semibold text-white">
{title}
</h3>
)}
{hasTabs && (
<Tab.List className="-mb-px flex gap-4 text-xs font-medium">
{Children.map(children, (child, childIndex) => (
<Tab
className={clsx(
'border-b py-3 transition focus:[&:not(:focus-visible)]:outline-none',
childIndex === selectedIndex
? 'border-orange-500 text-orange-400'
: 'border-transparent text-zinc-400 hover:text-zinc-300'
)}
>
{getPanelTitle(child.props)}
</Tab>
))}
</Tab.List>
)}
</div>
)
}
function CodeGroupPanels({ children, ...props }) {
let hasTabs = Children.count(children) > 1
if (hasTabs) {
return (
<Tab.Panels>
{Children.map(children, (child) => (
<Tab.Panel>
<CodePanel {...props}>{child}</CodePanel>
</Tab.Panel>
))}
</Tab.Panels>
)
}
return <CodePanel {...props}>{children}</CodePanel>
}
function usePreventLayoutShift() {
let positionRef = useRef()
let rafRef = useRef()
useEffect(() => {
return () => {
window.cancelAnimationFrame(rafRef.current)
}
}, [])
return {
positionRef,
preventLayoutShift(callback) {
let initialTop = positionRef.current.getBoundingClientRect().top
callback()
rafRef.current = window.requestAnimationFrame(() => {
let newTop = positionRef.current.getBoundingClientRect().top
window.scrollBy(0, newTop - initialTop)
})
},
}
}
const usePreferredLanguageStore = create((set) => ({
preferredLanguages: [],
addPreferredLanguage: (language) =>
set((state) => ({
preferredLanguages: [
...state.preferredLanguages.filter(
(preferredLanguage) => preferredLanguage !== language
),
language,
],
})),
}))
function useTabGroupProps(availableLanguages) {
let { preferredLanguages, addPreferredLanguage } = usePreferredLanguageStore()
let [selectedIndex, setSelectedIndex] = useState(0)
let activeLanguage = [...availableLanguages].sort(
(a, z) => preferredLanguages.indexOf(z) - preferredLanguages.indexOf(a)
)[0]
let languageIndex = availableLanguages.indexOf(activeLanguage)
let newSelectedIndex = languageIndex === -1 ? selectedIndex : languageIndex
if (newSelectedIndex !== selectedIndex) {
setSelectedIndex(newSelectedIndex)
}
let { positionRef, preventLayoutShift } = usePreventLayoutShift()
return {
as: 'div',
ref: positionRef,
selectedIndex,
onChange: (newSelectedIndex) => {
preventLayoutShift(() =>
addPreferredLanguage(availableLanguages[newSelectedIndex])
)
},
}
}
const CodeGroupContext = createContext(false)
export function CodeGroup({ children, title, ...props }) {
let languages = Children.map(children, (child) => getPanelTitle(child.props))
let tabGroupProps = useTabGroupProps(languages)
let hasTabs = Children.count(children) > 1
let Container = hasTabs ? Tab.Group : 'div'
let containerProps = hasTabs ? tabGroupProps : {}
let headerProps = hasTabs
? { selectedIndex: tabGroupProps.selectedIndex }
: {}
return (
<CodeGroupContext.Provider value={true}>
<Container
{...containerProps}
className="not-prose my-6 overflow-hidden rounded-2xl bg-zinc-900 shadow-md ring-1 ring-white/10"
>
<CodeGroupHeader title={title} {...headerProps}>
{children}
</CodeGroupHeader>
<CodeGroupPanels {...props}>{children}</CodeGroupPanels>
</Container>
</CodeGroupContext.Provider>
)
}
export function Code({ children, ...props }) {
let isGrouped = useContext(CodeGroupContext)
if (isGrouped) {
return (
<code
className="text-white"
{...props}
dangerouslySetInnerHTML={{ __html: children }}
/>
)
}
return (
<code className="text-white" {...props}>
{children}
</code>
)
}
export function Pre({ children, ...props }) {
let isGrouped = useContext(CodeGroupContext)
if (isGrouped) {
return children
}
return <CodeGroup {...props}>{children}</CodeGroup>
}
================================================
FILE: docs_src/src/components/documentation/Guides.jsx
================================================
import { Button } from '@/components/documentation/Button'
import { Heading } from '@/components/documentation/Heading'
const guides = [
{
href: '/documentation/en/example_app',
name: 'Getting Started',
description: 'Learn how to authenticate your API requests.',
},
{
href: '/documentation/en/example_app/authentication',
name: 'Authentication and Authorization',
description: 'Understand how to use authentication and authorization.',
},
{
href: '/documentation/en/example_app/authentication-middlewares',
name: 'Middlewares',
description:
'Read about different kinds of Middlewares and how to use them.',
},
{
href: '/documentation/en/example_app/monitoring_and_logging',
name: 'Monitoring and Logging',
description: 'Learn how to have montoring and logging in Robyn.',
},
{
href: '/documentation/en/example_app/real_time_notifications',
name: 'Real Time Notifications',
description: 'Learn how to have real time notification in Robyn.',
},
{
href: '/documentation/en/example_app/deployment',
name: 'Deployments',
description:
'Learn how to deploy your app to production and manage your deployments.',
},
{
href: '/documentation/en/example_app/openapi',
name: 'OpenAPI Documentation',
description: 'Learn how OpenAPI docs are generate for your applications.',
},
]
export function Guides() {
return (
<div className="my-16 xl:max-w-none">
<Heading level={2} id="guides">
<h3 className="text-white">Example Application</h3>
</Heading>
<div className="not-prose mt-4 grid grid-cols-1 gap-8 border-t border-white/5 pt-10 sm:grid-cols-2 xl:grid-cols-4">
{guides.map((guide) => (
<div key={guide.href}>
<h3 className="text-sm font-semibold text-white">{guide.name}</h3>
<p className="mt-1 text-sm text-zinc-400">{guide.description}</p>
<p className="mt-4">
<Button href={guide.href} variant="text" arrow="right">
Read more
</Button>
</p>
</div>
))}
</div>
</div>
)
}
================================================
FILE: docs_src/src/components/documentation/Heading.jsx
================================================
import { useEffect, useRef } from 'react'
import Link from 'next/link'
import { useInView } from 'framer-motion'
import { useSectionStore } from '@/components/documentation/SectionProvider'
import { Tag } from '@/components/documentation/Tag'
import { remToPx } from '@/lib/remToPx'
function AnchorIcon(props) {
return (
<svg
viewBox="0 0 20 20"
fill="none"
strokeLinecap="round"
aria-hidden="true"
{...props}
>
<path d="m6.5 11.5-.964-.964a3.535 3.535 0 1 1 5-5l.964.964m2 2 .964.964a3.536 3.536 0 0 1-5 5L8.5 13.5m0-5 3 3" />
</svg>
)
}
function Eyebrow({ tag, label }) {
if (!tag && !label) {
return null
}
return (
<div className="flex items-center gap-x-3">
{tag && <Tag>{tag}</Tag>}
{tag && label && (
<span className="h-0.5 w-0.5 rounded-full bg-zinc-600" />
)}
{label && (
<span className="font-mono text-xs text-zinc-400">{label}</span>
)}
</div>
)
}
function Anchor({ id, inView, children }) {
return (
<Link
href={`#${id}`}
className="group text-inherit no-underline hover:text-inherit"
>
{inView && (
<div className="absolute ml-[calc(-1*var(--width))] mt-1 hidden w-[var(--width)] opacity-0 transition [--width:calc(2.625rem+0.5px+50%-min(50%,calc(theme(maxWidth.lg)+theme(spacing.8))))] group-hover:opacity-100 group-focus:opacity-100 md:block lg:z-50 2xl:[--width:theme(spacing.10)]">
<div className="group/anchor block h-5 w-5 rounded-lg bg-zinc-800 ring-1 ring-inset ring-zinc-700 transition hover:bg-zinc-700 hover:ring-zinc-600">
<AnchorIcon className="h-5 w-5 stroke-zinc-400 transition group-hover/anchor:stroke-white" />
</div>
</div>
)}
{children}
</Link>
)
}
export function Heading({
level = 2,
children,
id,
tag,
label,
anchor = true,
...props
}) {
let Component = `h${level}`
let ref = useRef()
let registerHeading = useSectionStore((s) => s.registerHeading)
let inView = useInView(ref, {
margin: `${remToPx(-3.5)}px 0px 0px 0px`,
amount: 'all',
})
useEffect(() => {
if (level === 2) {
registerHeading({ id, ref, offsetRem: tag || label ? 8 : 6 })
}
})
return (
<>
<Eyebrow tag={tag} label={label} />
<Component
ref={ref}
id={anchor ? id : undefined}
className={tag || label ? 'mt-2 scroll-mt-32' : 'scroll-mt-24'}
{...props}
>
{anchor ? (
<Anchor id={id} inView={inView}>
{children}
</Anchor>
) : (
children
)}
</Component>
</>
)
}
================================================
FILE: docs_src/src/components/documentation/HeroPattern.jsx
================================================
export function HeroPattern() {
return (
<div className="absolute inset-0 -z-10 mx-0 max-w-none overflow-hidden">
<div
className="absolute inset-x-0 top-4 -z-10 flex transform-gpu justify-center overflow-hidden blur-3xl"
aria-hidden="true"
>
<div
className="aspect-[1108/632] w-[69.25rem] flex-none bg-gradient-to-r from-orange-800 to-yellow-500 opacity-40"
style={{
clipPath:
'polygon(73.6% 51.7%, 91.7% 11.8%, 100% 46.4%, 97.4% 82.2%, 92.5% 84.9%, 75.7% 64%, 55.3% 47.5%, 46.5% 49.4%, 45% 62.9%, 50.3% 87.2%, 21.3% 64.1%, 0.1% 100%, 5.4% 51.1%, 21.4% 63.9%, 58.9% 0.2%, 73.6% 51.7%)',
}}
/>
</div>
</div>
)
}
================================================
FILE: docs_src/src/components/documentation/LanguageSelector.jsx
================================================
import { useRouter } from 'next/router'
import { Menu } from '@headlessui/react'
import { motion } from 'framer-motion'
const languages = [
{ code: 'en', name: 'English' },
{ code: 'zh', name: '中文' },
]
function LanguageSelector() {
const router = useRouter()
const { pathname, asPath, query } = router
const currentLanguage = asPath.includes('/zh') ? 'zh' : 'en'
const changeLanguage = (locale) => {
const currentPath = asPath.split('?')[0]
if (currentPath === '/documentation' || currentPath === '/documentation/') {
router.push(`/documentation/${locale}`)
return
}
const newPath = currentPath.replace(
/\/documentation\/(en|zh)/,
`/documentation/${locale}`
)
router.push(newPath)
}
return (
<Menu as="div" className="relative">
<Menu.Button className="flex items-center gap-2 rounded-lg bg-zinc-800/40 px-3 py-2 text-sm text-white hover:bg-zinc-800 transition-colors duration-200">
{languages.find(l => l.code === currentLanguage)?.name}
<svg
width="8"
height="5"
className="ml-1 stroke-current"
fill="none"
viewBox="0 0 8 5"
>
<path d="M1 1L4 4L7 1" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
</svg>
</Menu.Button>
<Menu.Items as={motion.div}
initial={{ y: -10 }}
animate={{ y: 0 }}
exit={{ y: -10 }}
className="absolute left-0 mt-1 w-40 origin-top-left rounded-lg bg-[#27272A] ring-1 ring-zinc-700 shadow-xl z-50"
>
{languages.map((language) => (
<Menu.Item key={language.code}>
{({ active }) => (
<button
onClick={() => changeLanguage(language.code)}
className={`${
active ? 'bg-zinc-700/50' : ''
} ${
currentLanguage === language.code ? 'bg-orange-500/10 text-orange-500' : 'text-zinc-100'
} group flex w-full items-center gap-2 rounded-md px-3 py-2.5 text-sm transition-colors duration-200`}
>
{language.name}
</button>
)}
</Menu.Item>
))}
</Menu.Items>
</Menu>
)
}
export default LanguageSelector
================================================
FILE: docs_src/src/components/documentation/Layout.jsx
================================================
import { motion } from 'framer-motion'
import { Footer } from '@/components/Footer'
import { BottomNavbar } from '@/components/documentation/BottomNavbar'
import { Navigation } from '@/components/documentation/Navigation'
import { Prose } from '@/components/documentation/Prose'
import { SectionProvider } from '@/components/documentation/SectionProvider'
export function Layout({ children, sections = [] }) {
return (
<SectionProvider sections={sections}>
<div className="lg:ml-72 xl:ml-80">
<motion.header
layoutScroll
className="contents lg:pointer-events-none lg:fixed lg:inset-0 lg:z-40 lg:flex"
>
<div className="contents lg:pointer-events-auto lg:block lg:w-72 lg:overflow-y-auto lg:border-white/10 lg:px-6 lg:pb-8 xl:w-80">
<BottomNavbar />
<Navigation className="hidden lg:mt-32 lg:block" />
</div>
</motion.header>
<div className="relative px-4 sm:px-6 lg:px-8">
<main className="py-16">
<Prose>{children}</Prose>
</main>
<Footer />
</div>
</div>
</SectionProvider>
)
}
================================================
FILE: docs_src/src/components/documentation/Libraries.jsx
================================================
import Image from 'next/image'
import { Button } from '@/components/documentation/Button'
import { Heading } from '@/components/documentation/Heading'
const libraries = [
{
href: '#',
name: 'PHP',
description:
'A popular general-purpose scripting language that is especially suited to web development.',
},
{
href: '#',
name: 'Ruby',
description:
'A dynamic, open source programming language with a focus on simplicity and productivity.',
},
{
href: '#',
name: 'Node.js',
description:
'Node.js® is an open-source, cross-platform JavaScript runtime environment.',
},
{
href: '#',
name: 'Python',
description:
'Python is a programming language that lets you work quickly and integrate systems more effectively.',
},
{
href: '#',
name: 'Go',
description:
'An open-source programming language supported by Google with built-in concurrency.',
},
]
export function Libraries() {
return (
<div className="my-16 xl:max-w-none">
<Heading level={2} id="official-libraries">
Official libraries
</Heading>
<div className="not-prose mt-4 grid grid-cols-1 gap-x-6 gap-y-10 border-t border-white/5 pt-10 sm:grid-cols-2 xl:max-w-none xl:grid-cols-3">
{libraries.map((library) => (
<div key={library.name} className="flex flex-row-reverse gap-6">
<div className="flex-auto">
<h3 className="text-sm font-semibold text-white">
{library.name}
</h3>
<p className="mt-1 text-sm text-zinc-400">
{library.description}
</p>
<p className="mt-4">
<Button href={library.href} variant="text" arrow="right">
Read more
</Button>
</p>
</div>
<Image
src={library.logo}
alt=""
className="h-12 w-12"
unoptimized
/>
</div>
))}
</div>
</div>
)
}
================================================
FILE: docs_src/src/components/documentation/MobileNavigation.jsx
================================================
import { createContext, Fragment, useContext } from 'react'
import { Dialog, Transition } from '@headlessui/react'
import { motion } from 'framer-motion'
import { create } from 'zustand'
import { BottomNavbar } from '@/components/documentation/BottomNavbar'
import { Navigation } from '@/components/documentation/Navigation'
function MenuIcon(props) {
return (
<button
type="button"
aria-label="Toggle dark mode"
className="group rounded-full bg-zinc-800/90 px-3 py-2 shadow-lg shadow-zinc-800/5 ring-1 ring-white/10 backdrop-blur transition hover:ring-white/20"
>
<svg
viewBox="0 0 10 9"
fill="none"
strokeLinecap="round"
aria-hidden="true"
{...props}
>
<path d="M.5 1h9M.5 8h9M.5 4.5h9" />
</svg>
</button>
)
}
function XIcon(props) {
return (
<svg
viewBox="0 0 10 9"
fill="none"
strokeLinecap="round"
aria-hidden="true"
{...props}
>
<path d="m1.5 1 7 7M8.5 1l-7 7" />
</svg>
)
}
const IsInsideMobileNavigationContext = createContext(false)
export function useIsInsideMobileNavigation() {
return useContext(IsInsideMobileNavigationContext)
}
export const useMobileNavigationStore = create((set) => ({
isOpen: false,
open: () => set({ isOpen: true }),
close: () => set({ isOpen: false }),
toggle: () => set((state) => ({ isOpen: !state.isOpen })),
}))
export function MobileNavigation() {
let isInsideMobileNavigation = useIsInsideMobileNavigation()
let { isOpen, toggle, close } = useMobileNavigationStore()
let ToggleIcon = isOpen ? XIcon : MenuIcon
return (
<IsInsideMobileNavigationContext.Provider value={true}>
<button
type="button"
className="flex h-6 w-6 items-center justify-center rounded-md transition hover:bg-white/5"
aria-label="Toggle navigation"
onClick={toggle}
>
<ToggleIcon className="w-2.5 stroke-white" />
</button>
{!isInsideMobileNavigation && (
<Transition.Root show={isOpen} as={Fragment}>
<Dialog onClose={close} className="fixed inset-0 z-50 lg:hidden">
<Transition.Child
as={Fragment}
enter="duration-300 ease-out"
enterFrom="opacity-0"
enterTo="opacity-100"
leave="duration-200 ease-in"
leaveFrom="opacity-100"
leaveTo="opacity-0"
>
<div className="fixed inset-0 top-0 bg-black/40 backdrop-blur-sm" />
</Transition.Child>
<Dialog.Panel>
<Transition.Child
as={Fragment}
enter="duration-300 ease-out"
enterFrom="opacity-0"
enterTo="opacity-100"
leave="duration-200 ease-in"
leaveFrom="opacity-100"
leaveTo="opacity-0"
>
<BottomNavbar />
</Transition.Child>
<Transition.Child
as={Fragment}
enter="duration-500 ease-in-out"
enterFrom="-translate-x-full"
enterTo="translate-x-0"
leave="duration-500 ease-in-out"
leaveFrom="translate-x-0"
leaveTo="-translate-x-full"
>
<motion.div
layoutScroll
className="ring-zinc-900/7.5 fixed bottom-0 left-0 top-0 w-full overflow-y-auto bg-black px-4 pb-4 pt-6 shadow-lg shadow-zinc-900/10 ring-1 ring-black min-[416px]:max-w-sm sm:px-6 sm:pb-10"
>
<Navigation />
</motion.div>
</Transition.Child>
</Dialog.Panel>
</Dialog>
</Transition.Root>
)}
</IsInsideMobileNavigationContext.Provider>
)
}
================================================
FILE: docs_src/src/components/documentation/ModeToggle.jsx
================================================
function SunIcon(props) {
return (
<svg viewBox="0 0 20 20" fill="none" aria-hidden="true" {...props}>
<path d="M12.5 10a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z" />
<path
strokeLinecap="round"
d="M10 5.5v-1M13.182 6.818l.707-.707M14.5 10h1M13.182 13.182l.707.707M10 15.5v-1M6.11 13.889l.708-.707M4.5 10h1M6.11 6.111l.708.707"
/>
</svg>
)
}
function MoonIcon(props) {
return (
<svg viewBox="0 0 20 20" fill="none" aria-hidden="true" {...props}>
<path d="M15.224 11.724a5.5 5.5 0 0 1-6.949-6.949 5.5 5.5 0 1 0 6.949 6.949Z" />
</svg>
)
}
================================================
FILE: docs_src/src/components/documentation/Navigation.jsx
================================================
import { useRef } from 'react'
import Link from 'next/link'
import { useRouter } from 'next/router'
import clsx from 'clsx'
import { AnimatePresence, motion, useIsPresent } from 'framer-motion'
import { useIsInsideMobileNavigation } from '@/components/documentation/MobileNavigation'
import { useSectionStore } from '@/components/documentation/SectionProvider'
import { Tag } from '@/components/documentation/Tag'
import LanguageSelector from '@/components/documentation/LanguageSelector'
import { remToPx } from '@/lib/remToPx'
function useInitialValue(value, condition = true) {
let initialValue = useRef(value).current
return condition ? initialValue : value
}
function TopLevelNavItem({ href, children }) {
return (
<li className="md:hidden">
<Link
href={href}
className="block py-1 text-sm text-zinc-400 transition hover:text-white"
>
{children}
</Link>
</li>
)
}
function NavLink({ href, tag, active, isAnchorLink = false, children }) {
return (
<Link
href={href}
aria-current={active ? 'page' : undefined}
className={clsx(
'flex justify-between gap-2 py-1 pr-3 text-sm transition',
isAnchorLink ? 'pl-7' : 'pl-4',
active ? 'text-white' : 'text-zinc-400 hover:text-white'
)}
>
<span className="truncate">{children}</span>
{tag && (
<Tag variant="small" color="zinc">
{tag}
</Tag>
)}
</Link>
)
}
function VisibleSectionHighlight({ group, pathname }) {
let [sections, visibleSections] = useInitialValue(
[
useSectionStore((s) => s.sections),
useSectionStore((s) => s.visibleSections),
],
useIsInsideMobileNavigation()
)
let isPresent = useIsPresent()
let firstVisibleSectionIndex = Math.max(
0,
[{ id: '_top' }, ...sections].findIndex(
(section) => section.id === visibleSections[0]
)
)
let itemHeight = remToPx(2)
let height = isPresent
? Math.max(1, visibleSections.length) * itemHeight
: itemHeight
let top =
group.links.findIndex((link) => link.href === pathname) * itemHeight +
firstVisibleSectionIndex * itemHeight
return (
<motion.div
layout
initial={{ opacity: 0 }}
animate={{ opacity: 1, transition: { delay: 0.2 } }}
exit={{ opacity: 0 }}
className="bg-white/2.5 absolute inset-x-0 top-0 will-change-transform"
style={{ borderRadius: 8, height, top }}
/>
)
}
function ActivePageMarker({ group, pathname }) {
let itemHeight = remToPx(2)
let offset = remToPx(0.25)
let activePageIndex = group.links.findIndex((link) => link.href === pathname)
let top = offset + activePageIndex * itemHeight
return (
<motion.div
layout
className="absolute left-2 h-6 w-px bg-orange-500"
initial={{ opacity: 0 }}
animate={{ opacity: 1, transition: { delay: 0.2 } }}
exit={{ opacity: 0 }}
style={{ top }}
/>
)
}
function NavigationGroup({ group, className }) {
// If this is the mobile navigation then we always render the initial
// state, so that the state does not change during the close animation.
// The state will still update when we re-open (re-render) the navigation.
let isInsideMobileNavigation = useIsInsideMobileNavigation()
let [router, sections] = useInitialValue(
[useRouter(), useSectionStore((s) => s.sections)],
isInsideMobileNavigation
)
let isActiveGroup =
group.links.findIndex((link) => link.href === router.pathname) !== -1
return (
<li className={clsx('relative mt-6', className)}>
<motion.h2 layout="position" className="text-xs font-semibold text-white">
{group.title}
</motion.h2>
<div className="relative mt-3 pl-2">
<AnimatePresence initial={!isInsideMobileNavigation}>
{isActiveGroup && (
<VisibleSectionHighlight group={group} pathname={router.pathname} />
)}
</AnimatePresence>
<motion.div
layout
className="absolute inset-y-0 left-2 w-px bg-white/5"
/>
<AnimatePresence initial={false}>
{isActiveGroup && (
<ActivePageMarker group={group} pathname={router.pathname} />
)}
</AnimatePresence>
<ul role="list" className="border-l border-transparent">
{group.links.map((link) => (
<motion.li key={link.href} layout="position" className="relative">
<NavLink href={link.href} active={link.href === router.pathname}>
{link.title}
</NavLink>
<AnimatePresence mode="popLayout" initial={false}>
{link.href === router.pathname && sections.length > 0 && (
<motion.ul
role="list"
initial={{ opacity: 0 }}
animate={{
opacity: 1,
transition: { delay: 0.1 },
}}
exit={{
opacity: 0,
transition: { duration: 0.15 },
}}
>
{sections.map((section) => (
<li key={section.id}>
<NavLink
href={`${link.href}#${section.id}`}
tag={section.tag}
isAnchorLink
>
{section.title}
</NavLink>
</li>
))}
</motion.ul>
)}
</AnimatePresence>
</motion.li>
))}
</ul>
</div>
</li>
)
}
export const navigation = [
{
title: 'Documentation',
links: [{ title: 'Introduction', href: '/documentation' }],
},
{
title: 'Example Application',
links: [
{ title: 'Getting Started', href: '/documentation/en/example_app' },
{
title: 'Modeling Routes',
href: '/documentation/en/example_app/modeling_routes',
},
{
title: 'Authentication and Authorization',
href: '/documentation/en/example_app/authentication',
},
{
title: 'Middlewares',
href: '/documentation/en/example_app/authentication-middlewares',
},
{
title: 'Real Time Notifications',
href: '/documentation/en/example_app/real_time_notifications',
},
{
title: 'Monitoring and Logging',
href: '/documentation/en/example_app/monitoring_and_logging',
},
{ title: 'Deployment', href: '/documentation/en/example_app/deployment' },
{
title: 'OpenAPI Documentation',
href: '/documentation/en/example_app/openapi',
},
{ title: 'Templates', href: '/documentation/en/example_app/templates' },
{
title: 'SubRouters',
href: '/documentation/en/example_app/subrouters',
},
],
},
{
title: 'API Reference',
links: [
{
href: '/documentation/en/api_reference/',
title: 'Installation',
},
{
href: '/documentation/en/api_reference/getting_started',
title: 'Getting Started',
},
{
href: '/documentation/en/api_reference/request_object',
title: 'The Request Object',
},
{
href: '/documentation/en/api_reference/robyn_env',
title: 'The Robyn Env file',
},
{
href: '/documentation/en/api_reference/middlewares',
title: 'Middlewares, Events and Websockets',
},
{
href: '/documentation/en/api_reference/authentication',
title: 'Authentication',
},
{
href: '/documentation/en/api_reference/const_requests',
title: 'Const Requests and Multi Core Scaling',
},
{
href: '/documentation/en/api_reference/cors',
title: 'CORS',
},
{
href: '/documentation/en/api_reference/templating',
title: 'Templating',
},
{
title: 'Redirection',
href: '/documentation/en/api_reference/redirection',
},
{
href: '/documentation/en/api_reference/file-uploads',
title: 'File Uploads',
},
{
href: '/documentation/en/api_reference/form_data',
title: 'Form Data',
},
{
href: '/documentation/en/api_reference/websockets',
title: 'Websockets',
},
{
href: '/documentation/en/api_reference/server_sent_events',
title: 'Server-Sent Events',
},
{
href: '/documentation/en/api_reference/exceptions',
title: 'Exceptions',
},
{
href: '/documentation/en/api_reference/scaling',
title: 'Scaling the Application',
},
{
href: '/documentation/en/api_reference/timeout_configuration',
title: 'Timeout Configuration',
},
{
href: '/documentation/en/api_reference/advanced_features',
title: 'Advanced Features',
},
{
href: '/documentation/en/api_reference/advanced_routing',
title: 'Advanced Routing',
},
{
href: '/documentation/en/api_reference/architecture_deep_dive',
title: 'Architecture Deep Dive',
},
{
href: '/documentation/en/api_reference/multiprocess_execution',
title: 'Multiprocess Execution',
},
{
href: '/documentation/en/api_reference/using_rust_directly',
title: 'Direct Rust Usage',
},
{
href: '/documentation/en/api_reference/graphql-support',
title: 'GraphQL Support',
},
{
href: '/documentation/en/api_reference/openapi',
title: 'OpenAPI Documentation',
},
{
href: '/documentation/en/api_reference/pydantic',
title: 'Pydantic Integration',
},
{
href: '/documentation/en/api_reference/dependency_injection',
title: 'Dependency Injection',
},
{
href: '/documentation/en/api_reference/mcps',
title: 'MCPs',
},
{
href: '/documentation/en/api_reference/ai',
title: 'AI',
},
{
href: '/documentation/en/api_reference/agents',
title: 'AI Agents',
},
],
},
{
title: 'Community Resources',
links: [
{
href: '/documentation/en/community-resources#talks',
title: 'Talks',
},
{
href: '/documentation/en/community-resources#blogs',
title: 'Blogs',
},
],
},
{
title: 'Architecture',
links: [
{
href: '/documentation/en/architecture',
title: 'Architecture',
},
],
},
{
title: 'Framework Comparison',
links: [
{
href: '/documentation/en/framework_performance_comparison',
title: 'Performance Comparison',
},
],
},
{
title: 'Hosting',
links: [
{
href: '/documentation/en/hosting#railway',
title: 'Railway',
},
{
href: '/documentation/en/hosting#exposing-ports',
title: 'Exposing Ports',
},
],
},
{
title: 'Plugins',
links: [
{
href: '/documentation/en/plugins',
title: 'Plugins',
},
],
},
{
title: 'Future Roadmap',
links: [
{
href: '/documentation/en/api_reference/future-roadmap',
title: 'Upcoming Features',
},
],
},
]
// Add translations for navigation titles
const navigationTitles = {
en: {
Documentation: 'Documentation',
'Example Application': 'Example Application',
'API Reference': 'API Reference',
'Community Resources': 'Community Resources',
Architecture: 'Architecture',
'Framework Comparison': 'Framework Comparison',
Hosting: 'Hosting',
Plugins: 'Plugins',
'Future Roadmap': 'Future Roadmap',
},
zh: {
'Documentation': '文档',
'Example Application': '应用示例',
'API Reference': 'API 参考',
'Community Resources': '社区资源',
'Architecture': '架构',
'Framework Comparison': '性能对比',
'Hosting': '托管',
'Plugins': '插件',
'Future Roadmap': '未来发展路线图'
}
}
// Add translations for navigation titles and link titles
const translations = {
en: {
titles: navigationTitles.en,
links: {
'Getting Started': 'Getting Started',
'Modeling Routes': 'Modeling Routes',
'Authentication and Authorization': 'Authentication and Authorization',
Middlewares: 'Middlewares',
'Real Time Notifications': 'Real Time Notifications',
'Monitoring and Logging': 'Monitoring and Logging',
Deployment: 'Deployment',
'OpenAPI Documentation': 'OpenAPI Documentation',
Templates: 'Templates',
SubRouters: 'SubRouters',
Installation: 'Installation',
'The Request Object': 'The Request Object',
'The Robyn Env file': 'The Robyn Env file',
'Middlewares, Events and Websockets':
'Middlewares, Events and Websockets',
Authentication: 'Authentication',
'Const Requests and Multi Core Scaling':
'Const Requests and Multi Core Scaling',
CORS: 'CORS',
Templating: 'Templating',
Redirection: 'Redirection',
'File Uploads': 'File Uploads',
'Form Data': 'Form Data',
Websockets: 'Websockets',
Exceptions: 'Exceptions',
'Scaling the Application': 'Scaling the Application',
'Timeout Configuration': 'Timeout Configuration',
'Advanced Features': 'Advanced Features',
'Advanced Routing': 'Advanced Routing',
'Architecture Deep Dive': 'Architecture Deep Dive',
'Multiprocess Execution': 'Multiprocess Execution',
'Direct Rust Usage': 'Direct Rust Usage',
'GraphQL Support': 'GraphQL Support',
'Dependency Injection': 'Dependency Injection',
'Pydantic Integration': 'Pydantic Integration',
'AI': 'AI',
'AI Agents': 'AI Agents',
Talks: 'Talks',
Blogs: 'Blogs',
Introduction: 'Introduction',
'Upcoming Features': 'Upcoming Features',
Railway: 'Railway',
'Exposing Ports': 'Exposing Ports',
},
},
zh: {
titles: navigationTitles.zh,
links: {
'Getting Started': '开始',
'Modeling Routes': '路由建模',
'Authentication and Authorization': '身份验证',
'Middlewares': '身份验证中间件',
'Real Time Notifications': '即时通讯',
'Monitoring and Logging': '监控和日志',
Deployment: '部署',
'OpenAPI Documentation': 'OpenAPI 文档',
Templates: '模板',
SubRouters: '子路由',
Installation: '安装',
'The Request Object': '请求对象',
'The Robyn Env file': 'Robyn 环境文件',
'Middlewares, Events and W
gitextract_zt3t3gjh/
├── .cargo/
│ └── config
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── blank_issue.md
│ │ ├── bug_report.yml
│ │ ├── config.yml
│ │ └── feature_request.md
│ ├── dependabot.yml
│ ├── pull_request_template.md
│ └── workflows/
│ ├── codspeed.yml
│ ├── lint-pr.yml
│ ├── preview-deployments.yml
│ ├── python-CI.yml
│ ├── release-CI.yml
│ └── rust-CI.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .well-known/
│ └── funding-manifest-urls
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Cargo.toml
├── LICENSE
├── README.md
├── benchmark.sh
├── ci-local.sh
├── docs_src/
│ ├── .eslintrc.json
│ ├── .gitignore
│ ├── README.md
│ ├── jsconfig.json
│ ├── mdx/
│ │ ├── recma.mjs
│ │ ├── rehype.mjs
│ │ └── remark.mjs
│ ├── next.config.mjs
│ ├── package.json
│ ├── postcss.config.js
│ ├── prettier.config.js
│ ├── public/
│ │ ├── funding.json
│ │ └── llms.txt
│ ├── src/
│ │ ├── components/
│ │ │ ├── Button.jsx
│ │ │ ├── Card.jsx
│ │ │ ├── Container.jsx
│ │ │ ├── Footer.jsx
│ │ │ ├── Header.jsx
│ │ │ ├── Prose.jsx
│ │ │ ├── Section.jsx
│ │ │ ├── SimpleLayout.jsx
│ │ │ ├── SocialIcons.jsx
│ │ │ ├── Testimonials.jsx
│ │ │ ├── documentation/
│ │ │ │ ├── ApiDocs.jsx
│ │ │ │ ├── BottomNavbar.jsx
│ │ │ │ ├── Button.jsx
│ │ │ │ ├── Code.jsx
│ │ │ │ ├── Guides.jsx
│ │ │ │ ├── Heading.jsx
│ │ │ │ ├── HeroPattern.jsx
│ │ │ │ ├── LanguageSelector.jsx
│ │ │ │ ├── Layout.jsx
│ │ │ │ ├── Libraries.jsx
│ │ │ │ ├── MobileNavigation.jsx
│ │ │ │ ├── ModeToggle.jsx
│ │ │ │ ├── Navigation.jsx
│ │ │ │ ├── Prose.jsx
│ │ │ │ ├── Search.jsx
│ │ │ │ ├── SectionProvider.jsx
│ │ │ │ ├── Tag.jsx
│ │ │ │ ├── icons/
│ │ │ │ │ ├── BellIcon.jsx
│ │ │ │ │ ├── BoltIcon.jsx
│ │ │ │ │ ├── BookIcon.jsx
│ │ │ │ │ ├── CalendarIcon.jsx
│ │ │ │ │ ├── CartIcon.jsx
│ │ │ │ │ ├── ChatBubbleIcon.jsx
│ │ │ │ │ ├── CheckIcon.jsx
│ │ │ │ │ ├── ChevronRightLeftIcon.jsx
│ │ │ │ │ ├── ClipboardIcon.jsx
│ │ │ │ │ ├── CogIcon.jsx
│ │ │ │ │ ├── CopyIcon.jsx
│ │ │ │ │ ├── DocumentIcon.jsx
│ │ │ │ │ ├── EnvelopeIcon.jsx
│ │ │ │ │ ├── FaceSmileIcon.jsx
│ │ │ │ │ ├── FolderIcon.jsx
│ │ │ │ │ ├── LinkIcon.jsx
│ │ │ │ │ ├── ListIcon.jsx
│ │ │ │ │ ├── MagnifyingGlassIcon.jsx
│ │ │ │ │ ├── MapPinIcon.jsx
│ │ │ │ │ ├── PackageIcon.jsx
│ │ │ │ │ ├── PaperAirplaneIcon.jsx
│ │ │ │ │ ├── PaperClipIcon.jsx
│ │ │ │ │ ├── ShapesIcon.jsx
│ │ │ │ │ ├── ShirtIcon.jsx
│ │ │ │ │ ├── SquaresPlusIcon.jsx
│ │ │ │ │ ├── TagIcon.jsx
│ │ │ │ │ ├── UserIcon.jsx
│ │ │ │ │ └── UsersIcon.jsx
│ │ │ │ └── mdx.jsx
│ │ │ └── releases/
│ │ │ ├── Button.jsx
│ │ │ ├── FeedProvider.jsx
│ │ │ ├── FormattedDate.jsx
│ │ │ ├── IconLink.jsx
│ │ │ ├── Intro.jsx
│ │ │ ├── Layout.jsx
│ │ │ ├── SignUpForm.jsx
│ │ │ └── mdx.jsx
│ │ ├── lib/
│ │ │ ├── formatDate.js
│ │ │ ├── getAllArticles.js
│ │ │ └── remToPx.js
│ │ ├── pages/
│ │ │ ├── _app.jsx
│ │ │ ├── _document.jsx
│ │ │ ├── community.jsx
│ │ │ ├── documentation/
│ │ │ │ ├── en/
│ │ │ │ │ ├── api_reference/
│ │ │ │ │ │ ├── advanced_features.mdx
│ │ │ │ │ │ ├── advanced_routing.mdx
│ │ │ │ │ │ ├── agents.mdx
│ │ │ │ │ │ ├── ai.mdx
│ │ │ │ │ │ ├── architecture_deep_dive.mdx
│ │ │ │ │ │ ├── authentication.mdx
│ │ │ │ │ │ ├── const_requests.mdx
│ │ │ │ │ │ ├── cors.mdx
│ │ │ │ │ │ ├── dependency_injection.mdx
│ │ │ │ │ │ ├── exceptions.mdx
│ │ │ │ │ │ ├── file-uploads.mdx
│ │ │ │ │ │ ├── form_data.mdx
│ │ │ │ │ │ ├── future-roadmap.mdx
│ │ │ │ │ │ ├── getting_started.mdx
│ │ │ │ │ │ ├── graphql-support.mdx
│ │ │ │ │ │ ├── index.mdx
│ │ │ │ │ │ ├── mcps.mdx
│ │ │ │ │ │ ├── middlewares.mdx
│ │ │ │ │ │ ├── multiprocess_execution.mdx
│ │ │ │ │ │ ├── openapi.mdx
│ │ │ │ │ │ ├── pydantic.mdx
│ │ │ │ │ │ ├── redirection.mdx
│ │ │ │ │ │ ├── request_object.mdx
│ │ │ │ │ │ ├── robyn_env.mdx
│ │ │ │ │ │ ├── scaling.mdx
│ │ │ │ │ │ ├── server_sent_events.mdx
│ │ │ │ │ │ ├── templating.mdx
│ │ │ │ │ │ ├── timeout_configuration.mdx
│ │ │ │ │ │ ├── using_rust_directly.mdx
│ │ │ │ │ │ ├── websockets.mdx
│ │ │ │ │ │ └── zh/
│ │ │ │ │ │ └── getting_started.mdx
│ │ │ │ │ ├── architecture.mdx
│ │ │ │ │ ├── community-resources.mdx
│ │ │ │ │ ├── example_app/
│ │ │ │ │ │ ├── authentication-middlewares.mdx
│ │ │ │ │ │ ├── authentication.mdx
│ │ │ │ │ │ ├── deployment.mdx
│ │ │ │ │ │ ├── index.mdx
│ │ │ │ │ │ ├── modeling_routes.mdx
│ │ │ │ │ │ ├── monitoring_and_logging.mdx
│ │ │ │ │ │ ├── openapi.mdx
│ │ │ │ │ │ ├── real_time_notifications.mdx
│ │ │ │ │ │ ├── subrouters.mdx
│ │ │ │ │ │ ├── templates.mdx
│ │ │ │ │ │ └── zh/
│ │ │ │ │ │ ├── index.mdx
│ │ │ │ │ │ └── subrouters.mdx
│ │ │ │ │ ├── framework_performance_comparison.mdx
│ │ │ │ │ ├── hosting.mdx
│ │ │ │ │ ├── index.mdx
│ │ │ │ │ └── plugins.mdx
│ │ │ │ └── zh/
│ │ │ │ ├── api_reference/
│ │ │ │ │ ├── advanced_features.mdx
│ │ │ │ │ ├── authentication.mdx
│ │ │ │ │ ├── const_requests.mdx
│ │ │ │ │ ├── cors.mdx
│ │ │ │ │ ├── dependency_injection.mdx
│ │ │ │ │ ├── exceptions.mdx
│ │ │ │ │ ├── file-uploads.mdx
│ │ │ │ │ ├── form_data.mdx
│ │ │ │ │ ├── future-roadmap.mdx
│ │ │ │ │ ├── getting_started.mdx
│ │ │ │ │ ├── graphql-support.mdx
│ │ │ │ │ ├── index.mdx
│ │ │ │ │ ├── middlewares.mdx
│ │ │ │ │ ├── multiprocess_execution.mdx
│ │ │ │ │ ├── openapi.mdx
│ │ │ │ │ ├── pydantic.mdx
│ │ │ │ │ ├── redirection.mdx
│ │ │ │ │ ├── request_object.mdx
│ │ │ │ │ ├── robyn_env.mdx
│ │ │ │ │ ├── scaling.mdx
│ │ │ │ │ ├── server_sent_events.mdx
│ │ │ │ │ ├── templating.mdx
│ │ │ │ │ ├── timeout_configuration.mdx
│ │ │ │ │ ├── using_rust_directly.mdx
│ │ │ │ │ ├── views.mdx
│ │ │ │ │ └── websockets.mdx
│ │ │ │ ├── architecture.mdx
│ │ │ │ ├── community-resources.mdx
│ │ │ │ ├── example_app/
│ │ │ │ │ ├── authentication-middlewares.mdx
│ │ │ │ │ ├── authentication.mdx
│ │ │ │ │ ├── deployment.mdx
│ │ │ │ │ ├── index.mdx
│ │ │ │ │ ├── modeling_routes.mdx
│ │ │ │ │ ├── monitoring_and_logging.mdx
│ │ │ │ │ ├── openapi.mdx
│ │ │ │ │ ├── real_time_notifications.mdx
│ │ │ │ │ ├── subrouters_and_views.mdx
│ │ │ │ │ └── templates.mdx
│ │ │ │ ├── framework_performance_comparison.mdx
│ │ │ │ ├── hosting.mdx
│ │ │ │ ├── index.mdx
│ │ │ │ └── plugins.mdx
│ │ │ ├── index.jsx
│ │ │ └── releases/
│ │ │ └── index.jsx
│ │ └── styles/
│ │ ├── documentation.css
│ │ ├── prism.css
│ │ ├── releases/
│ │ │ ├── base.css
│ │ │ ├── components.css
│ │ │ ├── tailwind.css
│ │ │ ├── typography.css
│ │ │ └── utilities.css
│ │ └── tailwind.css
│ └── tailwind.config.js
├── examples/
│ ├── agents.py
│ ├── mcp.py
│ └── sse_example.py
├── integration_tests/
│ ├── __init__.py
│ ├── base_routes.py
│ ├── build/
│ │ └── index.html
│ ├── conftest.py
│ ├── downloads/
│ │ └── test.txt
│ ├── helpers/
│ │ ├── __init__.py
│ │ ├── http_methods_helpers.py
│ │ └── network_helpers.py
│ ├── index.html
│ ├── index.py
│ ├── openapi_config.json
│ ├── random_number.rs
│ ├── subroutes/
│ │ ├── __init__.py
│ │ ├── di_subrouter.py
│ │ └── file_api.py
│ ├── templates/
│ │ └── test.html
│ ├── test_add_route_without_decorator.py
│ ├── test_app.py
│ ├── test_authentication.py
│ ├── test_base_url.py
│ ├── test_basic_routes.py
│ ├── test_binary_output.py
│ ├── test_delete_requests.py
│ ├── test_dependency_injection.py
│ ├── test_easy_access_params.py
│ ├── test_exception_handling.py
│ ├── test_file_download.py
│ ├── test_get_requests.py
│ ├── test_json_types.py
│ ├── test_middlewares.py
│ ├── test_multipart_data.py
│ ├── test_openapi.py
│ ├── test_patch_requests.py
│ ├── test_post_requests.py
│ ├── test_put_requests.py
│ ├── test_pydantic.py
│ ├── test_request_json.py
│ ├── test_split_request_params.py
│ ├── test_sse.py
│ ├── test_static_files_with_api_routes.py
│ ├── test_status_code.py
│ ├── test_subrouter.py
│ └── test_web_sockets.py
├── llms.txt
├── noxfile.py
├── pyproject.toml
├── robyn/
│ ├── __init__.py
│ ├── __main__.py
│ ├── _param_utils.py
│ ├── ai.py
│ ├── argument_parser.py
│ ├── authentication.py
│ ├── cli.py
│ ├── dependency_injection.py
│ ├── env_populator.py
│ ├── events.py
│ ├── exceptions.py
│ ├── jsonify.py
│ ├── logger.py
│ ├── mcp.py
│ ├── openapi.py
│ ├── processpool.py
│ ├── py.typed
│ ├── pydantic_support.py
│ ├── reloader.py
│ ├── responses.py
│ ├── robyn.pyi
│ ├── router.py
│ ├── scaffold/
│ │ ├── mongo/
│ │ │ ├── Dockerfile
│ │ │ ├── app.py
│ │ │ └── requirements.txt
│ │ ├── no-db/
│ │ │ ├── Dockerfile
│ │ │ ├── app.py
│ │ │ └── requirements.txt
│ │ ├── postgres/
│ │ │ ├── Dockerfile
│ │ │ ├── app.py
│ │ │ ├── requirements.txt
│ │ │ └── supervisord.conf
│ │ ├── prisma/
│ │ │ ├── Dockerfile
│ │ │ ├── app.py
│ │ │ ├── requirements.txt
│ │ │ └── schema.prisma
│ │ ├── sqlalchemy/
│ │ │ ├── Dockerfile
│ │ │ ├── __init__.py
│ │ │ ├── app.py
│ │ │ ├── models.py
│ │ │ └── requirements.txt
│ │ ├── sqlite/
│ │ │ ├── Dockerfile
│ │ │ ├── app.py
│ │ │ └── requirements.txt
│ │ └── sqlmodel/
│ │ ├── Dockerfile
│ │ ├── app.py
│ │ ├── models.py
│ │ └── requirements.txt
│ ├── status_codes.py
│ ├── swagger.html
│ ├── templating.py
│ ├── types.py
│ └── ws.py
├── scripts/
│ ├── format.sh
│ └── release.sh
├── setup.py
├── src/
│ ├── asyncio.rs
│ ├── blocking.rs
│ ├── callbacks.rs
│ ├── conversion.rs
│ ├── executors/
│ │ ├── mod.rs
│ │ └── web_socket_executors.rs
│ ├── io_helpers/
│ │ └── mod.rs
│ ├── lib.rs
│ ├── routers/
│ │ ├── const_router.rs
│ │ ├── http_router.rs
│ │ ├── middleware_router.rs
│ │ ├── mod.rs
│ │ └── web_socket_router.rs
│ ├── runtime.rs
│ ├── server.rs
│ ├── shared_socket.rs
│ ├── types/
│ │ ├── cookie.rs
│ │ ├── function_info.rs
│ │ ├── headers.rs
│ │ ├── identity.rs
│ │ ├── mod.rs
│ │ ├── multimap.rs
│ │ ├── request.rs
│ │ └── response.rs
│ └── websockets/
│ ├── mod.rs
│ └── registry.rs
└── unit_tests/
├── test_cli.py
├── test_env_populator.py
├── test_openapi_issue_1270.py
├── test_request_object.py
└── test_unsupported_types.py
SYMBOL INDEX (1317 symbols across 176 files)
FILE: docs_src/mdx/recma.mjs
function recmaRemoveNamedExports (line 5) | function recmaRemoveNamedExports() {
FILE: docs_src/mdx/rehype.mjs
function rehypeParseCodeBlocks (line 12) | function rehypeParseCodeBlocks() {
function rehypeShiki (line 27) | function rehypeShiki() {
function rehypeSlugify (line 58) | function rehypeSlugify() {
function rehypeAddMDXExports (line 69) | function rehypeAddMDXExports(getExports) {
function getSections (line 99) | function getSections(node) {
FILE: docs_src/next.config.mjs
method redirects (line 27) | async redirects() {
FILE: docs_src/src/components/Button.jsx
function Button (line 11) | function Button({ variant = 'primary', className, href, ...props }) {
FILE: docs_src/src/components/Card.jsx
function ChevronRightIcon (line 4) | function ChevronRightIcon(props) {
function Card (line 17) | function Card({ as: Component = 'div', className, children }) {
FILE: docs_src/src/components/Footer.jsx
function NavLink (line 6) | function NavLink({ href, children, ...props }) {
function GithubButton (line 14) | function GithubButton() {
function Footer (line 26) | function Footer() {
FILE: docs_src/src/components/Header.jsx
function CloseIcon (line 12) | function CloseIcon(props) {
function ChevronDownIcon (line 27) | function ChevronDownIcon(props) {
function MobileNavItem (line 41) | function MobileNavItem({ href, children }) {
function MobileNavigation (line 51) | function MobileNavigation(props) {
function NavItem (line 108) | function NavItem({ href, children, ...props }) {
function DesktopNavigation (line 130) | function DesktopNavigation(props) {
function GitHubStars (line 145) | function GitHubStars() {
function clamp (line 202) | function clamp(number, a, b) {
function Avatar (line 208) | function Avatar({ large = false, className, ...props }) {
function Header (line 230) | function Header() {
FILE: docs_src/src/components/Prose.jsx
function Prose (line 3) | function Prose({ children, className }) {
FILE: docs_src/src/components/Section.jsx
function Section (line 3) | function Section({ title, children }) {
FILE: docs_src/src/components/SimpleLayout.jsx
function SimpleLayout (line 3) | function SimpleLayout({ title, intro, children }) {
FILE: docs_src/src/components/SocialIcons.jsx
function TwitterIcon (line 1) | function TwitterIcon(props) {
function InstagramIcon (line 9) | function InstagramIcon(props) {
function GitHubIcon (line 18) | function GitHubIcon(props) {
function LinkedInIcon (line 30) | function LinkedInIcon(props) {
function DiscordIcon (line 38) | function DiscordIcon(props) {
FILE: docs_src/src/components/Testimonials.jsx
function classNames (line 106) | function classNames(...classes) {
function Testimonials (line 115) | function Testimonials() {
FILE: docs_src/src/components/documentation/ApiDocs.jsx
function ApiDocs (line 118) | function ApiDocs() {
FILE: docs_src/src/components/documentation/Button.jsx
function ArrowIcon (line 4) | function ArrowIcon(props) {
function Button (line 28) | function Button({
FILE: docs_src/src/components/documentation/Code.jsx
function getPanelTitle (line 26) | function getPanelTitle({ title, language }) {
function ClipboardIcon (line 30) | function ClipboardIcon(props) {
function CopyButton (line 46) | function CopyButton({ code }) {
function CodePanelHeader (line 97) | function CodePanelHeader({ tag, label }) {
function CodePanel (line 119) | function CodePanel({ tag, label, code, children }) {
function CodeGroupHeader (line 136) | function CodeGroupHeader({ title, children, selectedIndex }) {
function CodeGroupPanels (line 170) | function CodeGroupPanels({ children, ...props }) {
function usePreventLayoutShift (line 188) | function usePreventLayoutShift() {
function useTabGroupProps (line 226) | function useTabGroupProps(availableLanguages) {
function CodeGroup (line 254) | function CodeGroup({ children, title, ...props }) {
function Code (line 279) | function Code({ children, ...props }) {
function Pre (line 299) | function Pre({ children, ...props }) {
FILE: docs_src/src/components/documentation/Guides.jsx
function Guides (line 44) | function Guides() {
FILE: docs_src/src/components/documentation/Heading.jsx
function AnchorIcon (line 9) | function AnchorIcon(props) {
function Eyebrow (line 23) | function Eyebrow({ tag, label }) {
function Anchor (line 41) | function Anchor({ id, inView, children }) {
function Heading (line 59) | function Heading({
FILE: docs_src/src/components/documentation/HeroPattern.jsx
function HeroPattern (line 1) | function HeroPattern() {
FILE: docs_src/src/components/documentation/LanguageSelector.jsx
function LanguageSelector (line 10) | function LanguageSelector() {
FILE: docs_src/src/components/documentation/Layout.jsx
function Layout (line 9) | function Layout({ children, sections = [] }) {
FILE: docs_src/src/components/documentation/Libraries.jsx
function Libraries (line 39) | function Libraries() {
FILE: docs_src/src/components/documentation/MobileNavigation.jsx
function MenuIcon (line 9) | function MenuIcon(props) {
function XIcon (line 29) | function XIcon(props) {
function useIsInsideMobileNavigation (line 45) | function useIsInsideMobileNavigation() {
function MobileNavigation (line 56) | function MobileNavigation() {
FILE: docs_src/src/components/documentation/ModeToggle.jsx
function SunIcon (line 1) | function SunIcon(props) {
function MoonIcon (line 13) | function MoonIcon(props) {
FILE: docs_src/src/components/documentation/Navigation.jsx
function useInitialValue (line 13) | function useInitialValue(value, condition = true) {
function TopLevelNavItem (line 18) | function TopLevelNavItem({ href, children }) {
function NavLink (line 31) | function NavLink({ href, tag, active, isAnchorLink = false, children }) {
function VisibleSectionHighlight (line 52) | function VisibleSectionHighlight({ group, pathname }) {
function ActivePageMarker (line 88) | function ActivePageMarker({ group, pathname }) {
function NavigationGroup (line 106) | function NavigationGroup({ group, className }) {
function Navigation (line 534) | function Navigation(props) {
FILE: docs_src/src/components/documentation/Prose.jsx
function Prose (line 3) | function Prose({ className, ...props }) {
FILE: docs_src/src/components/documentation/Search.jsx
function useAutocomplete (line 14) | function useAutocomplete() {
function resolveResult (line 99) | function resolveResult(result) {
function SearchIcon (line 124) | function SearchIcon(props) {
function NoResultsIcon (line 136) | function NoResultsIcon(props) {
function LoadingIcon (line 148) | function LoadingIcon(props) {
function SearchResult (line 177) | function SearchResult({ result, resultIndex, autocomplete, collection }) {
function SearchResults (line 225) | function SearchResults({ autocomplete, query, collection }) {
function AlgoliaLogo (line 297) | function AlgoliaLogo(props) {
function SearchButton (line 316) | function SearchButton(props) {
function SearchDialog (line 351) | function SearchDialog({ open, setOpen, className }) {
function useSearchProps (line 470) | function useSearchProps() {
function Search (line 493) | function Search() {
function MobileSearch (line 521) | function MobileSearch() {
FILE: docs_src/src/components/documentation/SectionProvider.jsx
function createSectionStore (line 12) | function createSectionStore(sections) {
function useVisibleSections (line 40) | function useVisibleSections(sectionStore) {
function SectionProvider (line 98) | function SectionProvider({ sections, children }) {
function useSectionStore (line 114) | function useSectionStore(selector) {
FILE: docs_src/src/components/documentation/Tag.jsx
function Tag (line 37) | function Tag({
FILE: docs_src/src/components/documentation/icons/BellIcon.jsx
function BellIcon (line 1) | function BellIcon(props) {
FILE: docs_src/src/components/documentation/icons/BoltIcon.jsx
function BoltIcon (line 1) | function BoltIcon(props) {
FILE: docs_src/src/components/documentation/icons/BookIcon.jsx
function BookIcon (line 1) | function BookIcon(props) {
FILE: docs_src/src/components/documentation/icons/CalendarIcon.jsx
function CalendarIcon (line 1) | function CalendarIcon(props) {
FILE: docs_src/src/components/documentation/icons/CartIcon.jsx
function CartIcon (line 1) | function CartIcon(props) {
FILE: docs_src/src/components/documentation/icons/ChatBubbleIcon.jsx
function ChatBubbleIcon (line 1) | function ChatBubbleIcon(props) {
FILE: docs_src/src/components/documentation/icons/CheckIcon.jsx
function CheckIcon (line 1) | function CheckIcon(props) {
FILE: docs_src/src/components/documentation/icons/ChevronRightLeftIcon.jsx
function ChevronRightLeftIcon (line 1) | function ChevronRightLeftIcon(props) {
FILE: docs_src/src/components/documentation/icons/ClipboardIcon.jsx
function ClipboardIcon (line 1) | function ClipboardIcon(props) {
FILE: docs_src/src/components/documentation/icons/CogIcon.jsx
function CogIcon (line 1) | function CogIcon(props) {
FILE: docs_src/src/components/documentation/icons/CopyIcon.jsx
function CopyIcon (line 1) | function CopyIcon(props) {
FILE: docs_src/src/components/documentation/icons/DocumentIcon.jsx
function DocumentIcon (line 1) | function DocumentIcon(props) {
FILE: docs_src/src/components/documentation/icons/EnvelopeIcon.jsx
function EnvelopeIcon (line 1) | function EnvelopeIcon(props) {
FILE: docs_src/src/components/documentation/icons/FaceSmileIcon.jsx
function FaceSmileIcon (line 1) | function FaceSmileIcon(props) {
FILE: docs_src/src/components/documentation/icons/FolderIcon.jsx
function FolderIcon (line 1) | function FolderIcon(props) {
FILE: docs_src/src/components/documentation/icons/LinkIcon.jsx
function LinkIcon (line 1) | function LinkIcon(props) {
FILE: docs_src/src/components/documentation/icons/ListIcon.jsx
function ListIcon (line 1) | function ListIcon(props) {
FILE: docs_src/src/components/documentation/icons/MagnifyingGlassIcon.jsx
function MagnifyingGlassIcon (line 1) | function MagnifyingGlassIcon(props) {
FILE: docs_src/src/components/documentation/icons/MapPinIcon.jsx
function MapPinIcon (line 1) | function MapPinIcon(props) {
FILE: docs_src/src/components/documentation/icons/PackageIcon.jsx
function PackageIcon (line 1) | function PackageIcon(props) {
FILE: docs_src/src/components/documentation/icons/PaperAirplaneIcon.jsx
function PaperAirplaneIcon (line 1) | function PaperAirplaneIcon(props) {
FILE: docs_src/src/components/documentation/icons/PaperClipIcon.jsx
function PaperClipIcon (line 1) | function PaperClipIcon(props) {
FILE: docs_src/src/components/documentation/icons/ShapesIcon.jsx
function ShapesIcon (line 1) | function ShapesIcon(props) {
FILE: docs_src/src/components/documentation/icons/ShirtIcon.jsx
function ShirtIcon (line 1) | function ShirtIcon(props) {
FILE: docs_src/src/components/documentation/icons/SquaresPlusIcon.jsx
function SquaresPlusIcon (line 1) | function SquaresPlusIcon(props) {
FILE: docs_src/src/components/documentation/icons/TagIcon.jsx
function TagIcon (line 1) | function TagIcon(props) {
FILE: docs_src/src/components/documentation/icons/UserIcon.jsx
function UserIcon (line 1) | function UserIcon(props) {
FILE: docs_src/src/components/documentation/icons/UsersIcon.jsx
function UsersIcon (line 1) | function UsersIcon(props) {
FILE: docs_src/src/components/documentation/mdx.jsx
function InfoIcon (line 24) | function InfoIcon(props) {
function Note (line 40) | function Note({ children }) {
function Row (line 51) | function Row({ children }) {
function Col (line 59) | function Col({ children, sticky = false }) {
function Properties (line 72) | function Properties({ children }) {
function Property (line 85) | function Property({ name, type, children }) {
FILE: docs_src/src/components/releases/Button.jsx
function ButtonInner (line 4) | function ButtonInner({ arrow = false, children }) {
function Button (line 14) | function Button({ href, className, arrow, children, ...props }) {
FILE: docs_src/src/components/releases/FeedProvider.jsx
function FeedProvider (line 5) | function FeedProvider({ children }) {
function useFeed (line 13) | function useFeed() {
FILE: docs_src/src/components/releases/FormattedDate.jsx
function FormattedDate (line 8) | function FormattedDate({ date, ...props }) {
FILE: docs_src/src/components/releases/IconLink.jsx
function IconLink (line 4) | function IconLink({
FILE: docs_src/src/components/releases/Intro.jsx
function BookIcon (line 9) | function BookIcon(props) {
function GitHubIcon (line 17) | function GitHubIcon(props) {
function FeedIcon (line 25) | function FeedIcon(props) {
function Intro (line 37) | function Intro() {
FILE: docs_src/src/components/releases/Layout.jsx
function Timeline (line 5) | function Timeline() {
function FixedSidebar (line 29) | function FixedSidebar({ main }) {
function Layout (line 43) | function Layout({ children }) {
FILE: docs_src/src/components/releases/SignUpForm.jsx
function SignUpForm (line 5) | function SignUpForm() {
FILE: docs_src/src/components/releases/mdx.jsx
function H2 (line 15) | function H2(props) {
function ContentWrapper (line 44) | function ContentWrapper({ className, children }) {
function ArticleHeader (line 61) | function ArticleHeader({ id, date }) {
function Article (line 81) | function Article({ id, title, date, children }) {
FILE: docs_src/src/lib/formatDate.js
function formatDate (line 1) | function formatDate(dateString) {
FILE: docs_src/src/lib/getAllArticles.js
function importArticle (line 4) | async function importArticle(articleFilename) {
function getAllArticles (line 15) | async function getAllArticles() {
FILE: docs_src/src/lib/remToPx.js
function remToPx (line 1) | function remToPx(remValue) {
FILE: docs_src/src/pages/_app.jsx
function usePrevious (line 20) | function usePrevious(value) {
function onRouteChange (line 30) | function onRouteChange() {
function App (line 36) | function App({ Component, pageProps, router }) {
FILE: docs_src/src/pages/_document.jsx
function Document (line 39) | function Document() {
FILE: docs_src/src/pages/community.jsx
function Contributors (line 6) | function Contributors() {
function Community (line 54) | function Community() {
FILE: docs_src/src/pages/index.jsx
function CodeSnippet (line 14) | function CodeSnippet() {
function Example (line 48) | function Example() {
function Home (line 56) | function Home({ articles }) {
FILE: docs_src/src/pages/releases/index.jsx
function getStaticProps (line 46) | async function getStaticProps() {
FILE: examples/agents.py
function startup (line 14) | async def startup():
function chat (line 27) | async def chat(request):
function home (line 40) | def home():
FILE: examples/mcp.py
function current_time (line 20) | def current_time() -> str:
function system_info (line 25) | def system_info() -> str:
function calculate_tool (line 39) | def calculate_tool(args):
function echo_tool (line 57) | def echo_tool(args):
function explain_code_prompt (line 70) | def explain_code_prompt(args):
function home (line 88) | def home():
FILE: examples/sse_example.py
function index (line 18) | def index(request):
function stream_events (line 56) | def stream_events(request):
function stream_json_events (line 72) | def stream_json_events(request):
function stream_named_events (line 87) | def stream_named_events(request):
function stream_async_events (line 108) | async def stream_async_events(request):
function stream_heartbeat (line 122) | def stream_heartbeat(request):
function help_page (line 139) | def help_page(request):
FILE: integration_tests/base_routes.py
function websocket_endpoint (line 36) | async def websocket_endpoint(websocket):
function websocket_on_connect (line 65) | def websocket_on_connect(websocket):
function websocket_on_close (line 70) | def websocket_on_close(websocket):
function json_websocket_endpoint (line 76) | async def json_websocket_endpoint(websocket):
function json_websocket_on_connect (line 99) | def json_websocket_on_connect(websocket):
function json_websocket_on_close (line 104) | def json_websocket_on_close(websocket):
function di_websocket_endpoint (line 110) | async def di_websocket_endpoint(websocket, global_dependencies=None, rou...
function di_websocket_on_connect (line 122) | async def di_websocket_on_connect(websocket, global_dependencies=None, r...
function di_websocket_on_close (line 129) | async def di_websocket_on_close(websocket, global_dependencies=None):
function echo_websocket_endpoint (line 136) | async def echo_websocket_endpoint(websocket):
function echo_websocket_on_connect (line 146) | def echo_websocket_on_connect(websocket):
function echo_websocket_on_close (line 151) | def echo_websocket_on_close(websocket):
function empty_websocket_endpoint (line 157) | async def empty_websocket_endpoint(websocket):
function empty_websocket_on_connect (line 167) | async def empty_websocket_on_connect(websocket):
function empty_websocket_on_close (line 173) | async def empty_websocket_on_close(websocket):
function startup_handler (line 181) | async def startup_handler():
function shutdown_handler (line 186) | def shutdown_handler():
function global_before_request (line 196) | def global_before_request(request: Request):
function global_after_request (line 202) | def global_after_request(response: Response):
function sync_global_middlewares (line 208) | def sync_global_middlewares(request: Request):
function sync_before_request (line 221) | def sync_before_request(request: Request):
function sync_after_request (line 227) | def sync_after_request(response: Response):
function sync_middlewares (line 234) | def sync_middlewares(request: Request):
function async_before_request (line 242) | async def async_before_request(request: Request):
function async_after_request (line 248) | async def async_after_request(response: Response):
function async_middlewares (line 255) | async def async_middlewares(request: Request):
function sync_before_request_401 (line 263) | def sync_before_request_401():
function sync_middlewares_401 (line 268) | def sync_middlewares_401():
function hello_world (line 282) | async def hello_world(r):
function trailing_slash (line 290) | def trailing_slash(request):
function sync_str_get (line 295) | def sync_str_get():
function async_str_get (line 300) | async def async_str_get():
function sync_str_const_get (line 305) | def sync_str_const_get():
function async_str_const_get (line 310) | async def async_str_const_get():
function sync_dict_get (line 318) | def sync_dict_get():
function async_dict_get (line 327) | async def async_dict_get():
function sync_dict_const_get (line 336) | def sync_dict_const_get():
function async_dict_const_get (line 345) | async def async_dict_const_get():
function sync_response_get (line 357) | def sync_response_get():
function async_response_get (line 362) | async def async_response_get():
function sync_response_const_get (line 367) | def sync_response_const_get():
function async_response_const_get (line 372) | async def async_response_const_get():
function sync_octet_get (line 380) | def sync_octet_get():
function async_octet_get (line 385) | async def async_octet_get():
function sync_octet_response_get (line 390) | def sync_octet_response_get():
function async_octet_response_get (line 399) | async def async_octet_response_get():
function sync_json_get (line 411) | def sync_json_get():
function async_json_get (line 416) | async def async_json_get():
function sync_json_list_get (line 424) | def sync_json_list_get():
function async_json_list_get (line 433) | async def async_json_list_get():
function sync_json_list_empty_get (line 442) | def sync_json_list_empty_get():
function async_json_list_empty_get (line 447) | async def async_json_list_empty_get():
function sync_json_list_primitives_get (line 452) | def sync_json_list_primitives_get():
function async_json_list_primitives_get (line 457) | async def async_json_list_primitives_get():
function sync_json_dict_get (line 465) | def sync_json_dict_get():
function async_json_dict_get (line 470) | async def async_json_dict_get():
function sync_json_const_get (line 475) | def sync_json_const_get():
function async_json_const_get (line 480) | async def async_json_const_get():
function sync_param (line 488) | def sync_param(request: Request):
function async_param (line 494) | async def async_param(request: Request):
function sync_param_extra (line 500) | def sync_param_extra(request: Request):
function async_param_extra (line 506) | async def async_param_extra(request: Request):
function sync_http_param (line 515) | def sync_http_param(request: Request):
function async_http_param (line 529) | async def async_http_param(request: Request):
function sync_serve_html (line 546) | def sync_serve_html():
function async_serve_html (line 552) | async def async_serve_html():
function sync_template_render (line 561) | def sync_template_render():
function async_template_render (line 568) | async def async_template_render():
function sync_file_download (line 578) | def sync_file_download():
function file_download_async (line 584) | async def file_download_async():
function sync_multipart_file (line 593) | def sync_multipart_file(request: Request):
function sync_queries (line 603) | def sync_queries(request: Request):
function async_query (line 609) | async def async_query(request: Request):
function return_404 (line 618) | def return_404():
function return_202 (line 623) | def return_202():
function redirect (line 628) | async def redirect():
function redirect_route (line 637) | async def redirect_route():
function sync_raise (line 642) | def sync_raise():
function async_raise (line 647) | async def async_raise():
function cookie (line 653) | def cookie():
function multiple_cookies (line 661) | def multiple_cookies():
function cookie_with_attributes (line 669) | def cookie_with_attributes():
function cookie_overwrite (line 684) | def cookie_overwrite():
function sync_dict_post (line 697) | def sync_dict_post():
function async_dict_post (line 706) | async def async_dict_post():
function sync_body_post (line 718) | def sync_body_post(request: Request):
function async_body_post (line 723) | async def async_body_post(request: Request):
function sync_form_data (line 728) | def sync_form_data(request: Request):
function sync_json_post (line 736) | def sync_json_post(request: Request):
function async_json_post (line 744) | async def async_json_post(request: Request):
function request_json (line 752) | async def request_json(request: Request):
function sync_json_types (line 759) | def sync_json_types(request: Request):
function async_json_types (line 772) | async def async_json_types(request: Request):
function sync_json_array (line 786) | def sync_json_array(request: Request):
function async_json_array (line 793) | async def async_json_array(request: Request):
function sync_dict_put (line 805) | def sync_dict_put():
function async_dict_put (line 814) | async def async_dict_put():
function sync_body_put (line 826) | def sync_body_put(request: Request):
function async_body_put (line 831) | async def async_body_put(request: Request):
function sync_dict_delete (line 841) | def sync_dict_delete():
function async_dict_delete (line 850) | async def async_dict_delete():
function sync_body_delete (line 862) | def sync_body_delete(request: Request):
function async_body_delete (line 868) | async def async_body_delete(request: Request):
function sync_dict_patch (line 878) | def sync_dict_patch():
function async_dict_patch (line 887) | async def async_dict_patch():
function sync_body_patch (line 900) | def sync_body_patch(request: Request):
function async_body_patch (line 905) | async def async_body_patch(request: Request):
function handle_exception (line 913) | def handle_exception(error):
function sync_exception_get (line 918) | def sync_exception_get():
function async_exception_get (line 923) | async def async_exception_get():
function sync_exception_put (line 928) | def sync_exception_put(request: Request):
function async_exception_put (line 933) | async def async_exception_put(request: Request):
function sync_exception_post (line 938) | def sync_exception_post(request: Request):
function async_exception_post (line 943) | async def async_exception_post(request: Request):
function sync_auth (line 951) | def sync_auth(request: Request):
function async_auth (line 958) | async def async_auth(request: Request):
function sync_without_decorator (line 967) | def sync_without_decorator():
function async_without_decorator (line 971) | async def async_without_decorator():
function sync_global_di (line 992) | def sync_global_di(request, router_dependencies, global_dependencies):
function sync_router_di (line 997) | def sync_router_di(request, router_dependencies):
function sync_split_request_untyped_basic (line 1005) | def sync_split_request_untyped_basic(query_params):
function async_split_request_untyped_basic (line 1010) | async def async_split_request_untyped_basic(query_params):
function sync_split_request_untyped_headers (line 1015) | def sync_split_request_untyped_headers(headers):
function async_split_request_untyped_headers (line 1020) | async def async_split_request_untyped_headers(headers):
function sync_split_request_untyped_path_params (line 1025) | def sync_split_request_untyped_path_params(path_params):
function async_split_request_untyped_path_params (line 1030) | async def async_split_request_untyped_path_params(path_params):
function sync_split_request_untyped_method (line 1035) | def sync_split_request_untyped_method(method):
function async_split_request_untyped_method (line 1040) | async def async_split_request_untyped_method(method):
function sync_split_request_untyped_body (line 1045) | def sync_split_request_untyped_body(body):
function async_split_request_untyped_body (line 1050) | async def async_split_request_untyped_body(body):
function sync_split_request_untyped_combined (line 1055) | def sync_split_request_untyped_combined(body, query_params, method, url,...
function async_split_request_untyped_combined (line 1066) | async def async_split_request_untyped_combined(body, query_params, metho...
function sync_split_request_basic (line 1077) | def sync_split_request_basic(query_data: QueryParams):
function async_split_request_basic (line 1082) | async def async_split_request_basic(query_data: QueryParams):
function sync_split_request_headers (line 1087) | def sync_split_request_headers(request_headers: Headers):
function async_split_request_headers (line 1092) | async def async_split_request_headers(request_headers: Headers):
function sync_split_request_path_params (line 1097) | def sync_split_request_path_params(path_data: PathParams):
function async_split_request_path_params (line 1102) | async def async_split_request_path_params(path_data: PathParams):
function sync_split_request_method (line 1107) | def sync_split_request_method(request_method: Method):
function async_split_request_method (line 1112) | async def async_split_request_method(request_method: Method):
function sync_split_request_body (line 1117) | def sync_split_request_body(request_body: Body):
function async_split_request_body (line 1122) | async def async_split_request_body(request_body: Body):
function sync_split_request_combined (line 1127) | def sync_split_request_combined(
function async_split_request_combined (line 1144) | async def async_split_request_combined(
function sync_split_request_typed_untyped_combined (line 1161) | def sync_split_request_typed_untyped_combined(
function async_split_request_typed_untyped_combined (line 1178) | async def async_split_request_typed_untyped_combined(
function sync_split_request_typed_untyped_combined_failure (line 1195) | def sync_split_request_typed_untyped_combined_failure(query_params, requ...
function async_split_request_typed_untyped_combined_failure (line 1207) | async def async_split_request_typed_untyped_combined_failure(query_param...
function sample_openapi_endpoint (line 1219) | def sample_openapi_endpoint():
class Initial (line 1224) | class Initial(Body):
class FullName (line 1229) | class FullName(Body):
class CreateItemBody (line 1235) | class CreateItemBody(Body):
class CreateItemResponse (line 1242) | class CreateItemResponse(JSONResponse):
class CreateItemQueryParamsParams (line 1247) | class CreateItemQueryParamsParams(QueryParams):
function create_item (line 1252) | def create_item(request, body: CreateItemBody, query: CreateItemQueryPar...
class TemperatureInput (line 1259) | class TemperatureInput(JsonBody):
function sync_json_body_bare (line 1264) | def sync_json_body_bare(data: JsonBody):
function async_json_body_bare (line 1270) | async def async_json_body_bare(data: JsonBody):
function sync_json_body_typed (line 1276) | def sync_json_body_typed(data: TemperatureInput):
function async_json_body_typed (line 1284) | async def async_json_body_typed(data: TemperatureInput):
function openapi_json_body_endpoint (line 1292) | def openapi_json_body_endpoint(request: Request, data: TemperatureInput)...
function sse_basic (line 1301) | def sse_basic(request):
function sse_formatted (line 1312) | def sse_formatted(request):
function sse_json (line 1323) | def sse_json(request):
function sse_named_events (line 1335) | def sse_named_events(request):
function sse_async (line 1347) | async def sse_async(request):
function sse_streaming_sync (line 1360) | def sse_streaming_sync(request):
function sse_streaming_async (line 1373) | async def sse_streaming_async(request):
function sse_high_frequency (line 1386) | def sse_high_frequency(request):
function sse_single (line 1399) | def sse_single(request):
function sse_empty (line 1409) | def sse_empty(request):
function sse_with_headers (line 1420) | def sse_with_headers(request):
function sse_status_code (line 1431) | def sse_status_code(request):
function easy_access_sync (line 1444) | def easy_access_sync(id: int, q: str, page: int = 1):
function easy_access_async (line 1449) | async def easy_access_async(id: int, q: str, page: int = 1):
function easy_access_optional_sync (line 1454) | def easy_access_optional_sync(name: str, age: Optional[int] = None):
function easy_access_optional_async (line 1459) | async def easy_access_optional_async(name: str, age: Optional[int] = None):
function easy_access_list_sync (line 1464) | def easy_access_list_sync(tag: List[str]):
function easy_access_list_async (line 1469) | async def easy_access_list_async(tag: List[str]):
function easy_access_bool_sync (line 1474) | def easy_access_bool_sync(active: bool = False):
function easy_access_bool_async (line 1479) | async def easy_access_bool_async(active: bool = False):
function easy_access_mixed_sync (line 1484) | def easy_access_mixed_sync(request: Request, id: int, q: str = ""):
function easy_access_mixed_async (line 1489) | async def easy_access_mixed_async(request: Request, id: int, q: str = ""):
function easy_access_float_sync (line 1494) | def easy_access_float_sync(price: float):
function easy_access_float_async (line 1499) | async def easy_access_float_async(price: float):
function easy_access_ws_handler (line 1505) | async def easy_access_ws_handler(websocket, room: str = "default", page:...
function easy_access_ws_on_connect (line 1515) | def easy_access_ws_on_connect(websocket, room: str = "default"):
function easy_access_ws_on_close (line 1520) | def easy_access_ws_on_close(websocket, room: str = "default"):
class TypedDictRequestBody (line 1527) | class TypedDictRequestBody(TypedDict):
class TypedDictResponseBody (line 1532) | class TypedDictResponseBody(TypedDict):
function sync_typeddict_body (line 1538) | def sync_typeddict_body(data: TypedDictRequestBody) -> TypedDictResponse...
function async_typeddict_body (line 1544) | async def async_typeddict_body(data: TypedDictRequestBody) -> TypedDictR...
function sync_typeddict_with_request (line 1550) | def sync_typeddict_with_request(request: Request, data: TypedDictRequest...
function async_typeddict_with_request (line 1556) | async def async_typeddict_with_request(request: Request, data: TypedDict...
class UserCreate (line 1565) | class UserCreate(PydanticBaseModel):
class Address (line 1571) | class Address(PydanticBaseModel):
class UserWithAddress (line 1576) | class UserWithAddress(PydanticBaseModel):
function sync_pydantic_user (line 1582) | def sync_pydantic_user(user: UserCreate) -> dict:
function async_pydantic_user (line 1587) | async def async_pydantic_user(user: UserCreate):
function sync_pydantic_user_with_request (line 1591) | def sync_pydantic_user_with_request(request: Request, user: UserCreate):
function async_pydantic_user_with_request (line 1595) | async def async_pydantic_user_with_request(request: Request, user: UserC...
function sync_pydantic_nested (line 1599) | def sync_pydantic_nested(data: UserWithAddress) -> dict:
function async_pydantic_nested (line 1604) | async def async_pydantic_nested(data: UserWithAddress):
function sync_pydantic_user_put (line 1608) | def sync_pydantic_user_put(user: UserCreate):
function async_pydantic_user_put (line 1612) | async def async_pydantic_user_put(user: UserCreate):
function sync_pydantic_user_patch (line 1616) | def sync_pydantic_user_patch(user: UserCreate):
function async_pydantic_user_patch (line 1620) | async def async_pydantic_user_patch(user: UserCreate):
function sync_pydantic_user_delete (line 1624) | def sync_pydantic_user_delete(user: UserCreate):
function async_pydantic_user_delete (line 1628) | async def async_pydantic_user_delete(user: UserCreate):
function sync_pydantic_return_model (line 1632) | def sync_pydantic_return_model(user: UserCreate) -> UserCreate:
function async_pydantic_return_model (line 1637) | async def async_pydantic_return_model(user: UserCreate) -> UserCreate:
function sync_pydantic_return_list (line 1641) | def sync_pydantic_return_list(user: UserCreate) -> list[UserCreate]:
function async_pydantic_return_list (line 1646) | async def async_pydantic_return_list(user: UserCreate) -> list[UserCreate]:
function main (line 1650) | def main():
FILE: integration_tests/conftest.py
function spawn_process (line 15) | def spawn_process(command: List[str]) -> subprocess.Popen:
function kill_process (line 24) | def kill_process(process: subprocess.Popen) -> None:
function start_server (line 36) | def start_server(domain: str, port: int, is_dev: bool = False) -> subpro...
function session (line 76) | def session():
function default_session (line 86) | def default_session():
function global_session (line 95) | def global_session():
function dev_session (line 105) | def dev_session():
function test_session (line 117) | def test_session():
function env_file (line 129) | def env_file():
FILE: integration_tests/helpers/http_methods_helpers.py
function check_response (line 8) | def check_response(response: requests.Response, expected_status_code: int):
function get (line 19) | def get(
function post (line 40) | def post(
function json_post (line 64) | def json_post(
function multipart_post (line 88) | def multipart_post(
function put (line 110) | def put(
function patch (line 133) | def patch(
function delete (line 156) | def delete(
function head (line 179) | def head(
function generic_http_helper (line 204) | def generic_http_helper(
FILE: integration_tests/helpers/network_helpers.py
function get_network_host (line 5) | def get_network_host():
FILE: integration_tests/index.py
function h (line 7) | async def h():
FILE: integration_tests/random_number.rs
function say_hello (line 6) | fn say_hello() {
FILE: integration_tests/subroutes/__init__.py
function ws_handler (line 12) | async def ws_handler(websocket):
function connect (line 22) | async def connect(websocket):
function close (line 27) | async def close(websocket):
function get_foo (line 32) | def get_foo():
function post_foo (line 37) | def post_foo():
function put_foo (line 42) | def put_foo():
function delete_foo (line 47) | def delete_foo():
function patch_foo (line 52) | def patch_foo():
function option_foo (line 57) | def option_foo():
function trace_foo (line 62) | def trace_foo():
function head_foo (line 67) | def head_foo():
function sample_subrouter_openapi_endpoint (line 72) | def sample_subrouter_openapi_endpoint():
FILE: integration_tests/subroutes/di_subrouter.py
function sync_subrouter_route_dependency (line 11) | def sync_subrouter_route_dependency(r: Request, router_dependencies, glo...
function sync_subrouter_global_dependency (line 16) | def sync_subrouter_global_dependency(global_dependencies):
FILE: integration_tests/subroutes/file_api.py
function build_handler (line 18) | async def build_handler(request: Request):
FILE: integration_tests/test_add_route_without_decorator.py
function test_exception_handling (line 21) | def test_exception_handling(route: str, method: Callable):
FILE: integration_tests/test_app.py
function test_add_request_header (line 9) | def test_add_request_header():
function test_add_response_header (line 16) | def test_add_response_header():
function test_lifecycle_handlers (line 23) | def test_lifecycle_handlers():
function test_allow_cors (line 48) | def test_allow_cors():
FILE: integration_tests/test_authentication.py
function test_valid_authentication (line 10) | def test_valid_authentication(session, function_type: str):
function test_valid_authentication_trailing_slash (line 17) | def test_valid_authentication_trailing_slash(session, function_type: str):
function test_invalid_authentication_token (line 26) | def test_invalid_authentication_token(session, function_type: str):
function test_invalid_authentication_token_trailing_slash (line 38) | def test_invalid_authentication_token_trailing_slash(session, function_t...
function test_invalid_authentication_header (line 51) | def test_invalid_authentication_header(session, function_type: str):
function test_invalid_authentication_header_trailing_slash (line 63) | def test_invalid_authentication_header_trailing_slash(session, function_...
function test_invalid_authentication_no_token (line 75) | def test_invalid_authentication_no_token(session, function_type: str):
function test_invalid_authentication_no_token_trailing_slash (line 82) | def test_invalid_authentication_no_token_trailing_slash(session, functio...
FILE: integration_tests/test_base_url.py
function test_default_url_index_request (line 10) | def test_default_url_index_request(default_session):
function test_local_index_request (line 17) | def test_local_index_request(session):
function test_global_index_request (line 25) | def test_global_index_request(global_session):
FILE: integration_tests/test_basic_routes.py
function test_basic_get (line 36) | def test_basic_get(
function test_json_get (line 60) | def test_json_get(route: str, expected_json: dict, session):
function test_http_request_info_get (line 95) | def test_http_request_info_get(route: str, expected_json: dict, session):
FILE: integration_tests/test_binary_output.py
function test_binary_output (line 18) | def test_binary_output(route: str, text: str, session):
FILE: integration_tests/test_delete_requests.py
function test_delete (line 8) | def test_delete(function_type: str, session):
function test_delete_with_param (line 17) | def test_delete_with_param(function_type: str, session):
FILE: integration_tests/test_dependency_injection.py
function test_global_dependency_injection (line 7) | def test_global_dependency_injection():
function test_router_dependency_injection (line 14) | def test_router_dependency_injection():
function test_subrouter_global_dependency_injection (line 21) | def test_subrouter_global_dependency_injection():
function test_subrouter_router_dependency_injection (line 28) | def test_subrouter_router_dependency_injection():
FILE: integration_tests/test_easy_access_params.py
function test_easy_access_path_and_query_params (line 16) | def test_easy_access_path_and_query_params(session, function_type):
function test_easy_access_default_value (line 22) | def test_easy_access_default_value(session, function_type):
function test_easy_access_missing_required_param (line 28) | def test_easy_access_missing_required_param(session, function_type):
function test_easy_access_bad_type_coercion (line 35) | def test_easy_access_bad_type_coercion(session, function_type):
function test_easy_access_optional_present (line 45) | def test_easy_access_optional_present(session, function_type):
function test_easy_access_optional_missing (line 51) | def test_easy_access_optional_missing(session, function_type):
function test_easy_access_list_params (line 60) | def test_easy_access_list_params(session, function_type):
function test_easy_access_list_single_value (line 66) | def test_easy_access_list_single_value(session, function_type):
function test_easy_access_bool_true (line 75) | def test_easy_access_bool_true(session, function_type):
function test_easy_access_bool_false (line 81) | def test_easy_access_bool_false(session, function_type):
function test_easy_access_bool_default (line 87) | def test_easy_access_bool_default(session, function_type):
function test_easy_access_bool_numeric (line 93) | def test_easy_access_bool_numeric(session, function_type):
function test_easy_access_mixed_with_request (line 102) | def test_easy_access_mixed_with_request(session, function_type):
function test_easy_access_mixed_with_default (line 108) | def test_easy_access_mixed_with_default(session, function_type):
function test_easy_access_float (line 117) | def test_easy_access_float(session, function_type):
function test_easy_access_float_bad_value (line 123) | def test_easy_access_float_bad_value(session, function_type):
function test_easy_access_ws_with_params (line 131) | def test_easy_access_ws_with_params(session):
function test_easy_access_ws_with_defaults (line 143) | def test_easy_access_ws_with_defaults(session):
FILE: integration_tests/test_exception_handling.py
function test_exception_handling (line 20) | def test_exception_handling(
FILE: integration_tests/test_file_download.py
function test_file_download (line 8) | def test_file_download(function_type: str, session):
FILE: integration_tests/test_get_requests.py
function test_param (line 10) | def test_param(function_type: str, session):
function test_param_suffix (line 19) | def test_param_suffix(function_type: str, session):
function test_serve_html (line 28) | def test_serve_html(function_type: str, session):
function test_template (line 38) | def test_template(function_type: str, session):
function test_queries (line 49) | def test_queries(function_type: str, session):
function test_trailing_slash (line 58) | def test_trailing_slash(session):
function test_cookies (line 68) | def test_cookies(session, key, value):
function test_multiple_cookies (line 76) | def test_multiple_cookies(session):
function test_cookie_with_attributes (line 84) | def test_cookie_with_attributes(session):
function test_cookie_overwrite (line 101) | def test_cookie_overwrite(session):
FILE: integration_tests/test_json_types.py
function test_json_integer_type_preserved (line 7) | def test_json_integer_type_preserved(function_type: str, session):
function test_json_null_type_preserved (line 20) | def test_json_null_type_preserved(function_type: str, session):
function test_json_boolean_type_preserved (line 33) | def test_json_boolean_type_preserved(function_type: str, session):
function test_json_float_type_preserved (line 46) | def test_json_float_type_preserved(function_type: str, session):
function test_json_string_type_preserved (line 59) | def test_json_string_type_preserved(function_type: str, session):
function test_json_array_type_preserved (line 72) | def test_json_array_type_preserved(function_type: str, session):
function test_json_nested_object_type_preserved (line 85) | def test_json_nested_object_type_preserved(function_type: str, session):
function test_json_mixed_types_preserved (line 96) | def test_json_mixed_types_preserved(function_type: str, session):
function test_json_top_level_array_of_strings (line 126) | def test_json_top_level_array_of_strings(function_type: str, session):
function test_json_top_level_array_of_objects (line 137) | def test_json_top_level_array_of_objects(function_type: str, session):
function test_json_top_level_empty_array (line 148) | def test_json_top_level_empty_array(function_type: str, session):
function test_json_top_level_array_of_mixed_types (line 159) | def test_json_top_level_array_of_mixed_types(function_type: str, session):
function test_json_list_response_serialization (line 173) | def test_json_list_response_serialization(function_type: str, session):
function test_json_empty_list_response_serialization (line 199) | def test_json_empty_list_response_serialization(function_type: str, sess...
function test_json_list_primitives_response_serialization (line 210) | def test_json_list_primitives_response_serialization(function_type: str,...
function test_json_dict_response_auto_serialization (line 220) | def test_json_dict_response_auto_serialization(function_type: str, sessi...
FILE: integration_tests/test_middlewares.py
function test_middlewares (line 8) | def test_middlewares(function_type: str, session):
function test_global_middleware (line 19) | def test_global_middleware(session):
function test_response_in_before_middleware (line 28) | def test_response_in_before_middleware(session):
function test_global_middleware_applied_to_const_routes (line 45) | def test_global_middleware_applied_to_const_routes(route: str, session):
FILE: integration_tests/test_multipart_data.py
function test_form_data (line 8) | def test_form_data(function_type: str, session):
function test_multipart_file (line 15) | def test_multipart_file(function_type: str, session):
FILE: integration_tests/test_openapi.py
function test_custom_openapi_spec (line 8) | def test_custom_openapi_spec():
function test_docs_handler (line 27) | def test_docs_handler():
function test_json_handler (line 36) | def test_json_handler():
function test_add_openapi_path (line 53) | def test_add_openapi_path():
function test_add_subrouter_paths (line 74) | def test_add_subrouter_paths():
function test_openapi_request_body (line 95) | def test_openapi_request_body():
function test_openapi_response_body (line 159) | def test_openapi_response_body():
function test_openapi_query_params (line 198) | def test_openapi_query_params():
function test_openapi_json_body_typed (line 220) | def test_openapi_json_body_typed():
function test_openapi_json_body_bare (line 247) | def test_openapi_json_body_bare():
function test_openapi_pydantic_request_body (line 278) | def test_openapi_pydantic_request_body():
function test_openapi_pydantic_nested_model (line 318) | def test_openapi_pydantic_nested_model():
function test_openapi_pydantic_return_type (line 362) | def test_openapi_pydantic_return_type():
function test_openapi_pydantic_return_list_type (line 386) | def test_openapi_pydantic_return_list_type():
function test_openapi_typeddict_request_body (line 414) | def test_openapi_typeddict_request_body():
function test_openapi_typeddict_with_request (line 442) | def test_openapi_typeddict_with_request():
function test_typeddict_body_injection_sync (line 460) | def test_typeddict_body_injection_sync():
function test_typeddict_body_injection_async (line 474) | def test_typeddict_body_injection_async():
function test_typeddict_body_with_request_injection (line 487) | def test_typeddict_body_with_request_injection():
function test_typeddict_body_invalid_json (line 500) | def test_typeddict_body_invalid_json():
FILE: integration_tests/test_patch_requests.py
function test_patch (line 8) | def test_patch(function_type: str, session):
function test_patch_with_param (line 17) | def test_patch_with_param(function_type: str, session):
FILE: integration_tests/test_post_requests.py
function test_post (line 8) | def test_post(function_type: str, session):
function test_post_with_param (line 17) | def test_post_with_param(function_type: str, session):
FILE: integration_tests/test_put_requests.py
function test_put (line 8) | def test_put(function_type: str, session):
function test_put_with_param (line 17) | def test_put_with_param(function_type: str, session):
FILE: integration_tests/test_pydantic.py
function _raw_post (line 18) | def _raw_post(endpoint: str, data: str, content_type: str = "application...
function test_pydantic_valid_user_all_fields (line 27) | def test_pydantic_valid_user_all_fields(function_type: str, session):
function test_pydantic_default_field_applied (line 40) | def test_pydantic_default_field_applied(function_type: str, session):
function test_pydantic_string_to_int_coercion (line 53) | def test_pydantic_string_to_int_coercion(function_type: str, session):
function test_pydantic_extra_fields_ignored (line 65) | def test_pydantic_extra_fields_ignored(function_type: str, session):
function test_pydantic_missing_single_required_field (line 81) | def test_pydantic_missing_single_required_field(function_type: str, sess...
function test_pydantic_missing_all_required_fields (line 105) | def test_pydantic_missing_all_required_fields(function_type: str, session):
function test_pydantic_wrong_type_error_detail (line 129) | def test_pydantic_wrong_type_error_detail(function_type: str, session):
function test_pydantic_multiple_type_errors (line 151) | def test_pydantic_multiple_type_errors(function_type: str, session):
function test_pydantic_invalid_json_syntax (line 172) | def test_pydantic_invalid_json_syntax(function_type: str, session):
function test_pydantic_empty_body (line 181) | def test_pydantic_empty_body(function_type: str, session):
function test_pydantic_json_array_body (line 190) | def test_pydantic_json_array_body(function_type: str, session):
function test_pydantic_null_body (line 197) | def test_pydantic_null_body(function_type: str, session):
function test_pydantic_with_request_object (line 207) | def test_pydantic_with_request_object(function_type: str, session):
function test_pydantic_with_request_validation_still_works (line 219) | def test_pydantic_with_request_validation_still_works(function_type: str...
function test_pydantic_nested_model_valid (line 240) | def test_pydantic_nested_model_valid(function_type: str, session):
function test_pydantic_nested_model_missing_nested_fields (line 255) | def test_pydantic_nested_model_missing_nested_fields(function_type: str,...
function test_pydantic_nested_model_missing_entirely (line 282) | def test_pydantic_nested_model_missing_entirely(function_type: str, sess...
function test_pydantic_nested_model_wrong_type (line 301) | def test_pydantic_nested_model_wrong_type(function_type: str, session):
function test_pydantic_put_valid (line 325) | def test_pydantic_put_valid(function_type: str, session):
function test_pydantic_put_invalid (line 336) | def test_pydantic_put_invalid(function_type: str, session):
function test_pydantic_patch_valid (line 352) | def test_pydantic_patch_valid(function_type: str, session):
function test_pydantic_patch_invalid (line 363) | def test_pydantic_patch_invalid(function_type: str, session):
function test_pydantic_delete_valid (line 379) | def test_pydantic_delete_valid(function_type: str, session):
function test_pydantic_delete_invalid (line 390) | def test_pydantic_delete_invalid(function_type: str, session):
function test_pydantic_return_model_directly (line 406) | def test_pydantic_return_model_directly(function_type: str, session):
function test_pydantic_return_model_preserves_all_fields (line 422) | def test_pydantic_return_model_preserves_all_fields(function_type: str, ...
function test_pydantic_return_model_validation_still_works (line 435) | def test_pydantic_return_model_validation_still_works(function_type: str...
function test_pydantic_return_list_of_models (line 448) | def test_pydantic_return_list_of_models(function_type: str, session):
FILE: integration_tests/test_request_json.py
function test_request (line 16) | def test_request(route, body, expected_result):
FILE: integration_tests/test_split_request_params.py
function test_split_request_params_get_query_params (line 9) | def test_split_request_params_get_query_params(session, type_route, func...
function test_split_request_params_get_headers (line 21) | def test_split_request_params_get_headers(session, type_route, function_...
function test_split_request_params_get_path_params (line 29) | def test_split_request_params_get_path_params(session, type_route, funct...
function test_split_request_params_get_method (line 37) | def test_split_request_params_get_method(session, type_route, function_t...
function test_split_request_params_get_body (line 45) | def test_split_request_params_get_body(session, type_route, function_type):
function test_split_request_params_get_combined (line 53) | def test_split_request_params_get_combined(session, type_route, function...
function test_split_request_params_typed_untyped_post_combined (line 68) | def test_split_request_params_typed_untyped_post_combined(session, funct...
function test_split_request_params_get_combined_failure (line 83) | def test_split_request_params_get_combined_failure(session, function_type):
function test_json_body_bare (line 92) | def test_json_body_bare(session, function_type):
function test_json_body_typed (line 100) | def test_json_body_typed(session, function_type):
FILE: integration_tests/test_sse.py
function test_sse_basic_headers (line 11) | def test_sse_basic_headers(session):
function test_sse_basic_stream (line 23) | def test_sse_basic_stream(session):
function test_sse_formatted_messages (line 47) | def test_sse_formatted_messages(session):
function test_sse_json_data (line 77) | def test_sse_json_data(session):
function test_sse_named_events (line 104) | def test_sse_named_events(session):
function test_sse_async_endpoint (line 128) | def test_sse_async_endpoint(session):
function test_sse_single_message (line 152) | def test_sse_single_message(session):
function test_sse_empty_stream (line 175) | def test_sse_empty_stream(session):
function test_sse_custom_headers (line 197) | def test_sse_custom_headers(session):
function test_sse_custom_status_code (line 211) | def test_sse_custom_status_code(session):
function test_sse_middleware_compatibility (line 220) | def test_sse_middleware_compatibility(session):
function test_sse_message_formatter (line 228) | def test_sse_message_formatter():
function test_sse_message_edge_cases (line 262) | def test_sse_message_edge_cases():
function test_sse_response_classes (line 283) | def test_sse_response_classes():
function test_sse_error_handling (line 298) | def test_sse_error_handling():
function test_sse_http_methods (line 305) | def test_sse_http_methods():
function test_sse_streaming_sync_real_time (line 317) | def test_sse_streaming_sync_real_time(session):
function test_sse_streaming_async_real_time (line 359) | def test_sse_streaming_async_real_time(session):
function test_sse_optimization_headers (line 401) | def test_sse_optimization_headers(session):
function test_sse_message_optimization (line 420) | def test_sse_message_optimization():
FILE: integration_tests/test_static_files_with_api_routes.py
function test_post_api_route_with_root_static_files (line 18) | def test_post_api_route_with_root_static_files(session):
function test_static_file_still_served_correctly (line 28) | def test_static_file_still_served_correctly(session):
FILE: integration_tests/test_status_code.py
function test_404_status_code (line 8) | def test_404_status_code(session):
function test_404_not_found (line 13) | def test_404_not_found(session):
function test_202_status_code (line 19) | def test_202_status_code(session):
function test_sync_500_internal_server_error (line 25) | def test_sync_500_internal_server_error(function_type: str, session):
function test_404_not_found_content_type (line 33) | def test_404_not_found_content_type(session):
function test_500_error_content_type (line 43) | def test_500_error_content_type(function_type: str, session):
function test_405_method_not_allowed_content_type (line 51) | def test_405_method_not_allowed_content_type(session):
FILE: integration_tests/test_subrouter.py
function test_sub_router (line 12) | def test_sub_router(http_method_type, session):
function test_sub_router_head (line 18) | def test_sub_router_head(session):
function test_sub_router_web_socket (line 24) | def test_sub_router_web_socket(session):
FILE: integration_tests/test_web_sockets.py
function test_web_socket_raw_benchmark (line 10) | def test_web_socket_raw_benchmark(session):
function test_web_socket_json (line 33) | def test_web_socket_json(session):
function test_websocket_di (line 59) | def test_websocket_di(session):
function test_websocket_large_payload (line 78) | def test_websocket_large_payload(session):
function test_websocket_empty_returns (line 93) | def test_websocket_empty_returns(session):
FILE: noxfile.py
function tests (line 7) | def tests(session):
function lint (line 45) | def lint(session):
FILE: robyn/__init__.py
function _normalize_endpoint (line 32) | def _normalize_endpoint(endpoint: Optional[str], treat_empty_as_root: bo...
class BaseRobyn (line 76) | class BaseRobyn(ABC):
method __init__ (line 79) | def __init__(
method init_openapi (line 123) | def init_openapi(self, openapi_file_path: Optional[str]) -> None:
method _handle_dev_mode (line 137) | def _handle_dev_mode(self):
method add_route (line 149) | def add_route(
method inject (line 224) | def inject(self, **kwargs):
method inject_global (line 232) | def inject_global(self, **kwargs):
method before_request (line 241) | def before_request(self, endpoint: Optional[str] = None) -> Callable[....
method after_request (line 249) | def after_request(self, endpoint: Optional[str] = None) -> Callable[.....
method serve_directory (line 257) | def serve_directory(
method add_request_header (line 274) | def add_request_header(self, key: str, value: str) -> None:
method add_response_header (line 277) | def add_response_header(self, key: str, value: str) -> None:
method set_request_header (line 280) | def set_request_header(self, key: str, value: str) -> None:
method set_response_header (line 283) | def set_response_header(self, key: str, value: str) -> None:
method exclude_response_headers_for (line 286) | def exclude_response_headers_for(self, excluded_response_headers_paths...
method add_web_socket (line 293) | def add_web_socket(self, endpoint: str, handlers) -> None:
method websocket (line 296) | def websocket(self, endpoint: str):
method _add_event_handler (line 317) | def _add_event_handler(self, event_type: Events, handler: Callable) ->...
method startup_handler (line 325) | def startup_handler(self, handler: Callable) -> None:
method shutdown_handler (line 328) | def shutdown_handler(self, handler: Callable) -> None:
method is_port_in_use (line 331) | def is_port_in_use(self, port: int) -> bool:
method _add_openapi_routes (line 338) | def _add_openapi_routes(self, auth_required: bool = False):
method exception (line 364) | def exception(self, exception_handler: Callable):
method get (line 367) | def get(
method post (line 390) | def post(
method put (line 411) | def put(
method delete (line 432) | def delete(
method patch (line 453) | def patch(
method head (line 474) | def head(
method options (line 495) | def options(
method connect (line 516) | def connect(
method trace (line 537) | def trace(
method include_router (line 558) | def include_router(self, router: "SubRouter"):
method configure_authentication (line 588) | def configure_authentication(self, authentication_handler: Authenticat...
method mcp (line 598) | def mcp(self):
class Robyn (line 628) | class Robyn(BaseRobyn):
method start (line 629) | def start(self, host: str = "127.0.0.1", port: int = 8080, _check_port...
class SubRouter (line 684) | class SubRouter(BaseRobyn):
method __init__ (line 685) | def __init__(self, file_object: str, prefix: str = "", config: Config ...
method __add_prefix (line 689) | def __add_prefix(self, endpoint: str):
method get (line 708) | def get(self, endpoint: str, const: bool = False, auth_required: bool ...
method post (line 711) | def post(self, endpoint: str, auth_required: bool = False, openapi_nam...
method put (line 714) | def put(self, endpoint: str, auth_required: bool = False, openapi_name...
method delete (line 717) | def delete(self, endpoint: str, auth_required: bool = False, openapi_n...
method patch (line 720) | def patch(self, endpoint: str, auth_required: bool = False, openapi_na...
method head (line 723) | def head(self, endpoint: str, auth_required: bool = False, openapi_nam...
method trace (line 726) | def trace(self, endpoint: str, auth_required: bool = False, openapi_na...
method options (line 729) | def options(self, endpoint: str, auth_required: bool = False, openapi_...
method websocket (line 732) | def websocket(self, endpoint: str):
function ALLOW_CORS (line 739) | def ALLOW_CORS(app: Robyn, origins: Union[List[str], str], headers: Unio...
FILE: robyn/_param_utils.py
class QueryParamValidationError (line 21) | class QueryParamValidationError(Exception):
method __init__ (line 25) | def __init__(self, param_name: str, value: Optional[str], expected_typ...
function unwrap_optional (line 38) | def unwrap_optional(annotation) -> Tuple[Any, bool]:
function is_list_type (line 52) | def is_list_type(annotation) -> bool:
function get_list_element_type (line 58) | def get_list_element_type(annotation) -> type:
function coerce_value (line 66) | def coerce_value(value: str, target_type: type, param_name: str):
function resolve_individual_params (line 92) | def resolve_individual_params(
function parse_route_param_names (line 169) | def parse_route_param_names(endpoint: str) -> Set[str]:
FILE: robyn/ai.py
class AIConfig (line 17) | class AIConfig:
method __init__ (line 20) | def __init__(self, **kwargs):
method _load_from_env (line 24) | def _load_from_env(self):
method get (line 46) | def get(self, key: str, default: Any = None) -> Any:
method set (line 50) | def set(self, key: str, value: Any) -> None:
method update (line 54) | def update(self, **kwargs) -> None:
method to_dict (line 58) | def to_dict(self) -> Dict[str, Any]:
class MemoryProvider (line 63) | class MemoryProvider(ABC):
method store (line 67) | async def store(self, user_id: str, data: Dict[str, Any]) -> None:
method retrieve (line 72) | async def retrieve(self, user_id: str, query: Optional[str] = None) ->...
method clear (line 77) | async def clear(self, user_id: str) -> None:
class InMemoryProvider (line 82) | class InMemoryProvider(MemoryProvider):
method __init__ (line 85) | def __init__(self):
method store (line 88) | async def store(self, user_id: str, data: Dict[str, Any]) -> None:
method retrieve (line 93) | async def retrieve(self, user_id: str, query: Optional[str] = None) ->...
method clear (line 96) | async def clear(self, user_id: str) -> None:
class Memory (line 101) | class Memory:
method __init__ (line 104) | def __init__(self, provider: Union[str, MemoryProvider], user_id: str,...
method add (line 115) | async def add(self, message: str, metadata: Optional[Dict[str, Any]] =...
method get (line 120) | async def get(self, query: Optional[str] = None) -> List[Dict[str, Any]]:
method clear (line 124) | async def clear(self) -> None:
class AgentRunner (line 129) | class AgentRunner(ABC):
method run (line 133) | async def run(self, query: str, **kwargs) -> Dict[str, Any]:
class SimpleRunner (line 138) | class SimpleRunner(AgentRunner):
method __init__ (line 141) | def __init__(self, **config):
method _get_client (line 145) | def _get_client(self):
method run (line 156) | async def run(self, query: str, **kwargs) -> Dict[str, Any]:
class Agent (line 207) | class Agent:
method __init__ (line 210) | def __init__(self, runner: Union[str, AgentRunner], memory: Optional[M...
method run (line 221) | async def run(self, query: str, history: bool = False, **kwargs) -> Di...
function memory (line 244) | def memory(provider: str = "inmemory", user_id: str = "default", **kwarg...
function configure (line 259) | def configure(**kwargs) -> AIConfig:
function agent (line 279) | def agent(runner: str = "simple", memory: Optional[Memory] = None, confi...
FILE: robyn/argument_parser.py
class Config (line 5) | class Config:
method __init__ (line 6) | def __init__(self) -> None:
FILE: robyn/authentication.py
class AuthenticationNotConfiguredError (line 8) | class AuthenticationNotConfiguredError(Exception):
method __str__ (line 13) | def __str__(self):
class TokenGetter (line 17) | class TokenGetter(ABC):
method scheme (line 19) | def scheme(self) -> str:
method get_token (line 28) | def get_token(cls, request: Request) -> Optional[str]:
method set_token (line 39) | def set_token(cls, request: Request, token: str):
class AuthenticationHandler (line 49) | class AuthenticationHandler(ABC):
method __init__ (line 50) | def __init__(self, token_getter: TokenGetter):
method unauthorized_response (line 59) | def unauthorized_response(self) -> Response:
method authenticate (line 67) | def authenticate(self, request: Request) -> Optional[Identity]:
class BearerGetter (line 76) | class BearerGetter(TokenGetter):
method get_token (line 83) | def get_token(cls, request: Request) -> Optional[str]:
method set_token (line 95) | def set_token(cls, request: Request, token: str):
FILE: robyn/cli.py
function create_robyn_app (line 22) | def create_robyn_app():
function docs (line 77) | def docs():
function start_dev_server (line 82) | def start_dev_server(config: Config, file_path: Optional[str] = None):
function start_app_normally (line 94) | def start_app_normally(config: Config):
function run (line 104) | def run():
FILE: robyn/dependency_injection.py
class DependencyMap (line 6) | class DependencyMap:
method __init__ (line 7) | def __init__(self) -> None:
method add_router_dependency (line 12) | def add_router_dependency(self, router, **kwargs):
method add_global_dependency (line 24) | def add_global_dependency(self, **kwargs):
method get_router_dependencies (line 33) | def get_router_dependencies(self, router):
method get_global_dependencies (line 44) | def get_global_dependencies(self):
method merge_dependencies (line 52) | def merge_dependencies(self, target_router):
method get_dependency_map (line 67) | def get_dependency_map(self, router) -> dict:
FILE: robyn/env_populator.py
function parser (line 9) | def parser(config_path=None, project_root=""):
function load_vars (line 23) | def load_vars(variables=None, project_root=""):
FILE: robyn/events.py
class Events (line 4) | class Events(Enum):
FILE: robyn/exceptions.py
class HTTPException (line 4) | class HTTPException(Exception):
method __init__ (line 5) | def __init__(self, status_code: int, detail: str | None = None) -> None:
method __str__ (line 11) | def __str__(self) -> str:
method __repr__ (line 14) | def __repr__(self) -> str:
class WebSocketException (line 19) | class WebSocketException(Exception):
method __init__ (line 20) | def __init__(self, code: int, reason: str | None = None) -> None:
method __str__ (line 24) | def __str__(self) -> str:
method __repr__ (line 27) | def __repr__(self) -> str:
FILE: robyn/jsonify.py
function jsonify (line 6) | def jsonify(data: Union[Dict[str, Any], List[Any]]) -> str:
FILE: robyn/logger.py
class Colors (line 6) | class Colors(Enum):
class Logger (line 14) | class Logger:
method __init__ (line 20) | def __init__(self):
method _format_msg (line 23) | def _format_msg(
method error (line 39) | def error(
method warn (line 49) | def warn(
method info (line 59) | def info(
method debug (line 69) | def debug(
FILE: robyn/mcp.py
function _extract_uri_params (line 19) | def _extract_uri_params(uri: str) -> List[str]:
function _generate_schema_from_function (line 24) | def _generate_schema_from_function(func: Callable) -> Dict[str, Any]:
function _generate_prompt_args_from_function (line 60) | def _generate_prompt_args_from_function(func: Callable) -> List[Dict[str...
class MCPResource (line 76) | class MCPResource:
class MCPTool (line 86) | class MCPTool:
class MCPPrompt (line 95) | class MCPPrompt:
class MCPMessage (line 104) | class MCPMessage:
class MCPError (line 115) | class MCPError(Exception):
method __init__ (line 118) | def __init__(self, code: int, message: str, data: Optional[Any] = None):
class MCPHandler (line 125) | class MCPHandler:
method __init__ (line 128) | def __init__(self):
method register_resource (line 137) | def register_resource(self, uri: str, name: str, handler: Callable, de...
method register_tool (line 142) | def register_tool(self, name: str, handler: Callable, description: str...
method register_prompt (line 147) | def register_prompt(self, name: str, handler: Callable, description: s...
method handle_request (line 152) | async def handle_request(self, request_data: Dict[str, Any]) -> Dict[s...
method _handle_initialize (line 187) | async def _handle_initialize(self, params: Dict[str, Any]) -> Dict[str...
method _handle_list_resources (line 195) | async def _handle_list_resources(self, params: Dict[str, Any]) -> Dict...
method _match_uri_template (line 202) | def _match_uri_template(self, requested_uri: str) -> Optional[Tuple[st...
method _handle_read_resource (line 234) | async def _handle_read_resource(self, params: Dict[str, Any]) -> Dict[...
method _handle_list_tools (line 283) | async def _handle_list_tools(self, params: Dict[str, Any]) -> Dict[str...
method _handle_call_tool (line 290) | async def _handle_call_tool(self, params: Dict[str, Any]) -> Dict[str,...
method _handle_list_prompts (line 308) | async def _handle_list_prompts(self, params: Dict[str, Any]) -> Dict[s...
method _handle_get_prompt (line 315) | async def _handle_get_prompt(self, params: Dict[str, Any]) -> Dict[str...
class MCPApp (line 342) | class MCPApp:
method __init__ (line 345) | def __init__(self, robyn_app):
method _setup_routes (line 350) | def _setup_routes(self):
method resource (line 383) | def resource(self, uri: str = None, name: str = None, description: Opt...
method tool (line 411) | def tool(self, name: str = None, description: str = None, input_schema...
method prompt (line 437) | def prompt(self, name: str = None, description: str = None, arguments:...
FILE: robyn/openapi.py
class str_typed_dict (line 20) | class str_typed_dict(TypedDict):
class Contact (line 26) | class Contact:
class License (line 42) | class License:
class Server (line 56) | class Server:
class ExternalDocumentation (line 73) | class ExternalDocumentation:
class Components (line 87) | class Components:
class OpenAPIInfo (line 115) | class OpenAPIInfo:
class OpenAPI (line 143) | class OpenAPI:
method __post_init__ (line 155) | def __post_init__(self):
method add_openapi_path_obj (line 171) | def add_openapi_path_obj(self, route_type: str, endpoint: str, openapi...
method _merge_component_schemas (line 234) | def _merge_component_schemas(self, incoming: dict):
method add_subrouter_paths (line 251) | def add_subrouter_paths(self, subrouter_openapi: "OpenAPI"):
method get_path_obj (line 268) | def get_path_obj(
method get_openapi_type (line 376) | def get_openapi_type(self, typed_dict: str_typed_dict) -> str:
method get_schema_object (line 399) | def get_schema_object(self, parameter: str, param_type: Any) -> dict:
method override_openapi (line 460) | def override_openapi(self, openapi_json_spec_path: Path):
method get_openapi_docs_page (line 470) | def get_openapi_docs_page(self) -> Response:
method get_openapi_config (line 479) | def get_openapi_config(self) -> dict:
FILE: robyn/processpool.py
function run_processes (line 16) | def run_processes(
function init_processpool (line 72) | def init_processpool(
function initialize_event_loop (line 134) | def initialize_event_loop():
function spawn_process (line 150) | def spawn_process(
FILE: robyn/pydantic_support.py
function _ensure_pydantic (line 34) | def _ensure_pydantic():
function is_pydantic_available (line 50) | def is_pydantic_available() -> bool:
function is_pydantic_model (line 55) | def is_pydantic_model(annotation) -> bool:
function detect_pydantic_params (line 64) | def detect_pydantic_params(handler_params) -> dict:
function _sanitize_errors (line 86) | def _sanitize_errors(errors: list) -> list:
function validate_pydantic_body (line 116) | def validate_pydantic_body(model_class, body: Any) -> Tuple[Any, Optiona...
function get_pydantic_openapi_schema (line 140) | def get_pydantic_openapi_schema(model_class) -> Tuple[dict, dict]:
function serialize_pydantic_response (line 160) | def serialize_pydantic_response(res) -> Optional[str]:
class PydanticBodyValidationError (line 179) | class PydanticBodyValidationError(Exception):
method __init__ (line 183) | def __init__(self, error_detail: dict):
class PydanticNotInstalledError (line 188) | class PydanticNotInstalledError(ImportError):
method __init__ (line 192) | def __init__(self, handler_name: str, param_name: str, model_name: str):
class MultiplePydanticBodyError (line 200) | class MultiplePydanticBodyError(TypeError):
method __init__ (line 204) | def __init__(self, handler_name: str, param_names: list):
function check_pydantic_installed_for_handler (line 212) | def check_pydantic_installed_for_handler(handler, pydantic_params: dict):
FILE: robyn/reloader.py
function compile_rust_files (line 15) | def compile_rust_files(directory_path: str) -> List[str]:
function create_rust_file (line 52) | def create_rust_file(file_name: str) -> None:
function clean_rust_binaries (line 75) | def clean_rust_binaries(rust_binaries: List[str]) -> None:
function setup_reloader (line 81) | def setup_reloader(directory_path: str, file_path: str) -> None:
class EventHandler (line 115) | class EventHandler(FileSystemEventHandler):
method __init__ (line 116) | def __init__(self, file_path: str, directory_path: str) -> None:
method stop_server (line 124) | def stop_server(self) -> None:
method reload (line 128) | def reload(self) -> None:
method on_modified (line 152) | def on_modified(self, event) -> None:
FILE: robyn/responses.py
class FileResponse (line 9) | class FileResponse:
method __init__ (line 10) | def __init__(
function html (line 22) | def html(html: str) -> Response:
function serve_html (line 35) | def serve_html(file_path: str) -> FileResponse:
function serve_file (line 45) | def serve_file(file_path: str, file_name: Optional[str] = None) -> FileR...
class AsyncGeneratorWrapper (line 65) | class AsyncGeneratorWrapper:
method __init__ (line 68) | def __init__(self, async_gen: AsyncGenerator[str, None]):
method __iter__ (line 74) | def __iter__(self):
method __next__ (line 77) | def __next__(self):
method _init_async_iterator (line 93) | def _init_async_iterator(self):
method _get_next_value (line 106) | def _get_next_value(self):
class StreamingResponse (line 124) | class StreamingResponse:
method __init__ (line 125) | def __init__(
function SSEResponse (line 151) | def SSEResponse(
function SSEMessage (line 167) | def SSEMessage(data: str, event: Optional[str] = None, id: Optional[str]...
FILE: robyn/robyn.pyi
function get_version (line 7) | def get_version() -> str:
class SocketHeld (line 10) | class SocketHeld:
method __init__ (line 11) | def __init__(self, url: str, port: int):
method try_clone (line 13) | def try_clone(self) -> SocketHeld:
class MiddlewareType (line 16) | class MiddlewareType(Enum):
class HttpMethod (line 28) | class HttpMethod(Enum):
class FunctionInfo (line 55) | class FunctionInfo:
class Url (line 74) | class Url:
class Identity (line 89) | class Identity:
class QueryParams (line 92) | class QueryParams:
method set (line 100) | def set(self, key: str, value: str) -> None:
method get (line 111) | def get(self, key: str, default: Optional[str] = None) -> Optional[str]:
method empty (line 121) | def empty(self) -> bool:
method contains (line 128) | def contains(self, key: str) -> bool:
method get_first (line 138) | def get_first(self, key: str) -> Optional[str]:
method get_all (line 148) | def get_all(self, key: str) -> Optional[list[str]]:
method extend (line 157) | def extend(self, other: QueryParams) -> None:
method to_dict (line 166) | def to_dict(self) -> dict[str, list[str]]:
method __contains__ (line 173) | def __contains__(self, key: str) -> bool:
method __repr__ (line 176) | def __repr__(self) -> str:
class Cookie (line 180) | class Cookie:
method deleted (line 205) | def deleted() -> "Cookie":
class Cookies (line 214) | class Cookies:
method __init__ (line 217) | def __init__(self) -> None:
method set (line 220) | def set(self, name: str, cookie: Cookie) -> None:
method get (line 230) | def get(self, name: str) -> Optional[Cookie]:
method remove (line 239) | def remove(self, name: str) -> None:
method delete (line 248) | def delete(self, name: str) -> None:
method is_empty (line 258) | def is_empty(self) -> bool:
method keys (line 265) | def keys(self) -> list[str]:
method __setitem__ (line 272) | def __setitem__(self, name: str, cookie: Cookie) -> None:
method __getitem__ (line 275) | def __getitem__(self, name: str) -> Optional[Cookie]:
method __contains__ (line 278) | def __contains__(self, name: str) -> bool:
method __len__ (line 281) | def __len__(self) -> int:
method __iter__ (line 284) | def __iter__(self) -> "CookiesIter":
method __repr__ (line 287) | def __repr__(self) -> str:
class CookiesIter (line 290) | class CookiesIter:
method __iter__ (line 293) | def __iter__(self) -> "CookiesIter":
method __next__ (line 296) | def __next__(self) -> str:
class Headers (line 299) | class Headers:
method __init__ (line 300) | def __init__(self, default_headers: Optional[dict]) -> None:
method __getitem__ (line 303) | def __getitem__(self, key: str) -> Optional[str]:
method __setitem__ (line 306) | def __setitem__(self, key: str, value: str) -> None:
method set (line 309) | def set(self, key: str, value: str) -> None:
method get (line 320) | def get(self, key: str) -> Optional[str]:
method populate_from_dict (line 329) | def populate_from_dict(self, headers: dict[str, str]) -> None:
method contains (line 338) | def contains(self, key: str) -> bool:
method append (line 348) | def append(self, key: str, value: str) -> None:
method is_empty (line 358) | def is_empty(self) -> bool:
class Request (line 366) | class Request:
method json (line 394) | def json(self) -> Union[dict, list]:
class Response (line 414) | class Response:
method set_cookie (line 434) | def set_cookie(
class Server (line 463) | class Server:
method __init__ (line 469) | def __init__(self) -> None:
method add_directory (line 471) | def add_directory(
method apply_request_headers (line 479) | def apply_request_headers(self, headers: Headers) -> None:
method apply_response_headers (line 481) | def apply_response_headers(self, headers: Headers) -> None:
method set_response_headers_exclude_paths (line 483) | def set_response_headers_exclude_paths(self, excluded_response_headers...
method add_route (line 486) | def add_route(
method add_global_middleware (line 494) | def add_global_middleware(self, middleware_type: MiddlewareType, funct...
method add_middleware_route (line 496) | def add_middleware_route(
method add_startup_handler (line 504) | def add_startup_handler(self, function: FunctionInfo) -> None:
method add_shutdown_handler (line 506) | def add_shutdown_handler(self, function: FunctionInfo) -> None:
method add_web_socket_route (line 508) | def add_web_socket_route(
method start (line 517) | def start(self, socket: SocketHeld, workers: int, client_timeout: int,...
class WebSocketConnector (line 520) | class WebSocketConnector:
method async_broadcast (line 537) | async def async_broadcast(self, message: str) -> None:
method async_send_to (line 545) | async def async_send_to(self, sender_id: str, message: str) -> None:
method sync_broadcast (line 554) | def sync_broadcast(self, message: str) -> None:
method sync_send_to (line 562) | def sync_send_to(self, sender_id: str, message: str) -> None:
method close (line 571) | def close(self) -> None:
FILE: robyn/router.py
function lower_http_method (line 28) | def lower_http_method(method: HttpMethod):
class Route (line 32) | class Route(NamedTuple):
class RouteMiddleware (line 42) | class RouteMiddleware(NamedTuple):
class GlobalMiddleware (line 49) | class GlobalMiddleware(NamedTuple):
class BaseRouter (line 54) | class BaseRouter(ABC):
method add_route (line 56) | def add_route(*args) -> Union[Callable, CoroutineType, Dict]: ...
class Router (line 59) | class Router(BaseRouter):
method __init__ (line 60) | def __init__(self) -> None:
method _format_tuple_response (line 64) | def _format_tuple_response(self, res: tuple) -> Response:
method _format_response (line 80) | def _format_response(
method add_route (line 130) | def add_route( # type: ignore
method prepare_routes_openapi (line 356) | def prepare_routes_openapi(self, openapi: OpenAPI, included_routers: L...
method get_routes (line 365) | def get_routes(self) -> List[Route]:
class MiddlewareRouter (line 369) | class MiddlewareRouter(BaseRouter):
method __init__ (line 370) | def __init__(self, dependencies: DependencyMap = DependencyMap()) -> N...
method set_authentication_handler (line 377) | def set_authentication_handler(self, authentication_handler: Authentic...
method add_route (line 380) | def add_route( # type: ignore
method add_auth_middleware (line 407) | def add_auth_middleware(self, endpoint: str, route_type: HttpMethod):
method add_middleware (line 440) | def add_middleware(self, middleware_type: MiddlewareType, endpoint: Op...
method get_route_middlewares (line 512) | def get_route_middlewares(self) -> List[RouteMiddleware]:
method get_global_middlewares (line 515) | def get_global_middlewares(self) -> List[GlobalMiddleware]:
class WebSocketRouter (line 519) | class WebSocketRouter(BaseRouter):
method __init__ (line 520) | def __init__(self) -> None:
method add_route (line 524) | def add_route(self, endpoint: str, handlers: dict) -> None: # type: i...
method get_routes (line 527) | def get_routes(self) -> Dict[str, dict]:
FILE: robyn/scaffold/mongo/app.py
function index (line 12) | def index():
function get_users (line 18) | async def get_users():
function add_user (line 25) | async def add_user(request):
function get_user (line 33) | async def get_user(request):
FILE: robyn/scaffold/no-db/app.py
function index (line 7) | def index():
FILE: robyn/scaffold/postgres/app.py
function get_users (line 18) | def get_users():
function index (line 26) | def index():
FILE: robyn/scaffold/prisma/app.py
function startup_handler (line 11) | async def startup_handler() -> None:
function shutdown_handler (line 16) | async def shutdown_handler() -> None:
function h (line 22) | async def h():
FILE: robyn/scaffold/sqlalchemy/app.py
function index (line 7) | def index():
FILE: robyn/scaffold/sqlalchemy/models.py
class User (line 10) | class User(Base):
FILE: robyn/scaffold/sqlite/app.py
function index (line 9) | def index():
FILE: robyn/scaffold/sqlmodel/app.py
function index (line 12) | def index():
function create (line 17) | def create():
function insert (line 23) | def insert():
function get_data (line 37) | def get_data():
FILE: robyn/scaffold/sqlmodel/models.py
class Hero (line 6) | class Hero(SQLModel, table=True):
FILE: robyn/templating.py
class TemplateInterface (line 10) | class TemplateInterface(ABC):
method __init__ (line 11) | def __init__(self): ...
method render_template (line 14) | def render_template(self, *args, **kwargs) -> Response: ...
class JinjaTemplate (line 17) | class JinjaTemplate(TemplateInterface):
method __init__ (line 18) | def __init__(self, directory, encoding="utf-8", followlinks=False):
method render_template (line 21) | def render_template(self, template_name, **kwargs) -> Response:
FILE: robyn/types.py
class Directory (line 8) | class Directory:
method as_list (line 14) | def as_list(self):
class JSONResponse (line 30) | class JSONResponse(TypedDict):
class Body (line 38) | class Body:
class JsonBody (line 46) | class JsonBody:
FILE: robyn/ws.py
class WebSocketDisconnect (line 15) | class WebSocketDisconnect(Exception):
method __init__ (line 18) | def __init__(self, code: int = 1000, reason: str = ""):
class WebSocketAdapter (line 24) | class WebSocketAdapter:
method __init__ (line 32) | def __init__(self, websocket_connector: WebSocketConnector, channel=No...
method receive_text (line 36) | async def receive_text(self) -> str:
method receive_bytes (line 46) | async def receive_bytes(self) -> bytes:
method receive_json (line 51) | async def receive_json(self):
method send_text (line 57) | async def send_text(self, data: str):
method send_bytes (line 61) | async def send_bytes(self, data: bytes):
method send_json (line 65) | async def send_json(self, data):
method broadcast (line 69) | async def broadcast(self, data: str):
method close (line 73) | async def close(self):
method id (line 78) | def id(self) -> str:
method query_params (line 83) | def query_params(self):
function create_websocket_decorator (line 92) | def create_websocket_decorator(app_instance):
FILE: src/asyncio.rs
function contextvars (line 7) | fn contextvars(py: Python<'_>) -> PyResult<&Bound<'_, PyAny>> {
function empty_context (line 14) | pub(crate) fn empty_context(py: Python<'_>) -> PyResult<&Bound<'_, PyAny...
function copy_context (line 26) | pub(crate) fn copy_context(py: Python) -> PyResult<Py<PyAny>> {
FILE: src/blocking.rs
type BlockingTask (line 8) | pub(crate) struct BlockingTask {
method new (line 14) | pub fn new<T>(inner: T) -> BlockingTask
method run (line 24) | pub fn run(self, py: Python) {
type BlockingRunner (line 29) | pub(crate) enum BlockingRunner {
method new (line 36) | pub fn new(max_threads: usize, idle_timeout: u64) -> Self {
method run (line 45) | pub fn run<T>(&self, task: T) -> Result<(), channel::SendError<Blockin...
type BlockingRunnerMono (line 57) | pub(crate) struct BlockingRunnerMono {
method new (line 62) | pub fn new() -> Self {
method run (line 71) | pub fn run<T>(&self, task: T) -> Result<(), channel::SendError<Blockin...
type BlockingRunnerPool (line 79) | pub(crate) struct BlockingRunnerPool {
method new (line 91) | pub fn new(max_threads: usize, idle_timeout: u64) -> Self {
method spawn_thread (line 111) | fn spawn_thread(&self) {
method run (line 146) | pub fn run<T>(&self, task: T) -> Result<(), channel::SendError<Blockin...
function blocking_worker (line 158) | fn blocking_worker(queue: channel::Receiver<BlockingTask>) {
function blocking_worker_idle (line 166) | fn blocking_worker_idle(queue: channel::Receiver<BlockingTask>, timeout:...
FILE: src/callbacks.rs
type PyEmptyAwaitable (line 8) | pub(crate) struct PyEmptyAwaitable;
method __await__ (line 12) | fn __await__(pyself: PyRef<'_, Self>) -> PyRef<'_, Self> {
method __iter__ (line 16) | fn __iter__(pyself: PyRef<'_, Self>) -> PyRef<'_, Self> {
method __next__ (line 20) | fn __next__(&self) -> Option<()> {
type PyDoneAwaitable (line 26) | pub(crate) struct PyDoneAwaitable {
method new (line 31) | pub(crate) fn new(result: PyResult<Py<PyAny>>) -> Self {
method __await__ (line 38) | fn __await__(pyself: PyRef<'_, Self>) -> PyRef<'_, Self> {
method __iter__ (line 42) | fn __iter__(pyself: PyRef<'_, Self>) -> PyRef<'_, Self> {
method __next__ (line 46) | fn __next__(&self, py: Python) -> PyResult<Py<PyAny>> {
type PyErrAwaitable (line 55) | pub(crate) struct PyErrAwaitable {
method new (line 60) | pub(crate) fn new(err: PyErr) -> Self {
method __await__ (line 67) | fn __await__(pyself: PyRef<'_, Self>) -> PyRef<'_, Self> {
method __iter__ (line 71) | fn __iter__(pyself: PyRef<'_, Self>) -> PyRef<'_, Self> {
method __next__ (line 75) | fn __next__(&self, py: Python) -> PyResult<()> {
type PyIterAwaitable (line 81) | pub(crate) struct PyIterAwaitable {
method new (line 86) | pub(crate) fn new() -> Self {
method set_result (line 93) | pub(crate) fn set_result(pyself: Py<Self>, py: Python, result: FutureR...
method __await__ (line 104) | fn __await__(pyself: PyRef<'_, Self>) -> PyRef<'_, Self> {
method __iter__ (line 108) | fn __iter__(pyself: PyRef<'_, Self>) -> PyRef<'_, Self> {
method __next__ (line 112) | fn __next__(&self, py: Python) -> PyResult<Option<Py<PyAny>>> {
type PyFutureAwaitableState (line 125) | enum PyFutureAwaitableState {
type PyFutureAwaitable (line 132) | pub(crate) struct PyFutureAwaitable {
method new (line 143) | pub(crate) fn new(event_loop: Py<PyAny>) -> Self {
method to_spawn (line 155) | pub fn to_spawn(self, py: Python) -> PyResult<(Py<PyFutureAwaitable>, ...
method set_result (line 160) | pub(crate) fn set_result(pyself: Py<Self>, py: Python, result: FutureR...
method __await__ (line 197) | fn __await__(pyself: PyRef<'_, Self>) -> PyRef<'_, Self> {
method __iter__ (line 200) | fn __iter__(pyself: PyRef<'_, Self>) -> PyRef<'_, Self> {
method __next__ (line 204) | fn __next__(pyself: PyRef<'_, Self>) -> PyResult<Option<PyRef<'_, Self...
method get_block (line 220) | fn get_block(&self) -> bool {
method set_block (line 225) | fn set_block(&self, val: bool) {
method get_loop (line 229) | fn get_loop(&self, py: Python) -> Py<PyAny> {
method add_done_callback (line 237) | fn add_done_callback(
method remove_done_callback (line 267) | fn remove_done_callback(&self, cb: Py<PyAny>) -> i32 {
method cancel (line 279) | fn cancel(pyself: PyRef<'_, Self>, msg: Option<Py<PyAny>>) -> bool {
method done (line 317) | fn done(&self) -> bool {
method result (line 321) | fn result(&self, py: Python) -> PyResult<Py<PyAny>> {
method exception (line 346) | fn exception(&self, py: Python) -> PyResult<Py<PyAny>> {
type PyFutureDoneCallback (line 373) | pub(crate) struct PyFutureDoneCallback {
method __call__ (line 379) | pub fn __call__(&self, fut: Bound<PyAny>) -> PyResult<()> {
type PyFutureResultSetter (line 397) | pub(crate) struct PyFutureResultSetter;
method __call__ (line 401) | pub fn __call__(&self, target: Bound<PyAny>, value: Bound<PyAny>) {
FILE: src/conversion.rs
type FutureResultToPy (line 4) | pub(crate) enum FutureResultToPy {
type Target (line 11) | type Target = PyAny;
type Output (line 12) | type Output = Bound<'p, Self::Target>;
type Error (line 13) | type Error = PyErr;
method into_pyobject (line 15) | fn into_pyobject(self, py: Python<'p>) -> Result<Self::Output, Self::E...
FILE: src/executors/mod.rs
function get_function_output (line 19) | fn get_function_output<'a, T>(
function execute_middleware_function (line 68) | pub async fn execute_middleware_function<T>(
function get_function_output_with_two_args (line 110) | fn get_function_output_with_two_args<'a, T, U>(
function execute_after_middleware_function (line 181) | pub async fn execute_after_middleware_function(
function execute_http_function (line 220) | pub async fn execute_http_function(
function extract_response_type (line 241) | fn extract_response_type(output: Py<PyAny>, py: Python) -> PyResult<Resp...
function extract_response_type_bound (line 255) | fn extract_response_type_bound(output: pyo3::Bound<'_, pyo3::PyAny>) -> ...
function execute_startup_handler (line 267) | pub async fn execute_startup_handler(
FILE: src/executors/web_socket_executors.rs
function execute_ws_function (line 9) | pub fn execute_ws_function(
FILE: src/io_helpers/mod.rs
function apply_hashmap_headers (line 12) | pub fn apply_hashmap_headers(response: &mut HttpResponseBuilder, headers...
function read_file (line 28) | pub fn read_file(file_path: &str) -> Result<Vec<u8>> {
FILE: src/lib.rs
function get_version (line 33) | fn get_version() -> String {
function robyn (line 38) | pub fn robyn(_py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> {
FILE: src/routers/const_router.rs
type CachedResponse (line 25) | pub struct CachedResponse {
method from_response (line 33) | fn from_response(response: &Response) -> Self {
method to_http_response (line 57) | pub fn to_http_response(&self) -> HttpResponse {
method to_http_response_without_global_headers (line 66) | pub fn to_http_response_without_global_headers(&self) -> HttpResponse {
type RouteMap (line 75) | type RouteMap = RwLock<MatchItRouter<CachedResponse>>;
type FastMap (line 79) | type FastMap = RwLock<HashMap<String, CachedResponse>>;
type ConstRouter (line 81) | pub struct ConstRouter {
method add_route (line 87) | fn add_route<'py>(
method get_route (line 129) | fn get_route(&self, route_method: &HttpMethod, route: &str) -> Option<...
method new (line 147) | pub fn new() -> Self {
method bake_global_headers (line 172) | pub fn bake_global_headers(&self, global_headers: &Headers) {
method get_cached_route (line 203) | pub fn get_cached_route(
FILE: src/routers/http_router.rs
type RouteMap (line 13) | type RouteMap = RwLock<MatchItRouter<FunctionInfo>>;
type HttpRouter (line 16) | pub struct HttpRouter {
method add_route (line 21) | fn add_route<'py>(
method get_route (line 37) | fn get_route(
method new (line 62) | pub fn new() -> Self {
FILE: src/routers/middleware_router.rs
type RouteMap (line 12) | type RouteMap = RwLock<MatchItRouter<FunctionInfo>>;
type MiddlewareRouter (line 14) | pub struct MiddlewareRouter {
method add_route (line 21) | fn add_route<'py>(
method get_route (line 37) | fn get_route(
method new (line 58) | pub fn new() -> Self {
method add_global_middleware (line 78) | pub fn add_global_middleware(
method get_global_middlewares (line 93) | pub fn get_global_middlewares(&self, middleware_type: &MiddlewareType)...
method has_any_middleware (line 102) | pub fn has_any_middleware(&self) -> bool {
FILE: src/routers/mod.rs
type Router (line 11) | pub trait Router<T, U> {
method add_route (line 14) | fn add_route<'py>(
method get_route (line 24) | fn get_route(&self, route_type: &U, route: &str) -> Option<T>;
FILE: src/routers/web_socket_router.rs
type WebSocketRoutes (line 9) | type WebSocketRoutes = RwLock<HashMap<String, HashMap<String, FunctionIn...
type WebSocketRouter (line 11) | pub struct WebSocketRouter {
method new (line 16) | pub fn new() -> Self {
method get_web_socket_map (line 23) | pub fn get_web_socket_map(&self) -> &WebSocketRoutes {
method add_websocket_route (line 27) | pub fn add_websocket_route(
FILE: src/runtime.rs
type JoinError (line 15) | pub trait JoinError {
method is_panic (line 17) | fn is_panic(&self) -> bool;
method is_panic (line 101) | fn is_panic(&self) -> bool {
type Runtime (line 20) | pub trait Runtime: Send + 'static {
method spawn (line 24) | fn spawn<F>(&self, fut: F) -> Self::JoinHandle
method spawn_blocking (line 28) | fn spawn_blocking<F>(&self, task: F)
type JoinError (line 107) | type JoinError = tokio::task::JoinError;
type JoinHandle (line 108) | type JoinHandle = JoinHandle<()>;
method spawn (line 110) | fn spawn<F>(&self, fut: F) -> Self::JoinHandle
method spawn_blocking (line 118) | fn spawn_blocking<F>(&self, task: F)
type ContextExt (line 33) | pub trait ContextExt: Runtime {
method py_event_loop (line 34) | fn py_event_loop(&self, py: Python) -> Py<PyAny>;
method py_event_loop (line 127) | fn py_event_loop(&self, py: Python) -> Py<PyAny> {
type RuntimeWrapper (line 37) | pub(crate) struct RuntimeWrapper {
method new (line 44) | pub fn new(
method with_runtime (line 57) | pub fn with_runtime(
method handler (line 70) | pub fn handler(&self) -> RuntimeRef {
type RuntimeRef (line 80) | pub struct RuntimeRef {
method new (line 87) | pub fn new(
function default_runtime (line 132) | fn default_runtime(blocking_threads: usize) -> tokio::runtime::Runtime {
function empty_future_into_py (line 141) | pub(crate) fn empty_future_into_py(py: Python) -> PyResult<Bound<PyAny>> {
function done_future_into_py (line 146) | pub(crate) fn done_future_into_py(
function err_future_into_py (line 154) | pub(crate) fn err_future_into_py(py: Python, err: PyErr) -> PyResult<Bou...
function future_into_py_iter (line 160) | pub(crate) fn future_into_py_iter<R, F>(rt: R, py: Python, fut: F) -> Py...
function future_into_py_futlike (line 180) | pub(crate) fn future_into_py_futlike<R, F>(rt: R, py: Python, fut: F) ->...
function future_into_py_futlike (line 203) | pub(crate) fn future_into_py_futlike<R, F>(rt: R, py: Python, fut: F) ->...
function shared_blocking_runner (line 278) | fn shared_blocking_runner() -> Arc<BlockingRunner> {
function future_into_py (line 284) | pub fn future_into_py<F>(py: Python, fut: F) -> PyResult<Bound<PyAny>>
FILE: src/server.rs
constant MAX_PAYLOAD_SIZE (line 39) | const MAX_PAYLOAD_SIZE: &str = "ROBYN_MAX_PAYLOAD_SIZE";
constant DEFAULT_MAX_PAYLOAD_SIZE (line 40) | const DEFAULT_MAX_PAYLOAD_SIZE: usize = 1_000_000;
type Directory (line 45) | struct Directory {
type Server (line 53) | pub struct Server {
method new (line 69) | pub fn new() -> Self {
method start (line 84) | pub fn start(
method add_directory (line 315) | pub fn add_directory(
method remove_header (line 332) | pub fn remove_header(&self, key: &str) {
method remove_response_header (line 338) | pub fn remove_response_header(&self, key: &str) {
method apply_request_headers (line 342) | pub fn apply_request_headers(&mut self, headers: &Headers) {
method apply_response_headers (line 346) | pub fn apply_response_headers(&mut self, headers: &Headers) {
method set_response_headers_exclude_paths (line 350) | pub fn set_response_headers_exclude_paths(
method add_route (line 359) | pub fn add_route(
method _add_route (line 370) | fn _add_route(
method add_global_middleware (line 409) | pub fn add_global_middleware(&self, middleware_type: &MiddlewareType, ...
method add_middleware_route (line 417) | pub fn add_middleware_route(
method add_web_socket_route (line 447) | pub fn add_web_socket_route(
method add_startup_handler (line 459) | pub fn add_startup_handler(&mut self, function: FunctionInfo) {
method add_shutdown_handler (line 464) | pub fn add_shutdown_handler(&mut self, function: FunctionInfo) {
method default (line 470) | fn default() -> Self {
function index (line 475) | async fn index(
function get_traceback (line 625) | fn get_traceback(error: &PyErr) -> String {
FILE: src/shared_socket.rs
type SocketHeld (line 8) | pub struct SocketHeld {
method new (line 15) | pub fn new(ip: String, port: u16) -> PyResult<SocketHeld> {
method try_clone (line 34) | pub fn try_clone(&self) -> PyResult<SocketHeld> {
method get_socket (line 41) | pub fn get_socket(&self) -> Socket {
FILE: src/types/cookie.rs
type CookieError (line 9) | pub enum CookieError {
method fmt (line 14) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
function parse_same_site (line 24) | fn parse_same_site(value: &str) -> Result<SameSite, CookieError> {
type Cookie (line 39) | pub struct Cookie {
method new (line 62) | pub fn new(
method deleted (line 86) | pub fn deleted() -> Self {
method __repr__ (line 99) | fn __repr__(&self) -> String {
method to_header_value (line 114) | pub fn to_header_value(&self, name: &str) -> Result<String, CookieErro...
type Cookies (line 148) | pub struct Cookies {
method new (line 155) | pub fn new() -> Self {
method set (line 162) | pub fn set(&mut self, name: String, cookie: Cookie) {
method get (line 167) | pub fn get(&self, name: String) -> Option<Cookie> {
method remove (line 172) | pub fn remove(&mut self, name: &str) {
method delete (line 178) | pub fn delete(&mut self, name: String) {
method is_empty (line 183) | pub fn is_empty(&self) -> bool {
method len (line 188) | pub fn len(&self) -> usize {
method keys (line 193) | pub fn keys(&self) -> Vec<String> {
method __setitem__ (line 197) | pub fn __setitem__(&mut self, name: String, cookie: Cookie) {
method __getitem__ (line 201) | pub fn __getitem__(&self, name: String) -> Option<Cookie> {
method __contains__ (line 205) | pub fn __contains__(&self, name: String) -> bool {
method __len__ (line 209) | pub fn __len__(&self) -> usize {
method __iter__ (line 213) | pub fn __iter__(slf: PyRef<'_, Self>) -> CookiesIter {
method __repr__ (line 220) | fn __repr__(&self) -> String {
type CookiesIter (line 227) | pub struct CookiesIter {
method __iter__ (line 234) | fn __iter__(slf: PyRef<'_, Self>) -> PyRef<'_, Self> {
method __next__ (line 238) | fn __next__(mut slf: PyRefMut<'_, Self>) -> Option<String> {
FILE: src/types/function_info.rs
type MiddlewareType (line 10) | pub enum MiddlewareType {
method __hash__ (line 20) | pub fn __hash__(&self) -> u64 {
type FunctionInfo (line 29) | pub struct FunctionInfo {
method new (line 45) | pub fn new(
method clone (line 63) | fn clone(&self) -> Self {
FILE: src/types/headers.rs
type Headers (line 10) | pub struct Headers {
method new (line 17) | pub fn new(default_headers: Option<&Bound<'_, PyDict>>) -> Self {
method set (line 42) | pub fn set(&mut self, key: String, value: String) {
method append (line 46) | pub fn append(&mut self, key: String, value: String) {
method get_all (line 53) | pub fn get_all(&self, py: Python, key: String) -> Py<PyList> {
method get (line 68) | pub fn get(&self, key: String) -> Option<String> {
method get_headers (line 80) | pub fn get_headers(&self, py: Python) -> Py<PyDict> {
method contains (line 97) | pub fn contains(&self, key: String) -> bool {
method populate_from_dict (line 101) | pub fn populate_from_dict(&mut self, headers: &Bound<PyDict>) {
method is_empty (line 116) | pub fn is_empty(&self) -> bool {
method __eq__ (line 120) | fn __eq__(&self, other: &Headers) -> bool {
method __contains__ (line 146) | pub fn __contains__(&self, key: String) -> bool {
method __repr__ (line 150) | pub fn __repr__(&self) -> String {
method __setitem__ (line 154) | pub fn __setitem__(&mut self, key: String, value: String) {
method __getitem__ (line 158) | pub fn __getitem__(&self, key: String) -> Option<String> {
method remove (line 164) | pub fn remove(&mut self, key: &str) {
method clear (line 168) | pub fn clear(&mut self) {
method extend (line 172) | pub fn extend(&mut self, headers: &Headers) {
method from_actix_headers (line 180) | pub fn from_actix_headers(req_headers: &HeaderMap) -> Self {
FILE: src/types/identity.rs
type Identity (line 7) | pub struct Identity {
method new (line 15) | pub fn new(claims: HashMap<String, String>) -> Self {
FILE: src/types/mod.rs
type MiddlewareReturn (line 17) | pub enum MiddlewareReturn {
type HttpMethod (line 25) | pub enum HttpMethod {
method is_supported (line 38) | pub fn is_supported(method: &actix_web::http::Method) -> bool {
method from_actix_method (line 53) | pub fn from_actix_method(method: &actix_web::http::Method) -> Result<S...
method fmt (line 71) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
type Url (line 88) | pub struct Url {
method new (line 100) | pub fn new(scheme: &str, host: &str, path: &str) -> Self {
function get_body_from_pyobject (line 109) | pub fn get_body_from_pyobject(body: &Bound<'_, PyAny>) -> PyResult<Vec<u...
function get_description_from_pyobject (line 120) | pub fn get_description_from_pyobject(description: &Bound<'_, PyAny>) -> ...
function check_body_type (line 131) | pub fn check_body_type(py: Python, body: &Py<PyAny>) -> PyResult<()> {
function check_description_type (line 140) | pub fn check_description_type(py: Python, body: &Py<PyAny>) -> PyResult<...
FILE: src/types/multimap.rs
type QueryParams (line 9) | pub struct QueryParams {
method new (line 16) | pub fn new() -> Self {
method set (line 22) | pub fn set(&mut self, key: String, value: String) {
method get (line 28) | pub fn get(&self, key: String, default: Option<String>) -> Option<Stri...
method get_first (line 35) | pub fn get_first(&self, key: String) -> Option<String> {
method empty (line 42) | pub fn empty(&self) -> bool {
method contains (line 46) | pub fn contains(&self, key: String) -> bool {
method get_all (line 50) | pub fn get_all(&self, key: String) -> Option<Vec<String>> {
method extend (line 54) | pub fn extend(&mut self, other: &mut Self) {
method to_dict (line 62) | pub fn to_dict(&self, py: Python) -> PyResult<Py<PyDict>> {
method __contains__ (line 71) | pub fn __contains__(&self, key: String) -> bool {
method __repr__ (line 75) | pub fn __repr__(&self) -> String {
method from_hashmap (line 81) | pub fn from_hashmap(map: HashMap<String, Vec<String>>) -> Self {
method from_py_dict (line 91) | pub fn from_py_dict(py: Python, dict: Py<PyDict>) -> Self {
method contains_key (line 101) | pub fn contains_key(&self, key: &str) -> bool {
method insert (line 105) | pub fn insert(&mut self, key: String, value: Vec<String>) {
method get_mut (line 109) | pub fn get_mut(&mut self, key: &str) -> Option<&Vec<String>> {
FILE: src/types/request.rs
type Request (line 17) | pub struct Request {
type Target (line 33) | type Target = PyAny;
type Output (line 34) | type Output = Bound<'py, Self::Target>;
type Error (line 35) | type Error = PyErr;
method into_pyobject (line 36) | fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::...
method from_actix_request (line 123) | pub async fn from_actix_request(
function handle_multipart (line 89) | async fn handle_multipart(
type PyRequest (line 198) | pub struct PyRequest {
method new (line 225) | pub fn new(
method set_body (line 252) | pub fn set_body(&mut self, py: Python, body: Py<PyAny>) -> PyResult<()> {
method json (line 258) | pub fn json(&self, py: Python) -> PyResult<Py<PyAny>> {
constant MAX_JSON_DEPTH (line 271) | const MAX_JSON_DEPTH: usize = 128;
function json_value_to_py (line 275) | fn json_value_to_py(py: Python, value: &Value) -> PyResult<Py<PyAny>> {
function json_value_to_py_with_depth (line 280) | fn json_value_to_py_with_depth(py: Python, value: &Value, depth: usize) ...
FILE: src/types/response.rs
type Response (line 20) | pub struct Response {
method default_text_headers (line 151) | fn default_text_headers() -> Headers {
method not_found (line 157) | pub fn not_found(headers: Option<&Headers>) -> Self {
method internal_server_error (line 170) | pub fn internal_server_error(headers: Option<&Headers>) -> Self {
method method_not_allowed (line 183) | pub fn method_not_allowed(headers: Option<&Headers>) -> Self {
type Target (line 198) | type Target = PyAny;
type Output (line 199) | type Output = Bound<'py, Self::Target>;
type Error (line 200) | type Error = PyErr;
method into_pyobject (line 201) | fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::...
type Error (line 397) | type Error = PyErr;
method extract (line 400) | fn extract(obj: pyo3::Borrowed<'_, '_, PyAny>) -> Result<Self, Self::E...
type StreamingResponse (line 30) | pub struct StreamingResponse {
method new (line 88) | pub fn new(status_code: u16, headers: Headers, content_generator: Py<P...
type Error (line 428) | type Error = PyErr;
method extract (line 431) | fn extract(obj: pyo3::Borrowed<'_, '_, PyAny>) -> Result<Self, Self::E...
type ResponseType (line 37) | pub enum ResponseType {
method headers_mut (line 43) | pub fn headers_mut(&mut self) -> &mut Headers {
type Body (line 52) | type Body = BoxBody;
method respond_to (line 54) | fn respond_to(self, req: &HttpRequest) -> HttpResponse<Self::Body> {
type Body (line 63) | type Body = BoxBody;
method respond_to (line 65) | fn respond_to(self, _req: &HttpRequest) -> HttpResponse<Self::Body> {
type Body (line 98) | type Body = BoxBody;
method respond_to (line 100) | fn respond_to(self, _req: &HttpRequest) -> HttpResponse<Self::Body> {
function create_python_stream (line 123) | fn create_python_stream(
type PyResponse (line 229) | pub struct PyResponse {
method new (line 307) | pub fn new(
method set_description (line 343) | pub fn set_description(&mut self, py: Python, description: Py<PyAny>) ...
method set_file_path (line 350) | pub fn set_file_path(&mut self, py: Python, file_path: &str) -> PyResu...
method set_cookie (line 364) | pub fn set_cookie(
type PyStreamingResponse (line 246) | pub struct PyStreamingResponse {
method new (line 260) | pub fn new(
FILE: src/websockets/mod.rs
type WebSocketChannel (line 31) | pub struct WebSocketChannel {
method receive (line 39) | fn receive<'py>(&self, py: Python<'py>) -> PyResult<Bound<'py, PyAny>> {
type WebSocketConnector (line 53) | pub struct WebSocketConnector {
type Result (line 127) | type Result = ();
method handle (line 129) | fn handle(&mut self, msg: SendText, ctx: &mut Self::Context) {
method handle (line 142) | fn handle(&mut self, msg: Result<ws::Message, ws::ProtocolError>, ctx:...
method sync_send_to (line 172) | pub fn sync_send_to(&self, recipient_id: String, message: String) {
method async_send_to (line 185) | pub fn async_send_to(
method sync_broadcast (line 210) | pub fn sync_broadcast(&self, message: String) {
method async_broadcast (line 221) | pub fn async_broadcast(&self, py: Python, message: String) -> PyResult...
method close (line 236) | pub fn close(&self) {
method get_id (line 241) | pub fn get_id(&self) -> String {
method get_query_params (line 246) | pub fn get_query_params(&self) -> QueryParams {
method get_message_channel (line 252) | pub fn get_message_channel(&self, py: Python) -> Option<Py<WebSocketCh...
type Context (line 67) | type Context = ws::WebsocketContext<Self>;
method started (line 69) | fn started(&mut self, ctx: &mut Self::Context) {
method stopped (line 96) | fn stopped(&mut self, ctx: &mut Self::Context) {
method clone (line 109) | fn clone(&self) -> Self {
function get_or_init_registry_for_endpoint (line 260) | fn get_or_init_registry_for_endpoint(endpoint: String) -> Addr<WebSocket...
function start_web_socket (line 280) | pub async fn start_web_socket(
FILE: src/websockets/registry.rs
type WebSocketRegistry (line 12) | pub struct WebSocketRegistry {
type Result (line 35) | type Result = ();
method handle (line 37) | fn handle(&mut self, msg: Register, _ctx: &mut Self::Context) {
method new (line 54) | pub fn new() -> Self {
method start (line 60) | pub fn start() -> Addr<Self> {
type Result (line 66) | type Result = ();
method handle (line 68) | fn handle(&mut self, msg: SendText, _ctx: &mut Self::Context) {
type Result (line 89) | type Result = ();
method handle (line 91) | fn handle(&mut self, msg: SendMessageToAll, _ctx: &mut Self::Context) {
type Result (line 111) | type Result = ();
method handle (line 113) | fn handle(&mut self, msg: Close, _ctx: &mut Self::Context) {
type Context (line 22) | type Context = Context<Self>;
type Register (line 25) | pub struct Register {
type Result (line 31) | type Result = ();
type SendText (line 43) | pub struct SendText {
type Result (line 50) | type Result = ();
type SendMessageToAll (line 79) | pub struct SendMessageToAll {
type Result (line 85) | type Result = ();
type Close (line 102) | pub struct Close {
type Result (line 107) | type Result = ();
FILE: unit_tests/test_cli.py
function test_create_robyn_app (line 7) | def test_create_robyn_app():
function test_docs (line 21) | def test_docs():
function test_start_dev_server (line 27) | def test_start_dev_server():
function test_start_app_normally (line 35) | def test_start_app_normally():
function test_run_create (line 45) | def test_run_create():
FILE: unit_tests/test_env_populator.py
function env_file (line 10) | def env_file():
function test_env_population (line 27) | def test_env_population(env_file):
FILE: unit_tests/test_openapi_issue_1270.py
function test_openapi_nested_path_parsing (line 4) | def test_openapi_nested_path_parsing():
FILE: unit_tests/test_request_object.py
function test_request_object (line 4) | def test_request_object():
FILE: unit_tests/test_unsupported_types.py
class A (line 6) | class A:
function test_bad_body_types (line 28) | def test_bad_body_types(description):
function test_good_body_types (line 38) | def test_good_body_types(description):
Condensed preview — 346 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,262K chars).
[
{
"path": ".cargo/config",
"chars": 224,
"preview": "[target.x86_64-apple-darwin]\nrustflags = [\n \"-C\", \"link-arg=-undefined\",\n \"-C\", \"link-arg=dynamic_lookup\",\n]\n\n[target."
},
{
"path": ".github/FUNDING.yml",
"chars": 838,
"preview": "# These are supported funding model platforms\n\ngithub: [sansyrox] # Replace with up to 4 GitHub Sponsors-enabled usernam"
},
{
"path": ".github/ISSUE_TEMPLATE/blank_issue.md",
"chars": 56,
"preview": "---\nname: 📝 Blank Issue\nabout: Create a blank issue.\n---"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.yml",
"chars": 1685,
"preview": "name: 🐛 Bug Report\ndescription: Create a bug report\nlabels: [bug]\nbody:\n - type: markdown\n attributes:\n value: "
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 255,
"preview": "blank_issues_enabled: true\ncontact_links:\n - name: Discord Community Support\n url: https://discord.gg/rkERZ5eNU8\n "
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.md",
"chars": 456,
"preview": "---\nname: 💡 Feature request\nabout: Suggest an idea to improve Robyn\nlabels: [enhancement]\n---\n\n<!-- \nThank you for consi"
},
{
"path": ".github/dependabot.yml",
"chars": 579,
"preview": "# Keep GitHub Actions up to date with GitHub's Dependabot...\n# https://docs.github.com/en/code-security/dependabot/worki"
},
{
"path": ".github/pull_request_template.md",
"chars": 601,
"preview": "## Description\n\nThis PR fixes #\n\n## Summary\n\nThis PR does....\n\n<!--\nThank you for contributing to Robyn!\n\n-->\n\n## PR Che"
},
{
"path": ".github/workflows/codspeed.yml",
"chars": 900,
"preview": "name: codspeed-benchmarks\n\non:\n push:\n branches:\n - \"main\" # or \"master\"\n pull_request:\n # `workflow_dispatch"
},
{
"path": ".github/workflows/lint-pr.yml",
"chars": 510,
"preview": "name: Lint PR\n\non:\n pull_request:\n branches: [main]\n\n\nenv:\n UV_SYSTEM_PYTHON: 1\n\njobs:\n lint:\n runs-on: ubuntu-"
},
{
"path": ".github/workflows/preview-deployments.yml",
"chars": 4614,
"preview": "# CI to release the project for Linux, Windows, and MacOS\n# The purpose of this action is to verify if the release build"
},
{
"path": ".github/workflows/python-CI.yml",
"chars": 869,
"preview": "# CI to test Robyn on major Linux, MacOS and Windows\n\non: [push, pull_request]\n\nname: Python Continuous integration\n\njob"
},
{
"path": ".github/workflows/release-CI.yml",
"chars": 6900,
"preview": "# CI to release the project for Linux, Windows, and MacOS\nname: Release CI\non:\n push:\n tags:\n - v*\n workflow_d"
},
{
"path": ".github/workflows/rust-CI.yml",
"chars": 912,
"preview": "# CI to build, test, format, and lint the Rust code\n\non: [push, pull_request]\n\nname: Rust Continuous integration\n\njobs:\n"
},
{
"path": ".gitignore",
"chars": 735,
"preview": ".python-version\n/target\n\n# ignore pre compiled binaries\n*.so\ndist/\n\n#python cache\n*__pycache__\n*tags\n\n# DS_Store\n*.DS_St"
},
{
"path": ".pre-commit-config.yaml",
"chars": 199,
"preview": "repos:\n - repo: https://github.com/astral-sh/ruff-pre-commit\n rev: v0.14.13\n hooks:\n - id: ruff\n args"
},
{
"path": ".well-known/funding-manifest-urls",
"chars": 32,
"preview": "https://robyn.tech/funding.json\n"
},
{
"path": "CHANGELOG.md",
"chars": 49851,
"preview": "# Changelog\n\n## [Unreleased](https://github.com/sparckles/robyn/tree/HEAD)\n\n[Full Changelog](https://github.com/sparckle"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 162,
"preview": "### Robyn Open Source Community Guidelines\n\n- **Be friendly and patient**.\n- **Be welcoming**.\n- **Be respectful**.\n- **"
},
{
"path": "CONTRIBUTING.md",
"chars": 4540,
"preview": "## Contributing Guidelines\n\nFirst off, thank you for considering contributing to `Robyn`. This guide details all the gen"
},
{
"path": "Cargo.toml",
"chars": 1454,
"preview": "[package]\nname = \"robyn\"\nversion = \"0.82.0\"\nauthors = [\"Sanskar Jethi <sansyrox@gmail.com>\"]\nedition = \"2021\"\ndescriptio"
},
{
"path": "LICENSE",
"chars": 1323,
"preview": "BSD 2-Clause License\n\nCopyright (c) 2021, Sanskar Jethi\nAll rights reserved.\n\nRedistribution and use in source and binar"
},
{
"path": "README.md",
"chars": 9244,
"preview": "<p align=\"center\"><img alt=\"Robyn Logo\" src=\"https://user-images.githubusercontent.com/29942790/140995889-5d91dcff-3aa7-"
},
{
"path": "benchmark.sh",
"chars": 2139,
"preview": "#!/bin/sh\n\n# Benchmark script to get info about Robyn's performances\n# You can use this benchmark when developing on Rob"
},
{
"path": "ci-local.sh",
"chars": 3775,
"preview": "#!/usr/bin/env bash\nset -euo pipefail\n\nRED='\\033[0;31m'\nGREEN='\\033[0;32m'\nYELLOW='\\033[1;33m'\nCYAN='\\033[0;36m'\nNC='\\03"
},
{
"path": "docs_src/.eslintrc.json",
"chars": 108,
"preview": "{\n \"extends\": [\"next\",\"next/core-web-vitals\"],\n \"rules\": {\n \"react/no-unescaped-entities\": \"off\"\n }\n}\n"
},
{
"path": "docs_src/.gitignore",
"chars": 375,
"preview": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pn"
},
{
"path": "docs_src/README.md",
"chars": 226,
"preview": "## Docs Base\n\nThis is the documentation website that will be used as a base for Robyn and Starfyre docs.\n\n## Setup\n\n1. C"
},
{
"path": "docs_src/jsconfig.json",
"chars": 95,
"preview": "{\n \"compilerOptions\": {\n \"baseUrl\": \".\",\n \"paths\": {\n \"@/*\": [\"src/*\"]\n }\n }\n}\n"
},
{
"path": "docs_src/mdx/recma.mjs",
"chars": 523,
"preview": "import { mdxAnnotations } from 'mdx-annotations'\nimport recmaNextjsStaticProps from 'recma-nextjs-static-props'\nimport {"
},
{
"path": "docs_src/mdx/rehype.mjs",
"chars": 3882,
"preview": "import { mdxAnnotations } from 'mdx-annotations'\nimport { visit } from 'unist-util-visit'\nimport rehypeMdxTitle from 're"
},
{
"path": "docs_src/mdx/remark.mjs",
"chars": 232,
"preview": "import { mdxAnnotations } from 'mdx-annotations'\nimport remarkGfm from 'remark-gfm'\nimport remarkUnwrapImages from 'rema"
},
{
"path": "docs_src/next.config.mjs",
"chars": 815,
"preview": "import nextMDX from '@next/mdx'\nimport { remarkPlugins } from './mdx/remark.mjs'\nimport { rehypePlugins } from './mdx/re"
},
{
"path": "docs_src/package.json",
"chars": 1786,
"preview": "{\n \"name\": \"tailwindui-template\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"scripts\": {\n \"dev\": \"next dev\",\n \"b"
},
{
"path": "docs_src/postcss.config.js",
"chars": 169,
"preview": "module.exports = {\n plugins: {\n tailwindcss: {},\n 'postcss-focus-visible': {\n replaceWith: '[data-focus-visi"
},
{
"path": "docs_src/prettier.config.js",
"chars": 110,
"preview": "module.exports = {\n singleQuote: true,\n semi: false,\n plugins: [require('prettier-plugin-tailwindcss')],\n}\n"
},
{
"path": "docs_src/public/funding.json",
"chars": 2463,
"preview": "{\n \"version\": \"v1.0.0\",\n \"entity\": {\n \"type\": \"individual\",\n \"role\": \"owner\",\n \"name\": \"Sanskar Jethi\",\n \""
},
{
"path": "docs_src/public/llms.txt",
"chars": 8095,
"preview": "# Robyn\n\n> Robyn is a high-performance, community-driven, and innovator-friendly async web framework for Python with a R"
},
{
"path": "docs_src/src/components/Button.jsx",
"chars": 758,
"preview": "import Link from 'next/link'\nimport clsx from 'clsx'\n\nconst variantStyles = {\n primary:\n 'font-semibold text-zinc-10"
},
{
"path": "docs_src/src/components/Card.jsx",
"chars": 2321,
"preview": "import Link from 'next/link'\nimport clsx from 'clsx'\n\nfunction ChevronRightIcon(props) {\n return (\n <svg viewBox=\"0 "
},
{
"path": "docs_src/src/components/Container.jsx",
"chars": 946,
"preview": "import { forwardRef } from 'react'\nimport clsx from 'clsx'\n\nconst OuterContainer = forwardRef(function OuterContainer(\n "
},
{
"path": "docs_src/src/components/Footer.jsx",
"chars": 2244,
"preview": "import Link from 'next/link'\n\nimport { Container } from '@/components/Container'\nimport { GitHubIcon } from './SocialIco"
},
{
"path": "docs_src/src/components/Header.jsx",
"chars": 11472,
"preview": "import { Fragment, useEffect, useRef, useState } from 'react'\nimport Image from 'next/image'\nimport Link from 'next/link"
},
{
"path": "docs_src/src/components/Prose.jsx",
"chars": 151,
"preview": "import clsx from 'clsx'\n\nexport function Prose({ children, className }) {\n return <div className={clsx(className, 'pros"
},
{
"path": "docs_src/src/components/Section.jsx",
"chars": 495,
"preview": "import { useId } from 'react'\n\nexport function Section({ title, children }) {\n let id = useId()\n\n return (\n <sectio"
},
{
"path": "docs_src/src/components/SimpleLayout.jsx",
"chars": 477,
"preview": "import { Container } from '@/components/Container'\n\nexport function SimpleLayout({ title, intro, children }) {\n return "
},
{
"path": "docs_src/src/components/SocialIcons.jsx",
"chars": 5327,
"preview": "export function TwitterIcon(props) {\n return (\n <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\" {..."
},
{
"path": "docs_src/src/components/Testimonials.jsx",
"chars": 9725,
"preview": "import { useEffect } from 'react'\n\nlet testimonials = [\n {\n body: \"Robyn has revolutionized the way I develop web so"
},
{
"path": "docs_src/src/components/documentation/ApiDocs.jsx",
"chars": 4502,
"preview": "import { Button } from '@/components/documentation/Button'\nimport { Heading } from '@/components/documentation/Heading'\n"
},
{
"path": "docs_src/src/components/documentation/BottomNavbar.jsx",
"chars": 1176,
"preview": "import { forwardRef } from 'react'\nimport Link from 'next/link'\nimport clsx from 'clsx'\nimport { motion, useScroll, useT"
},
{
"path": "docs_src/src/components/documentation/Button.jsx",
"chars": 1660,
"preview": "import Link from 'next/link'\nimport clsx from 'clsx'\n\nfunction ArrowIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20"
},
{
"path": "docs_src/src/components/documentation/Code.jsx",
"chars": 8322,
"preview": "import {\n Children,\n createContext,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'react'\nimport { Tab } fro"
},
{
"path": "docs_src/src/components/documentation/Guides.jsx",
"chars": 2164,
"preview": "import { Button } from '@/components/documentation/Button'\nimport { Heading } from '@/components/documentation/Heading'\n"
},
{
"path": "docs_src/src/components/documentation/Heading.jsx",
"chars": 2665,
"preview": "import { useEffect, useRef } from 'react'\nimport Link from 'next/link'\nimport { useInView } from 'framer-motion'\n\nimport"
},
{
"path": "docs_src/src/components/documentation/HeroPattern.jsx",
"chars": 729,
"preview": "export function HeroPattern() {\n return (\n <div className=\"absolute inset-0 -z-10 mx-0 max-w-none overflow-hidden\">\n"
},
{
"path": "docs_src/src/components/documentation/LanguageSelector.jsx",
"chars": 2291,
"preview": "import { useRouter } from 'next/router'\nimport { Menu } from '@headlessui/react'\nimport { motion } from 'framer-motion'\n"
},
{
"path": "docs_src/src/components/documentation/Layout.jsx",
"chars": 1153,
"preview": "import { motion } from 'framer-motion'\n\nimport { Footer } from '@/components/Footer'\nimport { BottomNavbar } from '@/com"
},
{
"path": "docs_src/src/components/documentation/Libraries.jsx",
"chars": 2072,
"preview": "import Image from 'next/image'\n\nimport { Button } from '@/components/documentation/Button'\nimport { Heading } from '@/co"
},
{
"path": "docs_src/src/components/documentation/MobileNavigation.jsx",
"chars": 3851,
"preview": "import { createContext, Fragment, useContext } from 'react'\nimport { Dialog, Transition } from '@headlessui/react'\nimpor"
},
{
"path": "docs_src/src/components/documentation/ModeToggle.jsx",
"chars": 598,
"preview": "function SunIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" fill=\"none\" aria-hidden=\"true\" {...props}>\n <path"
},
{
"path": "docs_src/src/components/documentation/Navigation.jsx",
"chars": 17205,
"preview": "import { useRef } from 'react'\nimport Link from 'next/link'\nimport { useRouter } from 'next/router'\nimport clsx from 'cl"
},
{
"path": "docs_src/src/components/documentation/Prose.jsx",
"chars": 254,
"preview": "import clsx from 'clsx'\n\nexport function Prose({ className, ...props }) {\n return (\n <article\n className={clsx("
},
{
"path": "docs_src/src/components/documentation/Search.jsx",
"chars": 20127,
"preview": "import { forwardRef, Fragment, useEffect, useId, useRef, useState } from 'react'\nimport { useRouter } from 'next/router'"
},
{
"path": "docs_src/src/components/documentation/SectionProvider.jsx",
"chars": 3285,
"preview": "import {\n createContext,\n useContext,\n useEffect,\n useLayoutEffect,\n useState,\n} from 'react'\nimport { createStore,"
},
{
"path": "docs_src/src/components/documentation/Tag.jsx",
"chars": 1094,
"preview": "import clsx from 'clsx'\n\nconst variantStyles = {\n medium: 'rounded-lg px-1.5 ring-1 ring-inset',\n}\n\nconst colorStyles ="
},
{
"path": "docs_src/src/components/documentation/icons/BellIcon.jsx",
"chars": 507,
"preview": "export function BellIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <path\n "
},
{
"path": "docs_src/src/components/documentation/icons/BoltIcon.jsx",
"chars": 283,
"preview": "export function BoltIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <path\n "
},
{
"path": "docs_src/src/components/documentation/icons/BookIcon.jsx",
"chars": 412,
"preview": "export function BookIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <path\n "
},
{
"path": "docs_src/src/components/documentation/icons/CalendarIcon.jsx",
"chars": 600,
"preview": "export function CalendarIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <path"
},
{
"path": "docs_src/src/components/documentation/icons/CartIcon.jsx",
"chars": 525,
"preview": "export function CartIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <path\n "
},
{
"path": "docs_src/src/components/documentation/icons/ChatBubbleIcon.jsx",
"chars": 528,
"preview": "export function ChatBubbleIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <pa"
},
{
"path": "docs_src/src/components/documentation/icons/CheckIcon.jsx",
"chars": 406,
"preview": "export function CheckIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <path\n "
},
{
"path": "docs_src/src/components/documentation/icons/ChevronRightLeftIcon.jsx",
"chars": 457,
"preview": "export function ChevronRightLeftIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n "
},
{
"path": "docs_src/src/components/documentation/icons/ClipboardIcon.jsx",
"chars": 607,
"preview": "export function ClipboardIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <pat"
},
{
"path": "docs_src/src/components/documentation/icons/CogIcon.jsx",
"chars": 1921,
"preview": "export function CogIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <path\n "
},
{
"path": "docs_src/src/components/documentation/icons/CopyIcon.jsx",
"chars": 468,
"preview": "export function CopyIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <path\n "
},
{
"path": "docs_src/src/components/documentation/icons/DocumentIcon.jsx",
"chars": 417,
"preview": "export function DocumentIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <path"
},
{
"path": "docs_src/src/components/documentation/icons/EnvelopeIcon.jsx",
"chars": 501,
"preview": "export function EnvelopeIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <path"
},
{
"path": "docs_src/src/components/documentation/icons/FaceSmileIcon.jsx",
"chars": 435,
"preview": "export function FaceSmileIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <pat"
},
{
"path": "docs_src/src/components/documentation/icons/FolderIcon.jsx",
"chars": 679,
"preview": "export function FolderIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <path\n "
},
{
"path": "docs_src/src/components/documentation/icons/LinkIcon.jsx",
"chars": 374,
"preview": "export function LinkIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <path\n "
},
{
"path": "docs_src/src/components/documentation/icons/ListIcon.jsx",
"chars": 441,
"preview": "export function ListIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <path\n "
},
{
"path": "docs_src/src/components/documentation/icons/MagnifyingGlassIcon.jsx",
"chars": 373,
"preview": "export function MagnifyingGlassIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n "
},
{
"path": "docs_src/src/components/documentation/icons/MapPinIcon.jsx",
"chars": 602,
"preview": "export function MapPinIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <path\n "
},
{
"path": "docs_src/src/components/documentation/icons/PackageIcon.jsx",
"chars": 460,
"preview": "export function PackageIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <path\n"
},
{
"path": "docs_src/src/components/documentation/icons/PaperAirplaneIcon.jsx",
"chars": 404,
"preview": "export function PaperAirplaneIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n "
},
{
"path": "docs_src/src/components/documentation/icons/PaperClipIcon.jsx",
"chars": 468,
"preview": "export function PaperClipIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <pat"
},
{
"path": "docs_src/src/components/documentation/icons/ShapesIcon.jsx",
"chars": 545,
"preview": "export function ShapesIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <path\n "
},
{
"path": "docs_src/src/components/documentation/icons/ShirtIcon.jsx",
"chars": 343,
"preview": "export function ShirtIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <path\n "
},
{
"path": "docs_src/src/components/documentation/icons/SquaresPlusIcon.jsx",
"chars": 591,
"preview": "export function SquaresPlusIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <p"
},
{
"path": "docs_src/src/components/documentation/icons/TagIcon.jsx",
"chars": 958,
"preview": "export function TagIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <path\n "
},
{
"path": "docs_src/src/components/documentation/icons/UserIcon.jsx",
"chars": 844,
"preview": "export function UserIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <path\n "
},
{
"path": "docs_src/src/components/documentation/icons/UsersIcon.jsx",
"chars": 802,
"preview": "export function UsersIcon(props) {\n return (\n <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\" {...props}>\n <path\n "
},
{
"path": "docs_src/src/components/documentation/mdx.jsx",
"chars": 2656,
"preview": "import Link from 'next/link'\nimport clsx from 'clsx'\n\nimport { Heading } from '@/components/documentation/Heading'\n\nexpo"
},
{
"path": "docs_src/src/components/releases/Button.jsx",
"chars": 1044,
"preview": "import Link from 'next/link'\nimport clsx from 'clsx'\n\nfunction ButtonInner({ arrow = false, children }) {\n return (\n "
},
{
"path": "docs_src/src/components/releases/FeedProvider.jsx",
"chars": 326,
"preview": "import { createContext, useContext } from 'react'\n\nlet FeedContext = createContext({ isFeed: false })\n\nexport function F"
},
{
"path": "docs_src/src/components/releases/FormattedDate.jsx",
"chars": 362,
"preview": "const dateFormatter = new Intl.DateTimeFormat('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n timeZo"
},
{
"path": "docs_src/src/components/releases/IconLink.jsx",
"chars": 773,
"preview": "import Link from 'next/link'\nimport clsx from 'clsx'\n\nexport function IconLink({\n children,\n className,\n compact = fa"
},
{
"path": "docs_src/src/components/releases/Intro.jsx",
"chars": 2709,
"preview": "import { IconLink } from '@/components/releases/IconLink'\nimport { SignUpForm } from '@/components/releases/SignUpForm'\n"
},
{
"path": "docs_src/src/components/releases/Layout.jsx",
"chars": 2002,
"preview": "import { useId } from 'react'\n\nimport { Intro } from '@/components/releases/Intro'\n\nfunction Timeline() {\n let id = use"
},
{
"path": "docs_src/src/components/releases/SignUpForm.jsx",
"chars": 941,
"preview": "import { useId } from 'react'\n\nimport { Button } from '@/components/Button'\n\nexport function SignUpForm() {\n let id = u"
},
{
"path": "docs_src/src/components/releases/mdx.jsx",
"chars": 3831,
"preview": "import { useEffect, useRef, useState } from 'react'\nimport Image from 'next/image'\nimport Link from 'next/link'\nimport c"
},
{
"path": "docs_src/src/lib/formatDate.js",
"chars": 204,
"preview": "export function formatDate(dateString) {\n return new Date(`${dateString}T00:00:00Z`).toLocaleDateString('en-US', {\n "
},
{
"path": "docs_src/src/lib/getAllArticles.js",
"chars": 623,
"preview": "import glob from 'fast-glob'\nimport * as path from 'path'\n\nasync function importArticle(articleFilename) {\n let { meta,"
},
{
"path": "docs_src/src/lib/remToPx.js",
"chars": 229,
"preview": "export function remToPx(remValue) {\n let rootFontSize =\n typeof window === 'undefined'\n ? 16\n : parseFloat"
},
{
"path": "docs_src/src/pages/_app.jsx",
"chars": 2090,
"preview": "import { useEffect, useRef } from 'react'\n\nimport { Footer, GithubButton } from '@/components/Footer'\nimport { Header } "
},
{
"path": "docs_src/src/pages/_document.jsx",
"chars": 2020,
"preview": "import { Head, Html, Main, NextScript } from 'next/document'\nimport { Analytics } from '@vercel/analytics/react';\n\nconst"
},
{
"path": "docs_src/src/pages/community.jsx",
"chars": 10782,
"preview": "import Head from 'next/head'\nimport Image from 'next/image'\nimport sparcklesLogo from '@/images/sparckles-logo.png'\nimpo"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/advanced_features.mdx",
"chars": 1093,
"preview": "export const description =\n 'On this page, we’ll dive into the different conversation endpoints you can use to manage c"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/advanced_routing.mdx",
"chars": 16080,
"preview": "export const description =\n 'Master Robyn\\'s advanced routing features including parameter injection, route optimizatio"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/agents.mdx",
"chars": 3515,
"preview": "export const description =\n 'Robyn AI Agents provide intelligent functionality for building AI-powered applications usi"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/ai.mdx",
"chars": 7268,
"preview": "export const description =\n 'Robyn AI provides agent and memory functionality for building intelligent applications wit"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/architecture_deep_dive.mdx",
"chars": 10156,
"preview": "export const description =\n 'Deep dive into Robyn\\'s unique hybrid Python-Rust architecture and how it delivers excepti"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/authentication.mdx",
"chars": 2857,
"preview": "\nexport const description =\n 'On this page, we’ll dive into the different conversation endpoints you can use to manage "
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/const_requests.mdx",
"chars": 2266,
"preview": "\nexport const description =\n 'On this page, we’ll dive into the different conversation endpoints you can use to manage "
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/cors.mdx",
"chars": 923,
"preview": "export const description =\n 'On this page, we’ll dive into the different conversation endpoints you can use to manage c"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/dependency_injection.mdx",
"chars": 3612,
"preview": "export const description =\n 'On this page, we will learn about dependency injection in Robyn.'\n\n\n## Dependency Injectio"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/exceptions.mdx",
"chars": 692,
"preview": "## Custom Exception Handler\n\nBatman learned how to create custom error handlers for different exception types in his app"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/file-uploads.mdx",
"chars": 3948,
"preview": "export const description =\n 'On this page, we’ll dive into the different conversation endpoints you can use to manage c"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/form_data.mdx",
"chars": 838,
"preview": "export const description =\n 'On this page, we’ll dive into using the form data.'\n\n## Form Data and Multi Part Form Data"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/future-roadmap.mdx",
"chars": 509,
"preview": "export const description =\n 'On this page, we`ll take a look at the future roadmap for Robyn.'\n\n\n- Add performance opti"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/getting_started.mdx",
"chars": 31672,
"preview": "export const description =\n 'On this page, we’ll dive into the different fundamentals of building web applications with"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/graphql-support.mdx",
"chars": 5138,
"preview": "export const description =\n 'On this page, we`ll understand how GraphQL support is provided in the existing Robyn codeb"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/index.mdx",
"chars": 1508,
"preview": "export const description =\n 'On this page, we’ll dive into the different conversation endpoints you can use to manage c"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/mcps.mdx",
"chars": 3154,
"preview": "# Model Context Protocol (MCP)\n\n> **⚠️ Experimental**: MCP support is experimental and may change.\n\nRobyn supports MCP, "
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/middlewares.mdx",
"chars": 3935,
"preview": "export const description =\n 'On this page, we’ll dive into the different conversation endpoints you can use to manage c"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/multiprocess_execution.mdx",
"chars": 1746,
"preview": "export const description =\n 'On this page, we’ll dive into the different conversation endpoints you can use to manage c"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/openapi.mdx",
"chars": 5693,
"preview": "export const description =\n 'Welcome to the Robyn API documentation. You will find comprehensive guides and documentati"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/pydantic.mdx",
"chars": 10097,
"preview": "export const description =\n 'Learn how to use Pydantic models with Robyn for automatic request body validation and Open"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/redirection.mdx",
"chars": 818,
"preview": "## Redirection\n\nBatman wanted to redirect some endpoints to others. Robyn helped him do so by the following:\n\n<Row>\n <C"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/request_object.mdx",
"chars": 6908,
"preview": "export const description =\n 'On this page, we’ll dive into the different conversation endpoints you can use to manage c"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/robyn_env.mdx",
"chars": 2172,
"preview": "export const description = 'In this section, we will learn how to configure the server through a configuration file.'\n\n\n"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/scaling.mdx",
"chars": 18348,
"preview": "export const description =\n 'Comprehensive guide to scaling Robyn applications from development to production, includin"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/server_sent_events.mdx",
"chars": 6460,
"preview": "export const description =\n 'Learn how to implement Server-Sent Events (SSE) in Robyn for real-time server-to-client co"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/templating.mdx",
"chars": 2868,
"preview": "export const description =\n 'On this page, we’ll dive into the different conversation endpoints you can use to manage c"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/timeout_configuration.mdx",
"chars": 3879,
"preview": "export const description =\n 'Configure timeout settings to handle high-concurrency scenarios and prevent resource exhau"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/using_rust_directly.mdx",
"chars": 3093,
"preview": "\n## Using Rust to extend Robyn\n\n\nThere may be occasions where Batman may be working with a high computation task, or a t"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/websockets.mdx",
"chars": 10463,
"preview": "export const description =\n 'Learn how to use Robyn\\'s WebSocket API for real-time, bidirectional communication — inclu"
},
{
"path": "docs_src/src/pages/documentation/en/api_reference/zh/getting_started.mdx",
"chars": 2426,
"preview": "export const description =\n '开始使用Robyn构建您的第一个应用程序。'\n\n# 入门指南\n\n## 创建您的第一个Robyn应用程序\n\n让我们从创建一个简单的Robyn应用程序开始。首先,使用pip安装Roby"
},
{
"path": "docs_src/src/pages/documentation/en/architecture.mdx",
"chars": 13293,
"preview": "export const description = 'Robyn is a Python web server that employs the tokio runtime and leverages a blend of Python "
},
{
"path": "docs_src/src/pages/documentation/en/community-resources.mdx",
"chars": 580,
"preview": "export const description =\n 'On this page, we`ll take a look at some community resources contributed by our amazing mem"
},
{
"path": "docs_src/src/pages/documentation/en/example_app/authentication-middlewares.mdx",
"chars": 1727,
"preview": "export const description =\n 'Welcome to the Robyn API documentation. You will find comprehensive guides and documentati"
},
{
"path": "docs_src/src/pages/documentation/en/example_app/authentication.mdx",
"chars": 4320,
"preview": "export const description =\n 'Welcome to the Robyn API documentation. You will find comprehensive guides and documentati"
},
{
"path": "docs_src/src/pages/documentation/en/example_app/deployment.mdx",
"chars": 1141,
"preview": "export const description =\n 'Welcome to the Robyn API documentation. You will find comprehensive guides and documentati"
},
{
"path": "docs_src/src/pages/documentation/en/example_app/index.mdx",
"chars": 1934,
"preview": "export const description =\n 'Welcome to the Robyn API documentation. You will find comprehensive guides and documentati"
},
{
"path": "docs_src/src/pages/documentation/en/example_app/modeling_routes.mdx",
"chars": 4651,
"preview": "export const description =\n 'Welcome to the Robyn API documentation. You will find comprehensive guides and documentati"
},
{
"path": "docs_src/src/pages/documentation/en/example_app/monitoring_and_logging.mdx",
"chars": 1027,
"preview": "\n## Monitoring and Logging\nTo keep an eye on the performance of his application and troubleshoot issues, Batman decided "
},
{
"path": "docs_src/src/pages/documentation/en/example_app/openapi.mdx",
"chars": 4728,
"preview": "export const description =\n 'Welcome to the Robyn API documentation. You will find comprehensive guides and documentati"
},
{
"path": "docs_src/src/pages/documentation/en/example_app/real_time_notifications.mdx",
"chars": 2631,
"preview": "export const description =\n 'Welcome to the Robyn API documentation. You will find comprehensive guides and documentati"
},
{
"path": "docs_src/src/pages/documentation/en/example_app/subrouters.mdx",
"chars": 1604,
"preview": "export const description =\n 'Welcome to the Robyn API documentation. You will find comprehensive guides and documentati"
},
{
"path": "docs_src/src/pages/documentation/en/example_app/templates.mdx",
"chars": 2686,
"preview": "export const description =\n 'Welcome to the Robyn API documentation. You will find comprehensive guides and documentati"
},
{
"path": "docs_src/src/pages/documentation/en/example_app/zh/index.mdx",
"chars": 661,
"preview": "export const description =\n '欢迎来到Robyn API文档。您将找到全面的指南和文档,帮助您尽快开始使用Robyn,并在遇到困难时获得支持。'\n\n# 使用Robyn构建实际应用\n\n蝙蝠侠被委托开发一个Web应"
},
{
"path": "docs_src/src/pages/documentation/en/example_app/zh/subrouters.mdx",
"chars": 1070,
"preview": "export const description =\n '欢迎来到Robyn API文档。您将找到全面的指南和文档,帮助您尽快开始使用Robyn,并在遇到困难时获得支持。'\n\n## 使用SubRouters组织代码\n\n随着应用程序的增长,"
},
{
"path": "docs_src/src/pages/documentation/en/framework_performance_comparison.mdx",
"chars": 6615,
"preview": "export const description =\n 'On this page, we`ll understand the performance comparison across different frameworks.'\n\n\n"
},
{
"path": "docs_src/src/pages/documentation/en/hosting.mdx",
"chars": 2981,
"preview": "export const description =\n 'On this page, we`ll understand how Robyn can be deployed on various cloud providers .'\n\nTh"
},
{
"path": "docs_src/src/pages/documentation/en/index.mdx",
"chars": 1550,
"preview": "import { Guides } from '@/components/documentation/Guides'\nimport { ApiDocs } from '@/components/documentation/ApiDocs'\n"
},
{
"path": "docs_src/src/pages/documentation/en/plugins.mdx",
"chars": 1652,
"preview": "## Plugins\n\nRobyn is a versatile and extensible web framework that allows anyone to make plugins over the top of Robyn.\n"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/advanced_features.mdx",
"chars": 635,
"preview": "export const description =\n '在此页面中,我们将深入探讨如何通过不同的接口实现符合预期的交互。'\n\n## 获取客户端 IP 地址\n\n意识到小丑可能也在使用哥谭警察控制面板后,蝙蝠侠决定在他的应用程序中实现访问者"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/authentication.mdx",
"chars": 1758,
"preview": "export const description =\n '在此页面中,我们将深入探讨如何通过不同的接口实现符合预期的交互。'\n\n创建应用程序的基本版本后,蝙蝠侠希望限制哥谭警察局的访问权限。因此,他询问了 Robyn 提供的身份验证功能。"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/const_requests.mdx",
"chars": 1166,
"preview": "export const description =\n '在此页面中,我们将深入探讨如何通过不同的接口实现符合预期的交互。'\n\n实现身份验证后,蝙蝠侠担心在高峰时段,尤其是小丑企图释放阿卡姆疯人院所有罪犯时,可能会引发大量请求,导致服务器"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/cors.mdx",
"chars": 632,
"preview": "export const description =\n '在此页面中,我们将深入探讨如何通过不同的接口实现符合预期的交互。'\n\n## CORS\n\n每次蝙蝠侠尝试访问 API 时,都会遇到 CORS 错误,这让他苦不堪言。\n\n## 扩展应用"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/dependency_injection.mdx",
"chars": 2695,
"preview": "export const description = '在此页面中,我们将了解 Robyn 中的依赖注入。'\n\n## 依赖注入\n\n蝙蝠侠想要了解 Robyn 中的依赖注入机制。Robyn 向他介绍了依赖注入的概念以及如何在应用程序中使用它。"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/exceptions.mdx",
"chars": 488,
"preview": "## 自定义异常处理\n\n蝙蝠侠学习了如何在应用程序中为不同类型的异常创建自定义处理程序。他实现了以下代码来捕获异常并返回自定义的错误响应:\n\n<Row>\n<Col>\n</Col>\n <Col sticky>\n\n <CodeGroup"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/file-uploads.mdx",
"chars": 3054,
"preview": "export const description =\n '在此页面中,我们将深入探讨如何通过不同的接口实现符合预期的交互。'\n\n## 文件上传\n\n蝙蝠侠学会了如何使用 Robyn 实现文件上传功能,并创建了一个接口来处理文件上传。具体代码"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/form_data.mdx",
"chars": 585,
"preview": "export const description = '在此页面中,我们将深入了解如何处理表单数据。'\n\n## 表单数据与 Multi-Part 表单数据\n\n蝙蝠侠学会了如何使用 Robyn 处理文件上传。接下来,他希望能处理表单数据。\n\n"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/future-roadmap.mdx",
"chars": 279,
"preview": "export const description = '在此页面中,我们将查看 Robyn 的未来发展路线图。'\n\n- 添加性能优化\n- 集成 Pydantic\n- 实现自动常量请求\n- 添加 ORM 支持,特别是 Prisma 集成\n- "
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/getting_started.mdx",
"chars": 14830,
"preview": "export const description =\n '在此页面中,我们将深入探讨如何通过不同的接口实现符合预期的交互。'\n\n## 同步与异步请求\n\n首先,Robyn 向蝙蝠侠介绍了它处理同步和异步请求的能力。蝙蝠侠很高兴了解这些功能,"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/graphql-support.mdx",
"chars": 4376,
"preview": "export const description =\n '在此页面中,我们将了解如何在现有的 Robyn 代码库中提供 GraphQL 支持,以更快速地获取数据。'\n\n## GraphQL 支持 [(With Strawberry 🍓)]"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/index.mdx",
"chars": 885,
"preview": "export const description =\n '在此页面中,我们将深入探讨如何通过不同的接口实现符合预期的交互。'\n\n很久以前,在哥谭市,有一位名叫 Robyn 的强大超级英雄。Robyn 拥有一种独特的能力,能够快速从互联网的"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/middlewares.mdx",
"chars": 2463,
"preview": "export const description =\n '在此页面中,我们将深入探讨如何通过不同的接口实现符合预期的交互。'\n\n## 使用中间件和事件\n\n随着蝙蝠侠的应用程序逐渐变得更加复杂,Robyn 向他介绍了中间件、启动和关闭事件,"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/multiprocess_execution.mdx",
"chars": 1226,
"preview": "export const description =\n '在此页面中,我们将深入探讨如何通过不同的接口实现符合预期的交互。'\n\n## 多进程\n\n蝙蝠侠对 Robyn 多进程环境中变量的行为产生了好奇。\n\nRobyn 向他保证,确实支持在多"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/openapi.mdx",
"chars": 4444,
"preview": "export const description =\n '欢迎阅读 Robyn API 文档。本文档旨在提供全面的指南和参考,帮助您快速上手 Robyn,并在使用过程中解决可能遇到的问题。'\n\n## OpenAPI 文档(Swagger)"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/pydantic.mdx",
"chars": 7363,
"preview": "export const description =\n '了解如何在 Robyn 中使用 Pydantic 模型实现自动请求体验证和 OpenAPI 文档生成。'\n\n\n## Pydantic 集成\n\nRobyn 支持 [Pydantic]"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/redirection.mdx",
"chars": 634,
"preview": "## 重定向\n\n蝙蝠侠希望能够将一些路由重定向到其他路由。Robyn 帮助他实现了这一功能,具体操作如下:\n\n<Row>\n <Col>\n </Col>\n <Col sticky>\n <CodeGroup title=\"Reque"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/request_object.mdx",
"chars": 5003,
"preview": "export const description =\n '在此页面中,我们将深入探讨如何通过不同的接口实现符合预期的交互。'\n\n## 请求对象\n\n请求对象是一个数据类,包含了与该次请求相关的所有信息。它会在路由处理程序中作为第一个参数传入"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/robyn_env.mdx",
"chars": 1175,
"preview": "export const description = '在本节中,我们将学习如何通过配置文件配置服务器。'\n\n## 通过环境文件配置服务器\n\n因为频繁修改代码容易引起报错,蝙蝠侠想要通过使用环境文件来配置服务器。\n\n## 环境变量\n\n- `"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/scaling.mdx",
"chars": 369,
"preview": "## 多核扩展\n\n蝙蝠侠学习了如何利用多核资源来提升应用程序的性能。他使用了以下命令来启动多进程和多线程:\n\n<Row>\n <Col>\n </Col>\n <Col sticky>\n <CodeGroup title=\"Reque"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/server_sent_events.mdx",
"chars": 4769,
"preview": "export const description =\n '学习如何在 Robyn 中实现服务器发送事件 (SSE),用于实时的服务器到客户端通信。'\n\n## 服务器发送事件 (SSE)\n\n在学习了[表单数据处理](/documentati"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/templating.mdx",
"chars": 2296,
"preview": "export const description =\n '在此页面中,我们将深入探讨如何通过不同的接口实现符合预期的交互。'\n\n## 模板\n\n蝙蝠侠希望能在网站上快速渲染 HTML 页面,并打算使用模板引擎来实现这一目标。Robyn 告诉"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/timeout_configuration.mdx",
"chars": 2669,
"preview": "export const description =\n '配置超时设置以处理高并发场景并防止资源耗尽。'\n\n# 超时配置\n\nRobyn 支持全面的超时配置,以处理高并发场景并防止资源耗尽,如\"打开文件过多\"错误。 {{ className"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/using_rust_directly.mdx",
"chars": 2140,
"preview": "## 使用 Rust 扩展 Robyn\n\n有时,蝙蝠侠可能需要处理 CPU 密集型任务或需要大量内存的操作。在这种情况下,他可能希望使用 Rust 来实现这些任务。Robyn 提供了一种特殊的方式,允许通过 Rust 扩展 Python 代"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/views.mdx",
"chars": 2307,
"preview": "export const description =\n '在此页面中,我们将深入探讨如何通过不同的接口实现符合预期的交互。'\n\n随着代码库的不断扩展,蝙蝠侠希望找到一种更好的方式来组织代码。Robyn 告诉他,他有能力以更清晰的方式组织代"
},
{
"path": "docs_src/src/pages/documentation/zh/api_reference/websockets.mdx",
"chars": 7917,
"preview": "export const description =\n '在此页面中,我们将深入探讨如何通过不同的接口实现符合预期的交互。'\n\n## WebSockets {{ tag: 'WebSockets', label: 'WebSockets'"
},
{
"path": "docs_src/src/pages/documentation/zh/architecture.mdx",
"chars": 6003,
"preview": "export const description = 'Robyn 是一个基于 Tokio 运行时的 Python Web 服务器,结合了 Python 和 Rust 的优势,利用工作者事件循环、高效的请求处理、多核扩展,以及引入了“常量请"
},
{
"path": "docs_src/src/pages/documentation/zh/community-resources.mdx",
"chars": 465,
"preview": "export const description =\n '在此页面中,我们将看到一些由我们杰出的成员贡献的社区资源,以帮助开发者快速入门使用 Robyn。'\n\n## 演讲\n\n- [EuroPython 2022](https://www."
},
{
"path": "docs_src/src/pages/documentation/zh/example_app/authentication-middlewares.mdx",
"chars": 1227,
"preview": "export const description =\n '欢迎阅读 Robyn API 文档。本文档旨在提供全面的指南和参考,帮助您快速上手 Robyn,并在使用过程中解决可能遇到的问题。'\n\n## 鉴权与授权中间件\n\n为防止无关人员访问"
},
{
"path": "docs_src/src/pages/documentation/zh/example_app/authentication.mdx",
"chars": 3701,
"preview": "export const description =\n '欢迎阅读 Robyn API 文档。本文档旨在提供全面的指南和参考,帮助您快速上手 Robyn,并在使用过程中解决可能遇到的问题。'\n\n## 身份验证\n\n为防止无关人员访问犯罪数据"
},
{
"path": "docs_src/src/pages/documentation/zh/example_app/deployment.mdx",
"chars": 519,
"preview": "export const description =\n '欢迎阅读 Robyn API 文档。本文档旨在提供全面的指南和参考,帮助您快速上手 Robyn,并在使用过程中解决可能遇到的问题。'\n\n## 部署\n\n在对 Web 应用程序进行全面"
},
{
"path": "docs_src/src/pages/documentation/zh/example_app/index.mdx",
"chars": 1121,
"preview": "export const description =\n '欢迎阅读 Robyn API 文档。本文档旨在提供全面的指南和参考,帮助您快速上手 Robyn,并在使用过程中解决可能遇到的问题。'\n\n# 基于 Robyn 创建真正的 Web 应"
},
{
"path": "docs_src/src/pages/documentation/zh/example_app/modeling_routes.mdx",
"chars": 3997,
"preview": "export const description =\n '欢迎阅读 Robyn API 文档。本文档旨在提供全面的指南和参考,帮助您快速上手 Robyn,并在使用过程中解决可能遇到的问题。'\n\n## 数据模型和数据库连接\n\n蝙蝠侠设计了一"
},
{
"path": "docs_src/src/pages/documentation/zh/example_app/monitoring_and_logging.mdx",
"chars": 635,
"preview": "## 监控和日志记录\n\n为了更好地监控应用程序的性能并及时解决潜在问题,蝙蝠侠决定实施全面的监控和日志记录机制。他通过集成第三方库来使用日志记录中间件,从而能够跟踪请求、错误和性能指标。\n\n```python {{ title: '监控和日"
},
{
"path": "docs_src/src/pages/documentation/zh/example_app/openapi.mdx",
"chars": 3780,
"preview": "export const description =\n '欢迎阅读 Robyn API 文档。本文档旨在提供全面的指南和参考,帮助您快速上手 Robyn,并在使用过程中解决可能遇到的问题。'\n\n## OpenAPI 文档 (Swagger"
},
{
"path": "docs_src/src/pages/documentation/zh/example_app/real_time_notifications.mdx",
"chars": 1592,
"preview": "export const description =\n '欢迎阅读 Robyn API 文档。本文档旨在提供全面的指南和参考,帮助您快速上手 Robyn,并在使用过程中解决可能遇到的问题。'\n\n## 即时通讯\n\n蝙蝠侠决定使用 WebSo"
},
{
"path": "docs_src/src/pages/documentation/zh/example_app/subrouters_and_views.mdx",
"chars": 1869,
"preview": "export const description =\n '欢迎阅读 Robyn API 文档。本文档旨在提供全面的指南和参考,帮助您快速上手 Robyn,并在使用过程中解决可能遇到的问题。'\n\n## 子路由器和视图\n\n在实现了基本的应用程"
},
{
"path": "docs_src/src/pages/documentation/zh/example_app/templates.mdx",
"chars": 1470,
"preview": "export const description =\n '欢迎阅读 Robyn API 文档。本文档旨在提供全面的指南和参考,帮助您快速上手 Robyn,并在使用过程中解决可能遇到的问题。'\n\n## 模板\n\n在完成后端开发后,蝙蝠侠决定为"
},
{
"path": "docs_src/src/pages/documentation/zh/framework_performance_comparison.mdx",
"chars": 5871,
"preview": "export const description = '在此页面中,我们将了解不同框架之间的性能对比。'\n\n# 不同框架之间的性能对比\n\n## 请先阅读此内容\n\n在深入之前,需要强调的是,本次性能对比的目的并非贬低任何开发者或下列所提及的框"
},
{
"path": "docs_src/src/pages/documentation/zh/hosting.mdx",
"chars": 2172,
"preview": "export const description =\n '在此页面中,我们将了解如何在不同的云提供商上部署 Robyn。'\n\n在各种云提供商上托管 Robyn 应用程序的服务。\n\n## Railway\n\n这里,我们将在 `Railway`"
},
{
"path": "docs_src/src/pages/documentation/zh/index.mdx",
"chars": 923,
"preview": "import { Guides } from '@/components/documentation/Guides'\nimport { ApiDocs } from '@/components/documentation/ApiDocs'\n"
},
{
"path": "docs_src/src/pages/documentation/zh/plugins.mdx",
"chars": 981,
"preview": "## 插件\n\nRobyn 是一个灵活且可扩展的 Web 框架,允许用户在其基础上拓展插件。\nRobyn 的插件可以增强和自定义框架的功能,以满足特定需求。以下是一些值得关注的插件,它们可以大大优化 Robyn 的项目:\n\n### 限流插件\n"
},
{
"path": "docs_src/src/pages/index.jsx",
"chars": 18057,
"preview": "import Head from 'next/head'\nimport Link from 'next/link'\n\nimport { Container } from '@/components/Container'\nimport hlj"
}
]
// ... and 146 more files (download for full content)
About this extraction
This page contains the full source code of the sparckles/Robyn GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 346 files (1.1 MB), approximately 315.1k tokens, and a symbol index with 1317 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.