Skip to content

Commit 7baec9a

Browse files
committed
A1 - Initial commit
0 parents  commit 7baec9a

11 files changed

Lines changed: 4619 additions & 0 deletions

File tree

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"python.analysis.typeCheckingMode": "strict",
3+
"python.REPL.enableREPLSmartSend": false
4+
}

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
# httplib
3+
4+
Simple, asynchronous, dependency-free, strictly-typed, fully docstringed HTTP server framework.
5+
6+
## Example
7+
8+
```py
9+
from typing import Any
10+
import httplib as app
11+
12+
@app.route('/')
13+
async def index() -> Any:
14+
return app.template('static/index.html')
15+
16+
@app.route('/hello/<name>')
17+
async def hello(name: str) -> Any:
18+
return f'<h1>Hello, {name}!'
19+
20+
@app.error(404)
21+
async def not_found() -> Any:
22+
return await app.template('static/404.html')
23+
24+
app.serve('localhost')
25+
26+
```

0 commit comments

Comments
 (0)