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.57.tar.gz
(13.7 kB
view details)
Built Distribution
cullinan-0.57-py3-none-any.whl
(14.7 kB
view details)
File details
Details for the file cullinan-0.57.tar.gz
.
File metadata
- Download URL: cullinan-0.57.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 | 12334c54596ba62d3c46062dab516c7e3f79b2bfad3bd2fa319ba854a8168f30 |
|
MD5 | ec8f89fa08db2b936a9b50e3e3e3b270 |
|
BLAKE2b-256 | 57b713e7c3151f1af20a9fb7557af9a50eae42bd343ca02483d095562e7a1f1f |
File details
Details for the file cullinan-0.57-py3-none-any.whl
.
File metadata
- Download URL: cullinan-0.57-py3-none-any.whl
- Upload date:
- Size: 14.7 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 | 7350471f7b7beffe3400caee9bd57a0584ec1208a48e9890b3b2d730a2216ab1 |
|
MD5 | 8325e5dbe81054f9ad62212194ae02a2 |
|
BLAKE2b-256 | 1c328160b8149b1ded213104928d5d5348bd9a2fa5ac95922faad1576cbed674 |