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 details)
Built Distribution
File details
Details for the file billing_audit-1.0.1.tar.gz
.
File metadata
- Download URL: billing_audit-1.0.1.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b33e8855948de7adea4ed6695e336bff8d4b558a961b643ef296ec16168a0bd5 |
|
MD5 | dfde5c1d5875501ae023f771a33c91ee |
|
BLAKE2b-256 | 2526c144c2c83263088fed5d9559dbfccc725c10047bcf042e417473f6e5be86 |
File details
Details for the file billing_audit-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: billing_audit-1.0.1-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24c5e8542cb32ede9aadc39bdc05554a43aea014858c83df4fd9a8a0547bc730 |
|
MD5 | a1c8d87b254f76a330d6c28b4d12e6e6 |
|
BLAKE2b-256 | dc0e4100d3456f61f69ae2cf87f92132e4013b73fd4df6f4651a9b04fb8e0c50 |