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.service['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.56.tar.gz
(13.7 kB
view details)
Built Distribution
cullinan-0.56-py3-none-any.whl
(14.6 kB
view details)
File details
Details for the file cullinan-0.56.tar.gz
.
File metadata
- Download URL: cullinan-0.56.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc9cd6ec85c5934353e4afeb8d8ac40df0a51f88ef559231f5b60b1ea02a2383 |
|
MD5 | 6397680c3a86fdf0ce81dc39d4a0e3ca |
|
BLAKE2b-256 | 3c979fd8708868b52bb16e059678b08cbbeb8ec4595cd3714d22fcfa205727ab |
File details
Details for the file cullinan-0.56-py3-none-any.whl
.
File metadata
- Download URL: cullinan-0.56-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b343bf36592de4e64398ba9206fc8865d7da63c70f125bf41f90de2d71edeec |
|
MD5 | 59ac1aa45d62d9efe1bbe7a855df4d7b |
|
BLAKE2b-256 | b4dff4fa7e8b3400a2492909841db7f43fb940fe99277ceafe6ddba69c11773c |