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.1.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.2.tar.gz
(6.2 kB
view hashes)
Built Distribution
Close
Hashes for apistar_ponyorm-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dcce98cd645ee6761670fd1e8acfdc40d5c68700ecdc9d5ab1544ca56a278d0 |
|
MD5 | 37a58372cf8b79abe66678a174030c67 |
|
BLAKE2b-256 | 9494b2b915122857f91277d2e805b43f04c337737092a36e55635d72cb0e5c15 |