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.8.tar.gz
(6.3 kB
view hashes)
Built Distribution
Close
Hashes for apistar_ponyorm-0.2.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 888f08c7a3bffd1150ae92aa465f42f24ef8e8413ef1b9c688f331f2fc26ac40 |
|
MD5 | 72418e05b1528b29bccd1b740abba8bc |
|
BLAKE2b-256 | c5ea6fbfa180999045f252a3167371503f95668e0f9f7f2a788e2afa451c25c6 |