CARVIEW |
Select Language
HTTP/2 200
date: Thu, 24 Jul 2025 21:31:25 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"8f4d978638cd1998dbef3904886278bf"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=RJ4IOuG9Yppf4WZNDz2Y0SZYOikaW8v49XbzZvOXzx8rZkvwmDkcuPZh2Dekmpt2p4upwKXlxlYCk9h8GAyu3MboCO9XdmEAIhmRwlDmftcgm%2FAwQT%2B%2FJGnam5JlBOCzOSCVQsjo9yfuEDBwlRWaei85RJhGSqiKRs8x5NmaQNeviE1TRNcIG1ilcbp0KQx2Vbkai4pjVfj8tCH9mecgOQtvVxB0PRkdXA6FSYle5xiYBXe3hUcjfWVcq6L7NIRGgx70Dq56EpvSbdiZEMIBpw%3D%3D--lqWIc%2Byl5IT0id63--ule2PS%2FFPIc%2Bg%2BhDE61n0A%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1019226542.1753392684; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 21:31:24 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 21:31:24 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 8844:249F26:9635B:D0186:6882A62C
Releases Β· sparckles/Robyn Β· GitHub
23 Jul 12:20
Loading
19 Jul 19:42
Loading
17 Jul 17:06
Loading
09 Jul 18:26
Loading
07 Jul 15:13
Loading
05 Jul 11:58
Loading
25 Jun 10:11
Loading
18 Jun 12:26
Loading
09 Jun 04:35
Loading
05 Jun 05:47
Loading
Skip to content
Navigation Menu
{{ message }}
-
-
Notifications
You must be signed in to change notification settings - Fork 296
Releases: sparckles/Robyn
Releases Β· sparckles/Robyn
v0.72.0 - add configurable timeout and keep alive
Compare
What's Changed
Full Changelog: v0.71.4...v0.72.0
Assets 2
3 people reacted
v0.71.4 - remove dead code and duplication
Compare
What's Changed
Full Changelog: v0.71.3...v0.71.4
Assets 2
2 people reacted
v0.71.3 - fix duplicate routing in robyn app
Compare
What's Changed
- chore: update a typo in docs by @sansyrox in #1207
- fix: route duplicate implementations by @sansyrox in #1208
Full Changelog: v0.71.2...v0.71.3
Assets 2
2 people reacted
v0.71.2 - fix auth route conflict
Compare
Assets 2
1 person reacted
v0.71.1 - make SSE PEP compliant and improve implementation
Compare
What's Changed
"""
Server-Sent Events (SSE) Example for Robyn
This example demonstrates how to implement Server-Sent Events using Robyn. SSE allows real-time server-to-client
communication over a single HTTP connection.
"""
import asyncio
import time
from robyn import Robyn, SSEMessage, SSEResponse
app = Robyn(__file__)
@app.get("/events")
def stream_events(request):
"""Basic SSE endpoint that sends a message every second"""
def event_generator():
"""Generator function that yields SSE-formatted messages"""
for i in range(10):
yield SSEMessage(f"Message {i} - {time.strftime('%H:%M:%S')}", id=str(i))
time.sleep(1)
# Send a final message
yield SSEMessage("Stream ended", event="end")
return SSEResponse(event_generator())
@app.get("/events/json")
def stream_json_events(request):
"""SSE endpoint that sends JSON data"""
import json
def json_event_generator():
"""Generator that yields JSON data as SSE"""
for i in range(5):
data = {"id": i, "message": f"JSON message {i}", "timestamp": time.time(), "type": "notification"}
yield SSEMessage(json.dumps(data), event="notification", id=str(i))
time.sleep(2)
return SSEResponse(json_event_generator())
@app.get("/events/named")
def stream_named_events(request):
"""SSE endpoint with named events"""
def named_event_generator():
"""Generator that yields named SSE events"""
events = [
("user_joined", "Alice joined the chat"),
("message", "Hello everyone!"),
("user_left", "Bob left the chat"),
("message", "How is everyone doing?"),
("user_joined", "Charlie joined the chat"),
]
for i, (event_type, message) in enumerate(events):
yield SSEMessage(message, event=event_type, id=str(i))
time.sleep(1.5)
return SSEResponse(named_event_generator())
@app.get("/events/async")
async def stream_async_events(request):
"""Async SSE endpoint demonstrating async generators"""
async def async_event_generator():
"""Async generator for SSE events"""
for i in range(8):
# Simulate async work
await asyncio.sleep(0.5)
yield SSEMessage(f"Async message {i} - {time.strftime('%H:%M:%S')}", event="async", id=str(i))
return SSEResponse(async_event_generator())
@app.get("/events/heartbeat")
def stream_heartbeat(request):
"""SSE endpoint that sends heartbeat messages"""
def heartbeat_generator():
"""Generator that sends heartbeat pings"""
counter = 0
while counter < 20: # Send 20 heartbeats
yield SSE_Message(f"heartbeat {counter}", event="heartbeat", id=str(counter))
counter += 1
time.sleep(0.5)
yield SSEMessage("heartbeat ended", event="end")
return SSEResponse(heartbeat_generator())
Full Changelog: v0.71.0...v0.71.1
Assets 2
4 people reacted
v0.71.0 - add support for server sent events
Compare
What's Changed
"""
Server-Sent Events (SSE) Example for Robyn
This example demonstrates how to implement Server-Sent Events using Robyn,
similar to FastAPI's implementation. SSE allows real-time server-to-client
communication over a single HTTP connection.
"""
import asyncio
import time
from robyn import Robyn, SSE_Message, SSE_Response
app = Robyn(__file__)
@app.get("/events")
def stream_events(request):
"""Basic SSE endpoint that sends a message every second"""
def event_generator():
"""Generator function that yields SSE-formatted messages"""
for i in range(10):
yield SSE_Message(f"Message {i} - {time.strftime('%H:%M:%S')}", id=str(i))
time.sleep(1)
# Send a final message
yield SSE_Message("Stream ended", event="end")
return SSE_Response(event_generator())
@app.get("/events/json")
def stream_json_events(request):
"""SSE endpoint that sends JSON data"""
import json
def json_event_generator():
"""Generator that yields JSON data as SSE"""
for i in range(5):
data = {"id": i, "message": f"JSON message {i}", "timestamp": time.time(), "type": "notification"}
yield SSE_Message(json.dumps(data), event="notification", id=str(i))
time.sleep(2)
return SSE_Response(json_event_generator())
@app.get("/events/named")
def stream_named_events(request):
"""SSE endpoint with named events"""
def named_event_generator():
"""Generator that yields named SSE events"""
events = [
("user_joined", "Alice joined the chat"),
("message", "Hello everyone!"),
("user_left", "Bob left the chat"),
("message", "How is everyone doing?"),
("user_joined", "Charlie joined the chat"),
]
for i, (event_type, message) in enumerate(events):
yield SSE_Message(message, event=event_type, id=str(i))
time.sleep(1.5)
return SSE_Response(named_event_generator())
@app.get("/events/async")
async def stream_async_events(request):
"""Async SSE endpoint demonstrating async generators"""
async def async_event_generator():
"""Async generator for SSE events"""
for i in range(8):
# Simulate async work
await asyncio.sleep(0.5)
yield SSE_Message(f"Async message {i} - {time.strftime('%H:%M:%S')}", event="async", id=str(i))
return SSE_Response(async_event_generator())
@app.get("/events/heartbeat")
def stream_heartbeat(request):
"""SSE endpoint that sends heartbeat messages"""
def heartbeat_generator():
"""Generator that sends heartbeat pings"""
counter = 0
while counter < 20: # Send 20 heartbeats
yield SSE_Message(f"heartbeat {counter}", event="heartbeat", id=str(counter))
counter += 1
time.sleep(0.5)
yield SSE_Message("heartbeat ended", event="end")
return SSE_Response(heartbeat_generator())
Full Changelog: v0.70.0...v0.71.0
Assets 2
9 people reacted
v0.70.0 - Experimental AI Features (agents and mcp server)
Compare
What's Changed
Full write up https://sanskar.wtf/posts/the-future-of-robyn
Experimental AI Features
First web framework with built-in AI agents and memory.
from robyn import Robyn
from robyn.ai import agent, memory
app = Robyn(__file__)
@app.post("/chat")
async def chat(request):
mem = memory(provider="inmemory", user_id="user")
ai_agent = agent(runner="simple", memory=mem)
result = await ai_agent.run(request.json().get("query"))
return {"response": result["response"]}
MCP Support
Native Model Context Protocol integration.
# MCP Resources
@app.mcp.resource("time://current")
def current_time() -> str:
return f"Current time: {datetime.now().isoformat()}"
@app.mcp.tool(
name="echo",
description="Echo back text",
input_schema={"type": "object", "properties": {"text": {"type": "string", "description": "Text to echo"}}, "required": ["text"]},
)
def echo_tool(args):
return args.get("text", "")
# MCP Prompts
@app.mcp.prompt(
name="explain_code",
description="Generate code explanation prompt",
arguments=[
{"name": "code", "description": "Code to explain", "required": True},
{"name": "language", "description": "Programming language", "required": False},
],
)
def explain_code_prompt(args):
code = args.get("code", "")
language = args.get("language", "unknown")
return f"""Please explain this {language} code:
{language}
{code}
Include:
1. What it does
2. How it works
3. Key concepts used
"""
Note
These features are very much experimental. Checkout the examples/
folder to see the new features in action.
Install: pip install robyn==0.70.0
Full Changelog: v0.69.0...v0.70.0
Assets 2
4 people reacted
v0.69.0 - make robyn ~80% faster
Compare
Assets 2
12 people reacted
v0.68.0 - add python3.13 support
Compare
What's Changed
- PyO3 Migration from v0.20.* to 0.24.* by @VishnuSanal in #1168
- fix: robyn builds failing for python v3.13 by @VishnuSanal in #1006
Full Changelog: v0.67.0...v0.68.0
Assets 2
8 people reacted
v0.67.0 - flexible CORS configuration
Compare
What's Changed
- fix #1138 - Add support for generic types such as List[Object] by @yzutyc in #1139
- ci: fix Codspeed benchmark ci by @k4976 in #1169
- chore: fix typos by @hasansezertasan in #1166
- Flexible CORS Configuration Support by @Charlie-BU in #1159
New Contributors
- @yzutyc made their first contribution in #1139
- @hasansezertasan made their first contribution in #1166
- @Charlie-BU made their first contribution in #1159
Full Changelog: v0.66.2...v0.67.0
Assets 2
3 people reacted
Previous Next
You canβt perform that action at this time.