twork is a Tornado Application FrameWork, it supports plug-in module injection, the module called TworkApp.
Project description
twork
=====
twork is a Tornado Application FrameWork, it supports plug-in module
injection, the module called TworkApp.
Features
--------
Plug-in
~~~~~~~
+ TworkApp as a plug-in injected to Twork
Web App Framework
~~~~~~~~~~~~~~~~~
+ Control(WebApplication)/Model(RequestHandler) separation, users
simply writing Handler Model
+ Web RequestHandler should be Inherited from
twork.web.action.base.BaseHandler
Unified Infrastructure
~~~~~~~~~~~~~~~~~~~~~~
+ Web access logging
+ Status statistics
+ Overload protection
+ IP checking
+ Others
Open Design
~~~~~~~~~~~
+ Not only for web application framework
+ Can be directly embedded other control model, like that the custom
protol server-app
+ Custom Logging Support
Scaffold Support
~~~~~~~~~~~~~~~~
+ Build your own Tornado Application
+ As a app module injected to twork
Easy Maintainable
~~~~~~~~~~~~~~~~~
+ Script Tools: log cut, log reopen, tworkd kill and others
+ Consistent process name: twork::hello/1.0.0.0
Usage
-----
Environment
~~~~~~~~~~~
virtualenv is recommend.
+ `virtualenv <http://www.virtualenv.org/en/latest>`_ is a tool to create isolated Python environments
+ Initialize and enter the app virtualenv
+ For example, creating the hello application here
Install twork
~~~~~~~~~~~~~
+ pip install `twork <https://pypi.python.org/pypi/twork>`_
+ easy_install `twork <https://pypi.python.org/simple/twork>`_
TworkApp Build
~~~~~~~~~~~~~~
Create your own tornado application based on twork.
+ twork-admin -app=hello -prefix=~/workspace
+ cd ~/workspace
Web Handler(Optional)
`````````````````````
+ write your web request handler in hello/hello/web/action directory,
the handler should be Inherited from twork.web.action.base.BaseHandler
+ add uri:handler map to HANDLERS in hello/hello/app.py
Run TworkApp within twork
~~~~~~~~~~~~~~~~~~~~~~~~~
+ make install
+ tworkd -app_module=hello.app OR tworkd -config_file=conf/twork.conf
Access the web server
~~~~~~~~~~~~~~~~~~~~
+ http://localhost:8000/v1.0/hello/stats
+ http://localhost:8000/v1.0/twork/stats
Check Htpp Response
~~~~~~~~~~~~~~~~~~~~
+ Server: TWS/2.0.0.5
+ TworkApp: HELLO/1.0.0.0
Requirements
------------
The following libraries are required
+ tornado==4.2.1
+ setproctitle==1.1.8
+ nose==1.3.3
Issues
------
Please report any issues via `github issues <https://github.com/bufferx/twork/issues>`_
=====
twork is a Tornado Application FrameWork, it supports plug-in module
injection, the module called TworkApp.
Features
--------
Plug-in
~~~~~~~
+ TworkApp as a plug-in injected to Twork
Web App Framework
~~~~~~~~~~~~~~~~~
+ Control(WebApplication)/Model(RequestHandler) separation, users
simply writing Handler Model
+ Web RequestHandler should be Inherited from
twork.web.action.base.BaseHandler
Unified Infrastructure
~~~~~~~~~~~~~~~~~~~~~~
+ Web access logging
+ Status statistics
+ Overload protection
+ IP checking
+ Others
Open Design
~~~~~~~~~~~
+ Not only for web application framework
+ Can be directly embedded other control model, like that the custom
protol server-app
+ Custom Logging Support
Scaffold Support
~~~~~~~~~~~~~~~~
+ Build your own Tornado Application
+ As a app module injected to twork
Easy Maintainable
~~~~~~~~~~~~~~~~~
+ Script Tools: log cut, log reopen, tworkd kill and others
+ Consistent process name: twork::hello/1.0.0.0
Usage
-----
Environment
~~~~~~~~~~~
virtualenv is recommend.
+ `virtualenv <http://www.virtualenv.org/en/latest>`_ is a tool to create isolated Python environments
+ Initialize and enter the app virtualenv
+ For example, creating the hello application here
Install twork
~~~~~~~~~~~~~
+ pip install `twork <https://pypi.python.org/pypi/twork>`_
+ easy_install `twork <https://pypi.python.org/simple/twork>`_
TworkApp Build
~~~~~~~~~~~~~~
Create your own tornado application based on twork.
+ twork-admin -app=hello -prefix=~/workspace
+ cd ~/workspace
Web Handler(Optional)
`````````````````````
+ write your web request handler in hello/hello/web/action directory,
the handler should be Inherited from twork.web.action.base.BaseHandler
+ add uri:handler map to HANDLERS in hello/hello/app.py
Run TworkApp within twork
~~~~~~~~~~~~~~~~~~~~~~~~~
+ make install
+ tworkd -app_module=hello.app OR tworkd -config_file=conf/twork.conf
Access the web server
~~~~~~~~~~~~~~~~~~~~
+ http://localhost:8000/v1.0/hello/stats
+ http://localhost:8000/v1.0/twork/stats
Check Htpp Response
~~~~~~~~~~~~~~~~~~~~
+ Server: TWS/2.0.0.5
+ TworkApp: HELLO/1.0.0.0
Requirements
------------
The following libraries are required
+ tornado==4.2.1
+ setproctitle==1.1.8
+ nose==1.3.3
Issues
------
Please report any issues via `github issues <https://github.com/bufferx/twork/issues>`_
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
twork-2.0.14-py2-none-any.whl
(44.9 kB
view details)
File details
Details for the file twork-2.0.14-py2-none-any.whl
.
File metadata
- Download URL: twork-2.0.14-py2-none-any.whl
- Upload date:
- Size: 44.9 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4042efc119b5f7a9aeb86d3a9dd50cd3ce6c4daab53419117fbe264963d0b482 |
|
MD5 | 3bcd1aa4d663eca248272b90de87e910 |
|
BLAKE2b-256 | 6ed480a2e0682ecf9a9289a7f1b3101007440016b7d4c182f2f0ec1007823e3d |