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.0.tar.gz
(1.6 kB
view hashes)
Built Distribution
Close
Hashes for billing_audit-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1db5fb7cb4f4be98693430ab69d7ca504eaa336f60ab7acf2e3697fd1a477c87 |
|
MD5 | 317dd1a430e705fea8aa0cf834ba2a0f |
|
BLAKE2b-256 | e5dcd6c21185ccd54247c9f2f18dc9b28a11e4afc866625daf7de97f378f6739 |