-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
85 lines (82 loc) · 35.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Bocadillo | Python async web framework</title>
<meta name="description" content="Fast, scalable and real-time capable web APIs for everyone: Bocadillo is a Python asynchronous web framework built with productivity and modularity in mind.">
<link rel="stylesheet" href="/octicons.css">
<link rel="shortcut icon" href="/favicon.ico?v=lk90Ny5lbz">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png?v=lk90Ny5lbz">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png?v=lk90Ny5lbz">
<link rel="manifest" href="/site.webmanifest?v=lk90Ny5lbz">
<meta name="theme-color" content="#ffe66b">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=lk90Ny5lbz">
<link rel="mask-icon" href="/safari-pinned-tab.svg?v=lk90Ny5lbz" color="#91ba3f">
<meta name="msapplication-TileColor" content="#ef9a4d">
<meta name="twitter:card" content="summary">
<meta name="twitter:url" content="https://bocadilloproject.github.io">
<meta name="twitter:title" content="Bocadillo">
<meta name="twitter:site" content="@bocadillopy">
<meta name="twitter:creator" content="Florimond Manca">
<meta name="twitter:description" content="Fast, scalable and real-time capable web APIs for everyone: Bocadillo is a Python asynchronous web framework built with productivity and modularity in mind.">
<meta name="twitter:image" content="https://bocadilloproject.github.io/logo.png">
<meta name="google-site-verification" content="xbJzBKn7IuLWAUKvqHo1c3vMelw3eTRL0k3JcKjYB_k">
<link rel="preload" href="/assets/css/0.styles.1610f5ec.css" as="style"><link rel="preload" href="/assets/js/app.ef5a74fe.js" as="script"><link rel="preload" href="/assets/js/2.741e5c13.js" as="script"><link rel="preload" href="/assets/js/10.9e1006c4.js" as="script"><link rel="preload" href="/assets/js/22.60c6ec4e.js" as="script"><link rel="preload" href="/assets/js/29.171eca5b.js" as="script"><link rel="preload" href="/assets/js/6.9de27215.js" as="script"><link rel="preload" href="/assets/js/35.886bf2d6.js" as="script"><link rel="preload" href="/assets/js/19.8093f59d.js" as="script"><link rel="preload" href="/assets/js/33.47234724.js" as="script"><link rel="preload" href="/assets/js/20.f6778ebc.js" as="script"><link rel="preload" href="/assets/js/16.6281a5f1.js" as="script"><link rel="preload" href="/assets/js/12.fea470ff.js" as="script"><link rel="preload" href="/assets/js/13.39d7df02.js" as="script"><link rel="preload" href="/assets/js/21.83002d33.js" as="script"><link rel="prefetch" href="/assets/js/1.28623c5a.js"><link rel="prefetch" href="/assets/js/100.764c96c8.js"><link rel="prefetch" href="/assets/js/101.79200541.js"><link rel="prefetch" href="/assets/js/102.2e1407e3.js"><link rel="prefetch" href="/assets/js/103.7830dd4a.js"><link rel="prefetch" href="/assets/js/104.52455b7e.js"><link rel="prefetch" href="/assets/js/105.fa552a9f.js"><link rel="prefetch" href="/assets/js/106.81313cd4.js"><link rel="prefetch" href="/assets/js/11.bdeaccad.js"><link rel="prefetch" href="/assets/js/14.c9927eee.js"><link rel="prefetch" href="/assets/js/15.87e26629.js"><link rel="prefetch" href="/assets/js/17.3dc8666b.js"><link rel="prefetch" href="/assets/js/18.b93d182a.js"><link rel="prefetch" href="/assets/js/23.fecdc752.js"><link rel="prefetch" href="/assets/js/24.6ab6ed9a.js"><link rel="prefetch" href="/assets/js/25.3476451e.js"><link rel="prefetch" href="/assets/js/26.be460c24.js"><link rel="prefetch" href="/assets/js/27.78500487.js"><link rel="prefetch" href="/assets/js/28.df3b3176.js"><link rel="prefetch" href="/assets/js/30.27a29de9.js"><link rel="prefetch" href="/assets/js/31.c1e5ed6c.js"><link rel="prefetch" href="/assets/js/32.43e6bd89.js"><link rel="prefetch" href="/assets/js/34.8f883d10.js"><link rel="prefetch" href="/assets/js/36.d74a4b45.js"><link rel="prefetch" href="/assets/js/37.5f147823.js"><link rel="prefetch" href="/assets/js/38.6882e29b.js"><link rel="prefetch" href="/assets/js/39.b016911e.js"><link rel="prefetch" href="/assets/js/4.9e306066.js"><link rel="prefetch" href="/assets/js/40.2fc0e4ef.js"><link rel="prefetch" href="/assets/js/41.3f8233d4.js"><link rel="prefetch" href="/assets/js/42.bb51a16e.js"><link rel="prefetch" href="/assets/js/43.64c511ad.js"><link rel="prefetch" href="/assets/js/44.2fd79fd9.js"><link rel="prefetch" href="/assets/js/45.ef1889bb.js"><link rel="prefetch" href="/assets/js/46.faed4535.js"><link rel="prefetch" href="/assets/js/47.c5a1fd71.js"><link rel="prefetch" href="/assets/js/48.3f137c5f.js"><link rel="prefetch" href="/assets/js/49.107fe3f3.js"><link rel="prefetch" href="/assets/js/5.6d0d80f9.js"><link rel="prefetch" href="/assets/js/50.16babc94.js"><link rel="prefetch" href="/assets/js/51.a761ac95.js"><link rel="prefetch" href="/assets/js/52.b3da75d6.js"><link rel="prefetch" href="/assets/js/53.cb224ef5.js"><link rel="prefetch" href="/assets/js/54.5fd0de3b.js"><link rel="prefetch" href="/assets/js/55.c68c0838.js"><link rel="prefetch" href="/assets/js/56.b86c9cfc.js"><link rel="prefetch" href="/assets/js/57.9a875cd5.js"><link rel="prefetch" href="/assets/js/58.d25974a5.js"><link rel="prefetch" href="/assets/js/59.4229b9d5.js"><link rel="prefetch" href="/assets/js/60.190f9994.js"><link rel="prefetch" href="/assets/js/61.a6787cb1.js"><link rel="prefetch" href="/assets/js/62.55269a82.js"><link rel="prefetch" href="/assets/js/63.d16c0a81.js"><link rel="prefetch" href="/assets/js/64.de71f4d5.js"><link rel="prefetch" href="/assets/js/65.ec533d3e.js"><link rel="prefetch" href="/assets/js/66.3ca3058a.js"><link rel="prefetch" href="/assets/js/67.8f39d473.js"><link rel="prefetch" href="/assets/js/68.5f1bfdf2.js"><link rel="prefetch" href="/assets/js/69.8a5ee484.js"><link rel="prefetch" href="/assets/js/7.baf0b149.js"><link rel="prefetch" href="/assets/js/70.cae2620c.js"><link rel="prefetch" href="/assets/js/71.88c976be.js"><link rel="prefetch" href="/assets/js/72.0608759c.js"><link rel="prefetch" href="/assets/js/73.30825c52.js"><link rel="prefetch" href="/assets/js/74.f3a4653a.js"><link rel="prefetch" href="/assets/js/75.f076bac4.js"><link rel="prefetch" href="/assets/js/76.b9cf5ea6.js"><link rel="prefetch" href="/assets/js/77.664fe172.js"><link rel="prefetch" href="/assets/js/78.bb705f3f.js"><link rel="prefetch" href="/assets/js/79.755a16c1.js"><link rel="prefetch" href="/assets/js/8.1430bdec.js"><link rel="prefetch" href="/assets/js/80.3b3c943c.js"><link rel="prefetch" href="/assets/js/81.8dfcf1f4.js"><link rel="prefetch" href="/assets/js/82.e0d8b8bf.js"><link rel="prefetch" href="/assets/js/83.8e788d4e.js"><link rel="prefetch" href="/assets/js/84.e62a4140.js"><link rel="prefetch" href="/assets/js/85.7de9077f.js"><link rel="prefetch" href="/assets/js/86.36b0b794.js"><link rel="prefetch" href="/assets/js/87.88eaed47.js"><link rel="prefetch" href="/assets/js/88.12e8bfee.js"><link rel="prefetch" href="/assets/js/89.79671657.js"><link rel="prefetch" href="/assets/js/9.fff42a24.js"><link rel="prefetch" href="/assets/js/90.7770f14c.js"><link rel="prefetch" href="/assets/js/91.34595596.js"><link rel="prefetch" href="/assets/js/92.d0e2a53f.js"><link rel="prefetch" href="/assets/js/93.0dd1d80f.js"><link rel="prefetch" href="/assets/js/94.224315b4.js"><link rel="prefetch" href="/assets/js/95.6a720b9e.js"><link rel="prefetch" href="/assets/js/96.f8e2cc61.js"><link rel="prefetch" href="/assets/js/97.6ace73bc.js"><link rel="prefetch" href="/assets/js/98.3851eb39.js"><link rel="prefetch" href="/assets/js/99.4f065790.js">
<link rel="stylesheet" href="/assets/css/0.styles.1610f5ec.css">
</head>
<body>
<div id="app" data-server-rendered="true"><div class="theme-container no-sidebar"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-exact-active router-link-active"><!----> <span class="site-name">Bocadillo</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/guide/" class="nav-link">Guide</a></div><div class="nav-item"><a href="/how-to/" class="nav-link">How-To</a></div><div class="nav-item"><a href="/discussions/" class="nav-link">Discussions</a></div><div class="nav-item"><a href="/api/" class="nav-link">Reference</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">Ecosystem</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>Tooling</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="https://github.com/bocadilloproject/bocadillo-cli" target="_blank" rel="noopener noreferrer" class="nav-link external">
Bocadillo CLI
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li class="dropdown-item"><h4>Help</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/faq.html" class="nav-link">FAQ</a></li><li class="dropdown-subitem"><a href="/troubleshooting.html" class="nav-link">Troubleshooting</a></li></ul></li><li class="dropdown-item"><h4>News</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="https://twitter.com/bocadillopy" target="_blank" rel="noopener noreferrer" class="nav-link external">
Twitter
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="/news/" class="nav-link">News</a></li><li class="dropdown-subitem"><a href="/mentions.html" class="nav-link">Mentions</a></li></ul></li><li class="dropdown-item"><h4>Resources</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="https://github.com/bocadilloproject/bocadillo/blob/master/CHANGELOG.md" target="_blank" rel="noopener noreferrer" class="nav-link external">
Changelog
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="https://pypi.org/project/bocadillo/" target="_blank" rel="noopener noreferrer" class="nav-link external">
PyPI
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="https://github.com/bocadilloproject" target="_blank" rel="noopener noreferrer" class="nav-link external">
Official repos
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul></div></div> <a href="https://github.com/bocadilloproject/bocadillo" target="_blank" rel="noopener noreferrer" class="repo-link">
GitHub
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/guide/" class="nav-link">Guide</a></div><div class="nav-item"><a href="/how-to/" class="nav-link">How-To</a></div><div class="nav-item"><a href="/discussions/" class="nav-link">Discussions</a></div><div class="nav-item"><a href="/api/" class="nav-link">Reference</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">Ecosystem</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>Tooling</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="https://github.com/bocadilloproject/bocadillo-cli" target="_blank" rel="noopener noreferrer" class="nav-link external">
Bocadillo CLI
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li class="dropdown-item"><h4>Help</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/faq.html" class="nav-link">FAQ</a></li><li class="dropdown-subitem"><a href="/troubleshooting.html" class="nav-link">Troubleshooting</a></li></ul></li><li class="dropdown-item"><h4>News</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="https://twitter.com/bocadillopy" target="_blank" rel="noopener noreferrer" class="nav-link external">
Twitter
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="/news/" class="nav-link">News</a></li><li class="dropdown-subitem"><a href="/mentions.html" class="nav-link">Mentions</a></li></ul></li><li class="dropdown-item"><h4>Resources</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="https://github.com/bocadilloproject/bocadillo/blob/master/CHANGELOG.md" target="_blank" rel="noopener noreferrer" class="nav-link external">
Changelog
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="https://pypi.org/project/bocadillo/" target="_blank" rel="noopener noreferrer" class="nav-link external">
PyPI
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="https://github.com/bocadilloproject" target="_blank" rel="noopener noreferrer" class="nav-link external">
Official repos
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul></div></div> <a href="https://github.com/bocadilloproject/bocadillo" target="_blank" rel="noopener noreferrer" class="repo-link">
GitHub
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></nav> <!----> </aside> <main aria-labelledby="main-title" class="home" data-v-d0526a2a><div class="content deprecation-warning" style="margin-top:1rem;" data-v-b1b05e82 data-v-d0526a2a><p data-v-b1b05e82><strong data-v-b1b05e82>Warning:</strong> Bocadillo is now <strong data-v-b1b05e82>UNMAINTAINED</strong>.
Users are recommended to migrate to a supported alternative, such as
<a href="https://www.starlette.io" target="_blank" rel="noreferrer" data-v-b1b05e82>Starlette</a>
or
<a href="https://fastapi.tiangolo.com" target="_blank" rel="noreferrer" data-v-b1b05e82>FastAPI</a>. Please see
<a href="https://github.com/bocadilloproject/bocadillo/issues/334" target="_blank" rel="noreferrer" data-v-b1b05e82>#344</a>
for more information.
</p></div> <header class="hero" data-v-d0526a2a><img src="/logo.png" alt="hero" data-v-d0526a2a> <h1 id="main-title" data-v-d0526a2a>Bocadillo</h1> <p class="description" data-v-d0526a2a>Fast, scalable and real-time capable web APIs for everyone</p> <p data-v-d0526a2a><iframe src="https://ghbtns.com/github-btn.html?user=bocadilloproject&repo=bocadillo&type=star&count=true&size=large" title="Bocadillo GitHub stars" frameborder="0" scrolling="0" width="130px" height="30px" data-v-d0526a2a></iframe></p> <p class="b-action" data-v-189f0197 data-v-d0526a2a><a href="/guide/" class="nav-link b-action-button primary" data-v-189f0197>Get Started →</a></p> <p data-v-d0526a2a>
Latest release:
<strong data-v-d0526a2a>0.18.3</strong></p></header> <div id="home-main" data-v-d0526a2a><div class="theme-default-content custom home-content content__default" data-v-d0526a2a><h2 id="what-is-bocadillo"><a href="#what-is-bocadillo" aria-hidden="true" class="header-anchor">#</a> What is Bocadillo?</h2> <p><strong>Bocadillo</strong> is a <strong>Python asynchronous and ASGI web framework</strong> that makes building performant and highly concurrent web APIs fun and accessible to everyone.</p> <ul class="no-style" data-v-27ae53bc><li class="b-feature" data-v-27ae53bc><div data-v-27ae53bc><i class="feature-icon circle" data-v-5c1e9c41 data-v-27ae53bc><svg version="1.1" width="20" height="20" viewBox="0 0 16 16" class="octicon octicon-package" aria-hidden="true"><path fill-rule="evenodd" d="M1 4.27v7.47c0 .45.3.84.75.97l6.5 1.73c.16.05.34.05.5 0l6.5-1.73c.45-.13.75-.52.75-.97V4.27c0-.45-.3-.84-.75-.97l-6.5-1.74a1.4 1.4 0 0 0-.5 0L1.75 3.3c-.45.13-.75.52-.75.97zm7 9.09l-6-1.59V5l6 1.61v6.75zM2 4l2.5-.67L11 5.06l-2.5.67L2 4zm13 7.77l-6 1.59V6.61l2-.55V8.5l2-.53V5.53L15 5v6.77zm-2-7.24L6.5 2.8l2-.53L15 4l-2 .53z"/></svg></i></div> <div data-v-27ae53bc><h4 data-v-27ae53bc>Productive</h4> <p data-v-27ae53bc>Bocadillo is an ASGI web framework designed to help you build, test and deploy web APIs as easily as possible. It focuses on modularity, has thorough documentation, and integrates seamlessly with third-party async libraries.</p></div></li><li class="b-feature" data-v-27ae53bc><div data-v-27ae53bc><i class="feature-icon circle" data-v-5c1e9c41 data-v-27ae53bc><svg version="1.1" width="20" height="20" viewBox="0 0 16 16" class="octicon octicon-broadcast" aria-hidden="true"><path fill-rule="evenodd" d="M9 9H8c.55 0 1-.45 1-1V7c0-.55-.45-1-1-1H7c-.55 0-1 .45-1 1v1c0 .55.45 1 1 1H6c-.55 0-1 .45-1 1v2h1v3c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-3h1v-2c0-.55-.45-1-1-1zM7 7h1v1H7V7zm2 4H8v4H7v-4H6v-1h3v1zm2.09-3.5c0-1.98-1.61-3.59-3.59-3.59A3.593 3.593 0 0 0 4 8.31v1.98c-.61-.77-1-1.73-1-2.8 0-2.48 2.02-4.5 4.5-4.5S12 5.01 12 7.49c0 1.06-.39 2.03-1 2.8V8.31c.06-.27.09-.53.09-.81zm3.91 0c0 2.88-1.63 5.38-4 6.63v-1.05a6.553 6.553 0 0 0 3.09-5.58A6.59 6.59 0 0 0 7.5.91 6.59 6.59 0 0 0 .91 7.5c0 2.36 1.23 4.42 3.09 5.58v1.05A7.497 7.497 0 0 1 7.5 0C11.64 0 15 3.36 15 7.5z"/></svg></i></div> <div data-v-27ae53bc><h4 data-v-27ae53bc>Real-time capable</h4> <p data-v-27ae53bc>Embrace asynchronous programming and use the built-in WebSocket and SSE support to design real-time, highly-concurrent systems.</p></div></li><li class="b-feature" data-v-27ae53bc><div data-v-27ae53bc><i class="feature-icon circle" data-v-5c1e9c41 data-v-27ae53bc><svg version="1.1" width="20" height="20" viewBox="0 0 10 16" class="octicon octicon-zap" aria-hidden="true"><path fill-rule="evenodd" d="M10 7H6l3-7-9 9h4l-3 7 9-9z"/></svg></i></div> <div data-v-27ae53bc><h4 data-v-27ae53bc>Performant</h4> <p data-v-27ae53bc>Bocadillo makes the most out of Starlette and Uvicorn, the lightning-fast ASGI toolkit and web server.</p></div></li></ul> <p class="b-action" data-v-189f0197><a href="/guide/" class="nav-link b-action-button" data-v-189f0197>Learn more about Bocadillo</a></p> <h2 id="requirements"><a href="#requirements" aria-hidden="true" class="header-anchor">#</a> Requirements</h2> <p>Python 3.6+</p> <h2 id="installation"><a href="#installation" aria-hidden="true" class="header-anchor">#</a> Installation</h2> <div class="language-bash extra-class"><pre class="language-bash"><code>pip <span class="token function">install</span> bocadillo
</code></pre></div><h2 id="example"><a href="#example" aria-hidden="true" class="header-anchor">#</a> Example</h2> <div class="language-python extra-class"><pre class="language-python"><code><span class="token keyword">from</span> bocadillo <span class="token keyword">import</span> App<span class="token punctuation">,</span> configure
app <span class="token operator">=</span> App<span class="token punctuation">(</span><span class="token punctuation">)</span>
configure<span class="token punctuation">(</span>app<span class="token punctuation">)</span>
@app<span class="token punctuation">.</span>route<span class="token punctuation">(</span><span class="token string">"/"</span><span class="token punctuation">)</span>
<span class="token keyword">async</span> <span class="token keyword">def</span> <span class="token function">index</span><span class="token punctuation">(</span>req<span class="token punctuation">,</span> res<span class="token punctuation">)</span><span class="token punctuation">:</span>
res<span class="token punctuation">.</span>json <span class="token operator">=</span> <span class="token punctuation">{</span><span class="token string">"hello"</span><span class="token punctuation">:</span> <span class="token string">"world"</span><span class="token punctuation">}</span>
</code></pre></div><p>Save this as <code>app.py</code>, then start a <a href="https://www.uvicorn.org" target="_blank" rel="noopener noreferrer">uvicorn<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a> server (hot reload enabled!):</p> <div class="language-bash extra-class"><pre class="language-bash"><code>uvicorn app:app --reload
</code></pre></div><p>Say hello!</p> <div class="language-bash extra-class"><pre class="language-bash"><code>$ <span class="token function">curl</span> http://localhost:8000
<span class="token punctuation">{</span><span class="token string">"hello"</span><span class="token keyword">:</span> <span class="token string">"world"</span><span class="token punctuation">}</span>
</code></pre></div><p>Ready to dive in?</p> <p class="b-action" data-v-189f0197><a href="/guide/tutorial.html" class="nav-link b-action-button" data-v-189f0197>Read the tutorial →</a></p></div> <aside class="home-sidebar" data-v-4cbf7ee6 data-v-d0526a2a><h3 class="first" data-v-4cbf7ee6>Latest news</h3> <div data-v-25a02681 data-v-4cbf7ee6><h4 data-v-25a02681><a href="/news/release-0.17.html" class="nav-link" data-v-6a2161ff data-v-25a02681><!----> <span data-v-6a2161ff>What's new in Bocadillo 0.17</span></a></h4> <p class="post-description" data-v-25a02681>Bocadillo 0.17 is out! In this release: settings-based provider discovery, and removal of deprecated items such as recipes and the @view decorator.</p><h4 data-v-25a02681><a href="/news/release-0.16.html" class="nav-link" data-v-6a2161ff data-v-25a02681><!----> <span data-v-6a2161ff>What's new in Bocadillo 0.16</span></a></h4> <p class="post-description" data-v-25a02681>Bocadillo 0.16 has been released! Learn what's in it for you: routers, plugin registration, unified middleware, and more.</p> <a href="/news/" class="nav-link" data-v-6a2161ff data-v-25a02681><!----> <span class="more" data-v-6a2161ff>More news</span></a></div> <h3 data-v-4cbf7ee6>New to Bocadillo?</h3> <div data-v-5c2b3585 data-v-4cbf7ee6><ul class="no-style" data-v-5c2b3585><li data-v-5c2b3585><a href="/guide/installation.html" class="nav-link" data-v-6a2161ff data-v-5c2b3585><i data-v-5c1e9c41 data-v-6a2161ff><svg version="1.1" width="12" height="16" viewBox="0 0 12 16" class="octicon octicon-repo" aria-hidden="true"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg></i>
<span data-v-6a2161ff>Installation</span></a></li></ul><ul class="no-style" data-v-5c2b3585><li data-v-5c2b3585><a href="/guide/tutorial.html" class="nav-link" data-v-6a2161ff data-v-5c2b3585><i data-v-5c1e9c41 data-v-6a2161ff><svg version="1.1" width="12" height="16" viewBox="0 0 12 16" class="octicon octicon-repo" aria-hidden="true"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg></i>
<span data-v-6a2161ff>Tutorial</span></a></li></ul><ul class="no-style" data-v-5c2b3585><li data-v-5c2b3585><a href="/faq.html" class="nav-link" data-v-6a2161ff data-v-5c2b3585><i data-v-5c1e9c41 data-v-6a2161ff><svg version="1.1" width="12" height="16" viewBox="0 0 12 16" class="octicon octicon-repo" aria-hidden="true"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg></i>
<span data-v-6a2161ff>FAQ</span></a></li></ul></div> <h3 data-v-4cbf7ee6>Pinned features</h3> <div data-v-5c2b3585 data-v-4cbf7ee6><ul class="no-style" data-v-5c2b3585><li data-v-5c2b3585><a href="/guide/routing.html" class="nav-link" data-v-6a2161ff data-v-5c2b3585><i data-v-5c1e9c41 data-v-6a2161ff><svg version="1.1" width="12" height="16" viewBox="0 0 12 16" class="octicon octicon-repo" aria-hidden="true"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg></i>
<span data-v-6a2161ff>Routing</span></a></li></ul><ul class="no-style" data-v-5c2b3585><li data-v-5c2b3585><a href="/guide/json-validation.html" class="nav-link" data-v-6a2161ff data-v-5c2b3585><i data-v-5c1e9c41 data-v-6a2161ff><svg version="1.1" width="12" height="16" viewBox="0 0 12 16" class="octicon octicon-repo" aria-hidden="true"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg></i>
<span data-v-6a2161ff>JSON validation</span></a></li></ul><ul class="no-style" data-v-5c2b3585><li data-v-5c2b3585><a href="/guide/websockets.html" class="nav-link" data-v-6a2161ff data-v-5c2b3585><i data-v-5c1e9c41 data-v-6a2161ff><svg version="1.1" width="12" height="16" viewBox="0 0 12 16" class="octicon octicon-repo" aria-hidden="true"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg></i>
<span data-v-6a2161ff>WebSockets</span></a></li></ul><ul class="no-style" data-v-5c2b3585><li data-v-5c2b3585><a href="/guide/providers.html" class="nav-link" data-v-6a2161ff data-v-5c2b3585><i data-v-5c1e9c41 data-v-6a2161ff><svg version="1.1" width="12" height="16" viewBox="0 0 12 16" class="octicon octicon-repo" aria-hidden="true"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg></i>
<span data-v-6a2161ff>Providers</span></a></li></ul></div> <br data-v-4cbf7ee6> <a href="/guide/" class="nav-link" data-v-6a2161ff data-v-4cbf7ee6><!----> <span class="more" data-v-6a2161ff>Explore more features</span></a> <h3 data-v-4cbf7ee6>Stay up to date</h3> <div data-v-5c2b3585 data-v-4cbf7ee6><ul class="no-style" data-v-5c2b3585><li data-v-5c2b3585><a href="https://twitter.com/bocadillopy" target="_blank" rel="noopener noreferrer" class="nav-link external" data-v-6a2161ff data-v-5c2b3585><!----> <span data-v-6a2161ff>Follow @bocadillopy</span> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound" data-v-6a2161ff data-v-6a2161ff><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul><ul class="no-style" data-v-5c2b3585><li data-v-5c2b3585><a href="https://dev.to/bocadillo" target="_blank" rel="noopener noreferrer" class="nav-link external" data-v-6a2161ff data-v-5c2b3585><!----> <span data-v-6a2161ff>DEV Community</span> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound" data-v-6a2161ff data-v-6a2161ff><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul><ul class="no-style" data-v-5c2b3585><li data-v-5c2b3585><a href="https://github.com/bocadilloproject/bocadillo/path/master/CHANGELOG.md" target="_blank" rel="noopener noreferrer" class="nav-link external" data-v-6a2161ff data-v-5c2b3585><!----> <span data-v-6a2161ff>Changelog</span> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound" data-v-6a2161ff data-v-6a2161ff><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div> <h3 data-v-4cbf7ee6>Get involved</h3> <div data-v-5c2b3585 data-v-4cbf7ee6><ul class="no-style" data-v-5c2b3585><li data-v-5c2b3585><a href="https://github.com/bocadilloproject/bocadillo/issues" target="_blank" rel="noopener noreferrer" class="nav-link external" data-v-6a2161ff data-v-5c2b3585><!----> <span data-v-6a2161ff>Issues</span> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound" data-v-6a2161ff data-v-6a2161ff><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul><ul class="no-style" data-v-5c2b3585><li data-v-5c2b3585><a href="https://github.com/bocadilloproject/bocadillo/path/master/CONTRIBUTING.md" target="_blank" rel="noopener noreferrer" class="nav-link external" data-v-6a2161ff data-v-5c2b3585><!----> <span data-v-6a2161ff>Contributing guide</span> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound" data-v-6a2161ff data-v-6a2161ff><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></aside></div> <div class="footer" data-v-d0526a2a>MIT Licensed | Copyright © 2018-present Florimond Manca</div></main></div><div class="global-ui"></div></div>
<script src="/assets/js/app.ef5a74fe.js" defer></script><script src="/assets/js/2.741e5c13.js" defer></script><script src="/assets/js/10.9e1006c4.js" defer></script><script src="/assets/js/22.60c6ec4e.js" defer></script><script src="/assets/js/29.171eca5b.js" defer></script><script src="/assets/js/6.9de27215.js" defer></script><script src="/assets/js/35.886bf2d6.js" defer></script><script src="/assets/js/19.8093f59d.js" defer></script><script src="/assets/js/33.47234724.js" defer></script><script src="/assets/js/20.f6778ebc.js" defer></script><script src="/assets/js/16.6281a5f1.js" defer></script><script src="/assets/js/12.fea470ff.js" defer></script><script src="/assets/js/13.39d7df02.js" defer></script><script src="/assets/js/21.83002d33.js" defer></script>
</body>
</html>