weppy is a full-stack python web framework designed with simplicity in mind. It takes some components from web2py and has a syntax inspired by Flask.
The aim of weppy is to be clearly understandable, easy to be learned and to be used, so you can focus completely on your product's features:
from weppy import request, response
from weppy.tools import service, requires
from myapp import app, auth
@app.route()
@service.json
@requires(auth.is_logged_in, otherwise=not_authorized)
def todos():
page = request.params.page or 1
return {'todos': auth.user.todos.select(paginate=page)}
def not_authorized():
response.status = 401
return {'error': 'not authorized'}
You can install weppy using pip:
$ pip install weppy
Since weppy depends on udatetime, please ensure that you have the require headers and build tools installed on your Linux distribution.
On Debian/Ubuntu:
# Python 3
$ sudo apt-get install python3-dev build-essential
# Python 2
$ sudo apt-get install python-dev build-essential
On RHEL distributions:
# Python 3
$ sudo yum install python3-devel gcc
# Python 2
$ sudo yum install python-devel gcc
On OSX you already have headers if you have installed python with Brew.
The documentation is available at http://weppy.org/docs. The sources are available under the docs folder.
The "bloggy" example described in the Tutorial is available under the examples folder. While we're still populating this folder with more examples, you can also take a look at H-Funding, which uses many of weppy's features.
Aside from the examples, we encourage you to look at the starter kit and the convenient scaffold generator written by MJ Davis. These projects can really help you writing your next weppy application.
weppy was one of several Python 3 frameworks included in some benchmarks published by Kirill Klenov.
This is an extract from the results for a simple JSON serialization:
framework | req/s | ms/req | performance |
---|---|---|---|
weppy 0.5.1 | 10853 | 18.46 | 2.5x |
flask 0.10.1 | 6831 | 29.38 | 1.6x |
django 1.8.6 | 4330 | 46.61 | 1x |
weppy is currently released in beta stage. What does that mean?
- That the code may contain noteworthy bugs
- That you can use it on production, but cannot blame the developers if something goes wrong
weppy provides support for Python 2.7, 3.3, 3.4 and 3.5.
We would be very glad if you contributed to the project in one or all of these ways:
- Talking about weppy with friends and on the web
- Participating in weppy users group
- Adding issues and features requests here on GitHub
- Participating in discussions about new features and issues here on GitHub
- Improving the documentation
- Forking the project and writing beautiful code
weppy is released under the BSD License.
However, due to original license limitations, some components are included in weppy under their original licenses. Please check the LICENSE file for more details.