{"id":21037454,"url":"https://github.com/vintasoftware/django-data-watcher","last_synced_at":"2025-05-15T14:32:56.761Z","repository":{"id":43233647,"uuid":"413915404","full_name":"vintasoftware/django-data-watcher","owner":"vintasoftware","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-28T22:05:10.000Z","size":300,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":24,"default_branch":"main","last_synced_at":"2023-03-24T04:53:57.265Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vintasoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-05T17:26:04.000Z","updated_at":"2022-10-20T10:30:12.000Z","dependencies_parsed_at":"2023-01-18T14:30:39.672Z","dependency_job_id":null,"html_url":"https://github.com/vintasoftware/django-data-watcher","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Fdjango-data-watcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Fdjango-data-watcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Fdjango-data-watcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Fdjango-data-watcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vintasoftware","download_url":"https://codeload.github.com/vintasoftware/django-data-watcher/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225359701,"owners_count":17462080,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T13:26:22.934Z","updated_at":"2024-11-19T13:26:23.717Z","avatar_url":"https://github.com/vintasoftware.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django Data Watcher\n\n[![Documentation Status](https://readthedocs.org/projects/django-data-watcher/badge/?version=latest)](https://django-data-watcher.readthedocs.io/en/latest/?badge=latest)\n\n## _Django models/data operations observer_\n\nDjango Data Watcher is a library that will make easier to create/mantain side-effects of data operations in your django models.\n\n-   Write once\n-   Have visibility\n-   Acts always on querysets, avoinding bottlenecks\n\n## Requirements\n\n-   Poetry [(installation)](https://python-poetry.org/docs/#installation)\n-   Python 3.6.8\n\n## Development and installation\n\n### VsCode installation\n\n1. copy devcontainer-example.json to devcontainer.json `cp .devcontainer/devcontainer-example.json .devcontainer/devcontainer.json`\n2. click in reopen in container\n3. run poetry install\n\n### VsCode development (after installation)\n\n1. inside vscode integrated terminal run `poetry run which python`\n2. type choose the python returned in the step 1 as the interpretor for vscode\n\n## Roadmap\n\n-   [x] Override save for models\n-   [x] Limit the number of functions on watcher eg. instead of save, \\_save and watched_save have only \\_save and \\_watched_save or maybe just one of those\n-   [x] Make watched_operations restrict\n-   [x] Delete and Create Mixins\n-   [x] Update and Save Mixins\n-   [x] Take a look into \\_default_manager and \\_base_manager (Create specific test cases)\n-   [x] Set gh actions to test and build\n-   [x] Receive params on hooks to check modifications (Update/Save)\n-   [x] Revisite string import for watchers\n-   [x] Remove the need of saying which operation is beeing whatched, infer based on the watcher\n-   [x] Limit the watched operations (only delete, create, update, save)\n-   [x] Packaging\n-   [x] Model.objects.create() calls instance.save().\n-   [x] Publish v1\n-   [ ] Test\n    -   [x] Configure pytest with coverage\n    -   [x] Use Django models and querysets inside tests\n    -   [x] test abstract_watcher\n    -   [x] test decorators\n    -   [x] test mixins [Create, Delete, Update, Save, Union of Save and Delete]\n    -   [x] Relational Testing (A model hook call another model with has hooks)\n    -   [ ] Hooks params\n    -   [ ] Be sure to manager have the model\n    -   [ ] Test with Heritage\n-   [ ] [C] Docs\n    -   [x] Usage\n    -   [x] Tutorial\n    -   [x] Installation\n    -   [x] Badge\n    -   [x] Fix theme\n    -   [ ] Docstrings on the code\n    -   [ ] Hooks params\n    -   [ ] How to Ignore the Hooks\n    -   [ ] Fix Dynamic Version\n    -   [ ] Query and Instance hooks\n    -   [ ] How does it help? Bond or Arch?\n    -   [ ] Redefine docs sections\n    -   [ ] Update Readme (after finishing roadmap)\n-   [x] [F] Have a way of ignoring hooks by param\n-   [x] [F] Should unsaved instance come in all operations\n-   [x] [M] Split decorators.py in a module and reorganzing its typings\n-   [x] [C] Reorganize the imports from root\n-   [x] [F] Create Stubs for decorated models\n-   [x] [F] Hooks Params\n-   [ ] [F] Implement for bulk operations on qs (bulk_create and bulk_update)\n-   [ ] [P] Remove is_overriden func, documment what is needed to be overriden on watchers\n-   [ ] [P] Remove Django dependencies\n-   [ ] [D] [F] Use tox (GH actions is as good as we need?)\n    -   [ ] Create testing matrix for Django versions\n-   [ ] [B] Fix generate_settable Doc\n-   [ ] [B] Verify if the transaction should be durable\n-   [ ] [F] Set MetaParams as model\n-   [ ] [M] Use `_ignore_hooks` instead of `UNWATCHED_operation`, rename it for `_unwatched_operation` and let only run method ref to it.\n-   [ ] [P] Better manage QueryTools - Memory management of numerous qs. Should the watcher decorator always create a new QT, try to reuse it and solve or skip conflicts. (test decorators specified cases in this file.)\n-   [ ] [F] SoftDeletion Mixin\n-   [x] [M] `_generate_settable_for_manager`, `_generate_settable_for_qs`, and `_generate_settable_for_model` should be the same function, and fix typing\n-   [ ] [M] Use [from_queryset and contribute_to_class](https://github.com/django/django/blob/653a7bd7b7c2f7c3ffe6b22be53da1472c491474/django/db/models/manager.py#L103-L118) to generate the manager and associate it with the model\n-   [ ] Application Example also comparing with Django signals\n-   [ ] Talk\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvintasoftware%2Fdjango-data-watcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvintasoftware%2Fdjango-data-watcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvintasoftware%2Fdjango-data-watcher/lists"}