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 ❤️
Metadata
Release files for billing-audit 1.0.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 | |
|---|---|---|---|
| billing_audit-1.0.1.tar.gz | 2.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| billing_audit-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.0 kB
Release files / billing_audit-1.0.1.tar.gz
| Download URL | billing_audit-1.0.1.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b33e8855948de7adea4ed6695e336bff8d4b558a961b643ef296ec16168a0bd5
|
|
BLAKE2b-256 checksum How to use checksums |
2526c144c2c83263088fed5d9559dbfccc725c10047bcf042e417473f6e5be86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / billing_audit-1.0.1-py3-none-any.whl
| Download URL | billing_audit-1.0.1-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24c5e8542cb32ede9aadc39bdc05554a43aea014858c83df4fd9a8a0547bc730
|
|
BLAKE2b-256 checksum How to use checksums |
dc0e4100d3456f61f69ae2cf87f92132e4013b73fd4df6f4651a9b04fb8e0c50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|