Name | django-signoffs JSON |
Version |
0.3.12
JSON |
| download |
home_page | None |
Summary | A mico-framework for collecting lightweight, non-crypto "signatures" for virtually anything. |
upload_time | 2024-11-21 23:26:23 |
maintainer | None |
docs_url | None |
author | None |
requires_python | <4.0,>=3.8 |
license | MIT License Copyright (c) 2022, Joseph Fall Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
django-signoffs
|
VCS |
|
bugtrack_url |
|
requirements |
asgiref
django
django-fsm
persisting-theory
pytz
regex
sqlparse
typing-extensions
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Django Signoffs
[![PyPI Version](https://img.shields.io/pypi/v/django-signoffs.svg)](https://pypi.python.org/pypi/django-signoffs)
[![Docs Status](https://readthedocs.org/projects/django-signoffs/badge/?version=latest)](https://django-signoffs.readthedocs.io/en/latest/?version=latest)
[![Tests](https://github.com/powderflask/django-signoffs/actions/workflows/pytest.yaml/badge.svg)](https://github.com/powderflask/django-signoffs/actions/workflows/pytest.yaml)
A mico-framework for collecting lightweight, non-crypto "signatures" for virtually anything.
* `Signoff` - a permitted user agrees to something at a time.
* `Approval` - a set of `Signoffs` that trigger a state change when the `SigningOrder` is complete.
* `Approval Process` - a sequence of `Approvals` that drive a Finite State Machine.
## Quick Start
1. Install the `django-signoffs` package from PyPI
```bash
$ pip install django-signoffs
```
2. Add `signoffs` to `INSTALLED_APPS`:
```python
INSTALLED_APPS = [
...,
"signoffs",
...,
]
```
## Features
`django-signoffs` has 3 tiers. Import and use only the features you need...
### signoffs.signoffs
A `Signoff` records that a user agreed to some statement at a time.
`signoffs.signoffs` provides a framework for defining use-cases
that fall within this broad requirement.
Core features:
- `AbstractSignet` and `AbstractRevokedSignet` Models (persistence layer)
- Base `Signoff` Types, with injectable business and presentation logic...
- `SignoffLogic` (permissions and buisness logic)
- `SignoffFormsManager` and `SignoffRenderer` (presentation layer)
- `SignoffUrlsManager` (custom end-points)
- Signoff "forward" relation: `SignoffOneToOneField`
- Signoff "reverse" relation Manager: `SignoffSet` (many-to-one)
- Declarative signing order automation: `SigningOrder`
- Template tag: `{% render_signoff my_signoff %}`
### signoffs.approvals
An `Approval` records whether some condition was met at some point in time.
Essentially, it is a 2-state machine, designed to change states
when one or more `Signoffs` are completed, in some defined `SigningOrder`.
Core features:
- `AbstractApprovalSignet` and `AbstractApprovalStamp` Models (persistence layer)
- Base `Approval` Types, with injectable business and presentation logic...
- `ApprovalLogic` (business logic)
- `ApprovalStatus` and `ApprovalRenderer` (presentation layer)
- `ApprovalUrlsManager` (custom end-points)
- Approval "forward" relation: `ApprovalOneToOneField`
- Approval "reverse" relation Manager: `ApprovalSet` (experimental)
- Template tag: `{% render_approval my_approval %}`
### signoffs.process
An `ApprovalsProcess` defines a sequence of `Approvals` and the state changes and/or
side effects triggered by approving or revoking each of them.
Core Features:
- `ApprovalsProcess` (a basic linear sequence of `Approvals`)
- `FsmApprovalsProcess` (state-changes and sequencing defined by `django-fsm`)
## Opt-in
### Contrib Models
#### signoffs.contrib.signets
Signoffs core defines only abstract models, no migrations.
`signoffs.contrib.signets` provide concrete models that cover the basic use-cases. To opt-in, you must:
```python
INSTALLED_APPS = [
...,
"signoffs.contrib.signets",
...,
]
```
```bash
$ python manage.py migrate signoffs_signets
```
Core Features:
- Concrete Models: `Signet`, and `RevokedSignet` provide persistence layer for
- Concrete Signoffs: `SimpleSignoff`, `RevokableSignoff`, and `IrrevokableSignoff`
#### signoffs.contrib.approvals
Approvals core defines only abstract models, no migrations.
`signoffs.contrib.approvals` provide concrete models with basic relations. To opt-in you must:
```python
INSTALLED_APPS = [
...,
"signoffs.contrib.approvals",
...,
]
```
```bash
$ python manage.py migrate signoffs_approvals
```
Core Features:
- Concrete Models: `ApprovalSignet`, and `RevokedApprovalSignet` define a FK relation to...
- `Stamp` which provides persistence layer for...
- `SimpleApproval` and `IrrevokableApproval`, which play nicely with...
- `ApprovalSignoff`, which uses the Concrete Models for persistence.
### FsmApprovalsProcess
Signoffs is integrated with [django-fsm](https://pypi.org/project/django-fsm/),
allowing approval processes to drive a finite state machine.
To opt-in:
```bash
$ pip install django-signoffs[fsm]
```
## Get Me Some of That
* [Source Code](https://github.com/powderflask/django-signoffs)
* [Read The Docs](https://django-signoffs.readthedocs.io/en/latest/)
* [Issues](https://github.com/powderflask/django-signoffs/issues)
* [PyPI](https://pypi.org/project/django-signoffs)
[MIT License](https://github.com/powderflask/django-signoffs/blob/master/LICENSE)
### Check Out the Demo App
1. `pip install -e git+https://github.com/powderflask/django-signoffs.git#egg=django-signoffs`
1. `python django-signoffs/manage.py install_demo`
1. `python django-signoffs/manage.py runserver`
### Acknowledgments
Special thanks to BC Hydro, [Chartwell](https://crgl.ca/),
and all [Contributors](https://github.com/powderflask/django-signoffs/graphs/contributors)
#### Technology Colophon
Without django and the django dev team, the universe would have fewer rainbows and ponies.
Signoffs approval process can be integrated on the deceptively clever [`django_fsm`][1] Friendly Finite State Machine.
Signoffs uses a global registry as store for singleton code objects - thanks [`persisting_theory`][2]!
This package was originally created with [`cookiecutter`][3] and the [`cookiecutter-pypackage`][4] project template.
[1]: <https://github.com/viewflow/django-fsm>
[2]: <https://github.com/kiwnix/persisting-theory>
[3]: <https://github.com/audreyr/cookiecutter>
[4]: <https://github.com/audreyr/cookiecutter-pypackage>
## For Developers
```bash
$ pip install -r reqirements_dev.txt
```
### Tests
```bash
$ pytest
```
or
```bash
$ tox
```
### Code Style / Linting
```bash
$ isort
$ black
$ flake8
```
### Versioning
* [Semantic Versioning](https://semver.org/)
```bash
$ bumpver show
```
### Docs
* [Sphinx](https://www.sphinx-doc.org/en/master/) + [MyST parser](https://myst-parser.readthedocs.io/en/latest/intro.html)
* [Read The Docs](https://readthedocs.org/projects/django-signoffs/)
### Build / Deploy Automation
* [invoke](https://www.pyinvoke.org/)
```bash
$ invoke -l
```
* [GitHub Actions](https://docs.github.com/en/actions) (see [.github/workflows](https://github.com/powderflask/django-signoffs/tree/master/.github/workflows))
* [GitHub Webhooks](https://docs.github.com/en/webhooks) (see [settings/hooks](https://github.com/powderflask/django-signoffs/settings/hooks))
Raw data
{
"_id": null,
"home_page": null,
"name": "django-signoffs",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "django-signoffs",
"author": null,
"author_email": "Joseph Fall <powderflask@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/f4/a4/1a2df0b19cf8ba39eb57716bf1a0da3a8dfaa124aa07cab5b5defc8b14d4/django_signoffs-0.3.12.tar.gz",
"platform": null,
"description": "# Django Signoffs\n\n[![PyPI Version](https://img.shields.io/pypi/v/django-signoffs.svg)](https://pypi.python.org/pypi/django-signoffs)\n[![Docs Status](https://readthedocs.org/projects/django-signoffs/badge/?version=latest)](https://django-signoffs.readthedocs.io/en/latest/?version=latest)\n[![Tests](https://github.com/powderflask/django-signoffs/actions/workflows/pytest.yaml/badge.svg)](https://github.com/powderflask/django-signoffs/actions/workflows/pytest.yaml)\n\nA mico-framework for collecting lightweight, non-crypto \"signatures\" for virtually anything.\n * `Signoff` - a permitted user agrees to something at a time.\n * `Approval` - a set of `Signoffs` that trigger a state change when the `SigningOrder` is complete.\n * `Approval Process` - a sequence of `Approvals` that drive a Finite State Machine.\n\n## Quick Start\n\n1. Install the `django-signoffs` package from PyPI\n ```bash\n $ pip install django-signoffs\n ```\n\n2. Add `signoffs` to `INSTALLED_APPS`:\n ```python\n INSTALLED_APPS = [\n ...,\n \"signoffs\",\n ...,\n ]\n ```\n\n## Features\n`django-signoffs` has 3 tiers. Import and use only the features you need...\n\n### signoffs.signoffs\nA `Signoff` records that a user agreed to some statement at a time.\n`signoffs.signoffs` provides a framework for defining use-cases \nthat fall within this broad requirement.\n\nCore features:\n- `AbstractSignet` and `AbstractRevokedSignet` Models (persistence layer)\n- Base `Signoff` Types, with injectable business and presentation logic...\n - `SignoffLogic` (permissions and buisness logic)\n - `SignoffFormsManager` and `SignoffRenderer` (presentation layer)\n - `SignoffUrlsManager` (custom end-points)\n- Signoff \"forward\" relation: `SignoffOneToOneField`\n- Signoff \"reverse\" relation Manager: `SignoffSet` (many-to-one)\n- Declarative signing order automation: `SigningOrder` \n- Template tag: `{% render_signoff my_signoff %}`\n\n### signoffs.approvals\nAn `Approval` records whether some condition was met at some point in time.\nEssentially, it is a 2-state machine, designed to change states \nwhen one or more `Signoffs` are completed, in some defined `SigningOrder`.\n\nCore features:\n- `AbstractApprovalSignet` and `AbstractApprovalStamp` Models (persistence layer)\n- Base `Approval` Types, with injectable business and presentation logic...\n - `ApprovalLogic` (business logic)\n - `ApprovalStatus` and `ApprovalRenderer` (presentation layer)\n - `ApprovalUrlsManager` (custom end-points)\n- Approval \"forward\" relation: `ApprovalOneToOneField`\n- Approval \"reverse\" relation Manager: `ApprovalSet` (experimental)\n- Template tag: `{% render_approval my_approval %}`\n\n### signoffs.process\nAn `ApprovalsProcess` defines a sequence of `Approvals` and the state changes and/or\nside effects triggered by approving or revoking each of them.\n\nCore Features:\n- `ApprovalsProcess` (a basic linear sequence of `Approvals`)\n- `FsmApprovalsProcess` (state-changes and sequencing defined by `django-fsm`)\n\n## Opt-in\n\n### Contrib Models\n\n#### signoffs.contrib.signets\nSignoffs core defines only abstract models, no migrations.\n`signoffs.contrib.signets` provide concrete models that cover the basic use-cases. To opt-in, you must:\n\n ```python\n INSTALLED_APPS = [\n ...,\n \"signoffs.contrib.signets\",\n ...,\n ]\n ```\n ```bash\n $ python manage.py migrate signoffs_signets\n ```\n\nCore Features:\n - Concrete Models: `Signet`, and `RevokedSignet` provide persistence layer for\n - Concrete Signoffs: `SimpleSignoff`, `RevokableSignoff`, and `IrrevokableSignoff` \n\n#### signoffs.contrib.approvals\nApprovals core defines only abstract models, no migrations.\n`signoffs.contrib.approvals` provide concrete models with basic relations. To opt-in you must:\n\n ```python\n INSTALLED_APPS = [\n ...,\n \"signoffs.contrib.approvals\",\n ...,\n ]\n ```\n ```bash\n $ python manage.py migrate signoffs_approvals\n ```\n\nCore Features:\n - Concrete Models: `ApprovalSignet`, and `RevokedApprovalSignet` define a FK relation to...\n - `Stamp` which provides persistence layer for...\n - `SimpleApproval` and `IrrevokableApproval`, which play nicely with...\n - `ApprovalSignoff`, which uses the Concrete Models for persistence.\n\n### FsmApprovalsProcess\nSignoffs is integrated with [django-fsm](https://pypi.org/project/django-fsm/), \nallowing approval processes to drive a finite state machine.\nTo opt-in:\n ```bash\n $ pip install django-signoffs[fsm]\n ```\n\n## Get Me Some of That\n* [Source Code](https://github.com/powderflask/django-signoffs)\n* [Read The Docs](https://django-signoffs.readthedocs.io/en/latest/)\n* [Issues](https://github.com/powderflask/django-signoffs/issues)\n* [PyPI](https://pypi.org/project/django-signoffs)\n\n[MIT License](https://github.com/powderflask/django-signoffs/blob/master/LICENSE)\n\n### Check Out the Demo App\n\n1. `pip install -e git+https://github.com/powderflask/django-signoffs.git#egg=django-signoffs`\n1. `python django-signoffs/manage.py install_demo`\n1. `python django-signoffs/manage.py runserver`\n\n\n### Acknowledgments\nSpecial thanks to BC Hydro, [Chartwell](https://crgl.ca/),\nand all [Contributors](https://github.com/powderflask/django-signoffs/graphs/contributors)\n\n#### Technology Colophon\n\nWithout django and the django dev team, the universe would have fewer rainbows and ponies.\nSignoffs approval process can be integrated on the deceptively clever [`django_fsm`][1] Friendly Finite State Machine.\nSignoffs uses a global registry as store for singleton code objects - thanks [`persisting_theory`][2]!\n\nThis package was originally created with [`cookiecutter`][3] and the [`cookiecutter-pypackage`][4] project template.\n\n[1]: <https://github.com/viewflow/django-fsm>\n[2]: <https://github.com/kiwnix/persisting-theory>\n[3]: <https://github.com/audreyr/cookiecutter>\n[4]: <https://github.com/audreyr/cookiecutter-pypackage>\n\n## For Developers\n ```bash\n $ pip install -r reqirements_dev.txt\n ```\n\n### Tests\n ```bash\n $ pytest\n ```\nor\n ```bash\n $ tox\n ```\n\n### Code Style / Linting\n ```bash\n $ isort\n $ black\n $ flake8\n ```\n\n### Versioning\n * [Semantic Versioning](https://semver.org/)\n ```bash\n $ bumpver show\n ```\n\n### Docs\n * [Sphinx](https://www.sphinx-doc.org/en/master/) + [MyST parser](https://myst-parser.readthedocs.io/en/latest/intro.html)\n * [Read The Docs](https://readthedocs.org/projects/django-signoffs/)\n\n### Build / Deploy Automation\n * [invoke](https://www.pyinvoke.org/)\n ```bash\n $ invoke -l\n ```\n * [GitHub Actions](https://docs.github.com/en/actions) (see [.github/workflows](https://github.com/powderflask/django-signoffs/tree/master/.github/workflows))\n * [GitHub Webhooks](https://docs.github.com/en/webhooks) (see [settings/hooks](https://github.com/powderflask/django-signoffs/settings/hooks))\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2022, Joseph Fall Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "A mico-framework for collecting lightweight, non-crypto \"signatures\" for virtually anything.",
"version": "0.3.12",
"project_urls": {
"Documentation": "https://django-signoffs.readthedocs.io",
"Homepage": "https://github.com/powderflask/django-signoffs",
"Repository": "https://github.com/powderflask/django-signoffs"
},
"split_keywords": [
"django-signoffs"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "145020cd056e259a24189dceeb3d4c2aed628aaf2ae32d659cf07a502c96348c",
"md5": "365cb8880c7dbf9c34d7245de04bd22e",
"sha256": "c7528d0c4fb4bb829c97dc550c2593fb194ea0327538459494bc07fbbd260d5c"
},
"downloads": -1,
"filename": "django_signoffs-0.3.12-py3-none-any.whl",
"has_sig": false,
"md5_digest": "365cb8880c7dbf9c34d7245de04bd22e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 109832,
"upload_time": "2024-11-21T23:26:21",
"upload_time_iso_8601": "2024-11-21T23:26:21.462603Z",
"url": "https://files.pythonhosted.org/packages/14/50/20cd056e259a24189dceeb3d4c2aed628aaf2ae32d659cf07a502c96348c/django_signoffs-0.3.12-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f4a41a2df0b19cf8ba39eb57716bf1a0da3a8dfaa124aa07cab5b5defc8b14d4",
"md5": "73329d99847402a312da89c8c12f5a6c",
"sha256": "f9244620dfa9502cfd791a10ba7a50f763d468a7fb3215b790a2bfb29e4d7e4e"
},
"downloads": -1,
"filename": "django_signoffs-0.3.12.tar.gz",
"has_sig": false,
"md5_digest": "73329d99847402a312da89c8c12f5a6c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 96816,
"upload_time": "2024-11-21T23:26:23",
"upload_time_iso_8601": "2024-11-21T23:26:23.744396Z",
"url": "https://files.pythonhosted.org/packages/f4/a4/1a2df0b19cf8ba39eb57716bf1a0da3a8dfaa124aa07cab5b5defc8b14d4/django_signoffs-0.3.12.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-21 23:26:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "powderflask",
"github_project": "django-signoffs",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "asgiref",
"specs": [
[
"==",
"3.7.2"
]
]
},
{
"name": "django",
"specs": [
[
"==",
"3.2.20"
]
]
},
{
"name": "django-fsm",
"specs": [
[
"==",
"3.0.0"
]
]
},
{
"name": "persisting-theory",
"specs": [
[
"==",
"1.0"
]
]
},
{
"name": "pytz",
"specs": [
[
"==",
"2023.3"
]
]
},
{
"name": "regex",
"specs": [
[
"==",
"2023.6.3"
]
]
},
{
"name": "sqlparse",
"specs": [
[
"==",
"0.4.4"
]
]
},
{
"name": "typing-extensions",
"specs": [
[
"==",
"4.7.1"
]
]
}
],
"tox": true,
"lcname": "django-signoffs"
}