wheezy.web is a lightweight, high performance, high concurrency WSGI web framework with the key features to
build modern, efficient web. Here we will use an i18n (multilingual internationalization) project quick start to build a new project.
-
Download quickstart-i18n.zip and extract.
-
Rename extracted directory `quickstart-i18n` to meet your project name, e.g. mysite and open terminal in that directory.
The i18n project quick start comes with Makefile with several handy targets. Setup development environment:
make env
Internationalization is built using
gettext, thus you need extract gettext messages and compile `*.po` files that you can find in i18n directory.
make po
Let run test, look at coverage and finally benchmark tests:
$ make test nose-cover benchmark
....................................
..........
Name Stmts Miss Cover Missing
--------------------------------------------------
public 3 0 100%
public.web 0 0 100%
public.web.profile 5 0 100%
public.web.urls 10 0 100%
public.web.views 26 0 100%
--------------------------------------------------
TOTAL 44 0 100%
-----------------------------------------------------
Ran 10 tests in 0.458s
OK
public: 5 x 1000
baseline throughput change target
100.0% 5303rps +0.0% test_root
94.4% 5005rps -5.6% test_home
98.2% 5206rps -1.8% test_error_400
99.2% 5258rps -0.8% test_error_403
97.9% 5191rps -2.1% test_error_404
static: 3 x 1000
baseline throughput change target
100.0% 5172rps +0.0% test_static_files
47.4% 2453rps -52.6% test_static_file_not_found
52.5% 2715rps -47.5% test_static_file_forbidden
-----------------------------------------------------
Ran 2 tests in 2.286s
OK
The tests are passed let run it in web browser:
$ make run
Visit http://localhost:8080/
Alternatively you can run it using uwsgi
env/bin/easy_install uwsgi
make uwsgi
Enjoy!