Third-party for apistar using pony orm
Project description
Third-party for apistar using pony orm
License : GNU General Public License v3
Documentation: https://apistar_ponyorm.readthedocs.org/en/latest/
Features
Apistar Hook : PonyDBSession which give auto apply db_session to views.
Usage
This should be added in App declaration :
app = App(routes=[route], event_hooks=[PonyDBSession()])
# main app.py file
from apistar_ponyorm import PonyDBSession
# ...
app = App(routes=[route], event_hooks=[PonyDBSession()])
# myviews.py
from myproject import db # PonyORM Database Instance
def myviews():
retun db.MyEntity.to_dict()
# No need to add @db_session
Changelog
- 0.2.0 :
add PonyDBSession
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
apistar-ponyorm-0.2.5.tar.gz
(6.0 kB
view hashes)
Built Distribution
Close
Hashes for apistar_ponyorm-0.2.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffbaa8b8c7034d5e42771a1c99c8f9dcc89903e66099bbbc022604f94282e12c |
|
MD5 | 730e7b035a81cc31a3e6c691e86fb9b3 |
|
BLAKE2b-256 | 34e337cdeea3f5d3bcda6f54c17012ab6bbd8bce6be9f802305b65d4cf3eb4aa |