tiny web/app server with C/Python
Project description
fly
Python lightweight Web application framework.
-
Event driven architecture.
-
Usable as Web server and Application server.
-
Lightweight and fast.
Install
$ pip install fly
Hello World
It is so easy to use fly.
-
import fly and make fly instance.
-
mount directory and registery route.(option)
-
run fly.
from fly import Fly
app = Fly()
# register index route
@app.get("/")
def index(request):
return HTMLResponse(
200,
[],
"Hello World, fly"
)
# start server
app.run()
mount vs route
-
mount: use for static content(css, html, js)
-
route: use for dynamic content(like CGI)
How fast ?
look at benchmark.
HTTP version
HTTP1.1, HTTP1.1 over TLS/SSL, HTTP2 over TLS/SSL.
Contributing
Let's coding.
- Fork fly.
- Create a feature branch. (git checkout -b
new-feature
) - Commit your changes. (git commit -m
explain of commit
) - Push to the bench. (git push origin my-new-feature)
- Create new pull request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fly_server-1.0.0.tar.gz
(4.3 MB
view hashes)