Masonite Audit
Introduction
Keep track of all your model changes with ease.
Getting Started
Install the package using pip:
pip install masonite-audit
Add AuditProvider to your project in config/providers.py:
# config/providers.py
# ...
from masonite_audit import AuditProvider
# ...
PROVIDERS = [
# ...
# Third Party Providers
AuditProvider,
# ...
]
Publish the package configuration files.
python craft package:publish masonite-audit
This will add migrations and other masonite-audit related configuration to your project. Run your migrations to create the related database tables.
python craft migrate
Finally, inherit Audit mixin into all the models for which you need audit logging.
from masonite_audit.mixins import Audit
class YourModel(Audit):
pass
If you want to get the audit history for a model, you can use the history method:
user = User.find(1)
user.history()
In order to rollback to previous versions of a model, you can use the rollback method:
user = User.find(1)
user.rollback() # to rollback to previous version
# or
user.rollback(step=4) # to rollback to version 4
License
Masonite Audit is open-sourced software licensed under the MIT license.
Metadata
Release files for masonite-audit 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| masonite-audit-0.0.6.tar.gz | 75.7 kB | Without provenance | Details for masonite-audit-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| masonite_audit-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for masonite_audit-0.0.6-py3-none-any.whl |
Total release size: 83.1 kB
Release files / masonite-audit-0.0.6.tar.gz
| Download URL | masonite-audit-0.0.6.tar.gz |
|---|---|
| Size | 75.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dfb5b2684f333ee39b4add0013c2cc9b96d6bdd77b38fe6c12b0f0de24add97f
|
|
BLAKE2b-256 checksum How to use checksums |
84f5c51de17bc1582f888101b991ecfd234c62c4f767492b13aef4e8a1c23f4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.14
|
Release files / masonite_audit-0.0.6-py3-none-any.whl
| Download URL | masonite_audit-0.0.6-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84daa3e2ec16474d83914946c0083dcfaf8b9281568bc5268f517c2b89be309a
|
|
BLAKE2b-256 checksum How to use checksums |
bfc2518da440ecd53908e8a0ea60ce695e293ae9f9d9d21e9e94c22e03679af6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.14
|
Security for masonite-audit 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.