Cullinan is written based on tornado and Sqlalchemy to help the project quickly build web application
Project description
_____ _ _ _
/ ____| | | (_)
| | _ _| | |_ _ __ __ _ _ __
| | | | | | | | | '_ \ / _` | '_ \
| |___| |_| | | | | | | | (_| | | | |
\_____\__, _|_|_|_|_| |_|\__,_|_| |_|
Cullinan
Cullinan is written based on tornado and Sqlalchemy to help the project quickly build web application
How to use
install
pip install cullinan
demo
File controller:
from cullinan.controller import controller, get_api
@controller()
class TestController:
@get_api(uri='/get', query_params=['id', 'name'])
def get(self, query_params):
return self.TestService.test(query_params['id'], query_params['name'])
File service:
from cullinan.service import Service, service
@service
class TestService(Service):
def test(self, id, name):
self.response.set_body({ 'id': id, 'name': name })
return self.response
File application:
from cullinan import application
def main():
application.run()
if __name__ == '__main__':
main()
Now, A web application demo is completed!
File structure:
project
|----application.py # Web Application main entrance
|----controller # Controller package
| |----TestController.py
|----service # Service package
| |----TestService.py
Wiki
wiki and other related references: https://github.com/plumeink/Cullinan/wiki
Maintainer
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
cullinan-0.52a3.tar.gz
(12.9 kB
view hashes)
Built Distribution
cullinan-0.52a3-py3-none-any.whl
(13.6 kB
view hashes)
Close
Hashes for cullinan-0.52a3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74d238504a1e9f83906e076998ae4f285dca32b91c279d5a6a1185765c9cdd9f |
|
MD5 | 85e32eb44bd7e218ebf09ed2336779fd |
|
BLAKE2b-256 | 670fcc237040564f8923cdd17f5bcef27d72a70ca24c9c576a7fac4bb18a3c80 |