lightweight web framework
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-server
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()
@app.get("/")
def index(request):
return "Hello, fly!"
$ fly app.py
result
* fly Running on 0.0.0.0:1234 (Press CTRL+C to quit)
* fly 5 workers
* SSL: False
* SSL certificate path: conf/server.crt
* SSL key path: conf/server.key
* Log directory path: ~/log
* Mount paths ()
mount vs route
-
mount: use for static content(css, html, js)
-
route: use for dynamic content(like CGI)
Why fly ?
Interface of fly is as simple as possible. Extracted only the necessary parts as Web framework by referring to variout Python web frameworks.
But, a core part of fly is implemented by C language, you can't think of it as Python Web framework.
So, if you're looking for flexible and fast Web framework, should use fly.
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.
Running tests
# move to fly project directory and run following command.
$ python3 -m pytest
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.