Billing audit utils
Project description
AUDIT UTILS
Các function dùng để dùng lại ở số lượng lớn audit repos
usages
- DatabaseWrapper: thêm database session cho task celery
from audit_utils.database import DatabaseWrapper
from somewhere import BillingDatabaseSession
from somewhere import celery_app
databases_mapping = {"billing": BillingDatabaseSession}
db_wrapper = DatabaseWrapper(databases_mapping)
@celery_app.task(bind=True) # bind=True is required
@db_wrapper.wraps(databases={"billing"})
def task_name(self, *args, **kwargs):
result = do_something_with_db(self.billing)
return result
from billing.audit import ❤️
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
billing_audit-1.0.1.tar.gz
(2.2 kB
view hashes)
Built Distribution
Close
Hashes for billing_audit-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24c5e8542cb32ede9aadc39bdc05554a43aea014858c83df4fd9a8a0547bc730 |
|
MD5 | a1c8d87b254f76a330d6c28b4d12e6e6 |
|
BLAKE2b-256 | dc0e4100d3456f61f69ae2cf87f92132e4013b73fd4df6f4651a9b04fb8e0c50 |