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.55.tar.gz
(13.6 kB
view details)
Built Distribution
cullinan-0.55-py3-none-any.whl
(14.3 kB
view details)
File details
Details for the file cullinan-0.55.tar.gz
.
File metadata
- Download URL: cullinan-0.55.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f30b4a79cd04b7a9ddb95331d3891a82c2df92cefbf1753c06a1999bdebc9e57 |
|
MD5 | 1d229f26103cb0791958215126a33b89 |
|
BLAKE2b-256 | 646a67e627b8a6ad59ab70aaf7ad0e438a3bee33eedcbc4ac88940dc698a5d56 |
File details
Details for the file cullinan-0.55-py3-none-any.whl
.
File metadata
- Download URL: cullinan-0.55-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00c6fd2850653ffc1bf30e58c3c9e343e3f0e54fe491a18e4fad9e0312e55865 |
|
MD5 | 21c602658b2901652ad89733aecfd9e4 |
|
BLAKE2b-256 | e8ba702bfb559fda0cf5eed45131ad224040b117e622644db6c7ea39fad12886 |