pyramid_services_sqlalchemy
SQLAlchemy factories for pyramid_services.
This module provides removing SQLAlchemy’s boiler plates from your pyramid application codes.
In your pastedeploy.ini:
sqlalchemy.url = ENGINE://DBUSER:PASSWORD@DBHOST/DBNAME
In your application factory:
config.include('pyramid_services_sqlalchemy')
In your views:
from pyramid_services_sqlalchemy import get_tm_session
def aview(request):
db = get_tm_session(request)
or you can use request.find_service:
from pyramid_services_sqlalchemy import IDBSession
def aview(request):
db = request.find_service(IDBSession)
If you want to use multiple connections, pastedeploy.ini:
sqlalchemy.names = readonly readwrite sqlalchemy.readonly.url = ENGINE://READ_DBUSER:PASSWORD@DBHOST/DBNAME sqlalchemy.readwrite.url = ENGINE://WRITE_DBUSER:PASSWORD@DBHOST/DBNAME
and in your views:
from pyramid_services_sqlalchemy import get_tm_session
def aview(request):
db = get_tm_session(request, name='readonly')
def a_write_view(request):
db = get_tm_session(request, name='readwrite')
Change History
0.1.1 - 2018-08-11
Update README
0.1 - 2018-08-11
Initial release.
Metadata
Release files for pyramid-services-sqlalchemy 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyramid_services_sqlalchemy-0.1.1.tar.gz | 4.0 kB | Without provenance | Details for pyramid_services_sqlalchemy-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyramid_services_sqlalchemy-0.1.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for pyramid_services_sqlalchemy-0.1.1-py2.py3-none-any.whl |
Total release size: 7.4 kB
Release files / pyramid_services_sqlalchemy-0.1.1.tar.gz
| Download URL | pyramid_services_sqlalchemy-0.1.1.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a77489cf528cb0e10c4336ecd097c95e7712da1438572a6bc390f5bfca7353b
|
|
BLAKE2b-256 checksum How to use checksums |
18e236c0f1d081837dfa9d50f017d1009ccfb6c139913a2ceafc0b51f46277dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
|
Release files / pyramid_services_sqlalchemy-0.1.1-py2.py3-none-any.whl
| Download URL | pyramid_services_sqlalchemy-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
11a9c39424a1d240a2711e27ed4b41d9e82a26b6893cac5fd58cb90d886b4ee4
|
|
BLAKE2b-256 checksum How to use checksums |
b5139094b32e3c32daa9f334edc3cdf1ede962e17e18b4e75eb077fc8dc21d3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
|
Security for pyramid-services-sqlalchemy 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.