SQLAlchemy dependency for nameko services
Project description
A SQLAlchemy dependency for nameko, enabling services to interface with a relational database.
Usage
from nameko_sqlalchemy import Session
from .models import Model, DeclarativeBase
class Service(object):
session = Session(DeclarativeBase)
@entrypoint
def write_to_db(self):
model = Model(...)
self.session.add(model)
self.session.commit()
@entrypoint
def query_db(self):
queryset = self.session.query(Model).filter(...)
...
Database drivers
You may use any database driver compatible with SQLAlchemy provided it is safe to use with eventlet. This will include all pure-python drivers. Known safe drivers are:
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
File details
Details for the file nameko-sqlalchemy-0.0.2.tar.gz
.
File metadata
- Download URL: nameko-sqlalchemy-0.0.2.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46b378d45e9a34cce2ad96e57aac2af5774ef2d79224b4bec2ec193bc7918a8e |
|
MD5 | 67b4cf8afe27935bfd0da2209f95dcd2 |
|
BLAKE2b-256 | 805550061575c9ba0bc62e5367ef3d016ae07c0d0e1100c44671f4d5744ae019 |