billing-audit-1.0.1
توضیحات
Billing audit utils
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | billing-audit-1.0.1 |
| نام | billing-audit |
| نسخه کتابخانه | 1.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | vuonglv |
| ایمیل نویسنده | vuonglv@vccloud.vn |
| آدرس صفحه اصلی | https://git.paas.vn/devteam/billing/audit-services/audit-utils |
| آدرس اینترنتی | https://pypi.org/project/billing-audit/ |
| مجوز | - |
# AUDIT UTILS
Các function dùng để dùng lại ở số lượng lớn audit repos
## usages
1. DatabaseWrapper: thêm database session cho task celery
```python
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 ❤️`
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl billing-audit-1.0.1:
pip install billing-audit-1.0.1.whl
نصب پکیج tar.gz billing-audit-1.0.1:
pip install billing-audit-1.0.1.tar.gz