guillotina_evolution
Addon that provides evolutions/migrations to create or update objects in your Guillotina containers.
Install
pip install guillotina_evolution
Configure
Add the following values in app_settings:
app_settings = {
"applications": [
"guillotina_evolution",
],
"commands": {
"g-evolve": "guillotina_evolution.commands.evolve.EvolveCommand",
},
Configure your app addon to initialize guillotina_evolution when is installed:
from guillotina.component import get_utility
from guillotina_evolution.interfaces import IEvolutionUtility
@configure.addon(name="app", title="Your guillotina app")
class ManageAddon(Addon):
@classmethod
async def install(cls, container, request):
utility = get_utility(IEvolutionUtility)
utility.install() # initialize current generation with the greatest registered generation
# ...
Write your evolver
Create a folder evolutions inside your guillotina app that contains the following files:
app/evolutions/__init__.py
from .r20190118 import * # noqa
# Don't forget to add all rXXXXXXXX.py!
app/evolutions/r20190118.py
from guillotina_evolution.utils import register_evolution
@register_evolution(1)
async def evolver(container):
async for item in container.async_items():
item.title = item.title + ' (Migrated)'
item.register()
Update the includeme() of your app:
app/__init__.py
def includeme(root):
# ...
configure.scan("app.evolutions")
Evolve
Run guillotina command g-evolve to run your migrations.
g -c config.yaml g-evolve
Metadata
Release files for guillotina-evolution 1.1.2
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 |
|---|---|---|---|---|
| guillotina_evolution-1.1.2.tar.gz | 17.0 kB | Without provenance | Details for guillotina_evolution-1.1.2.tar.gz |
Release files / guillotina_evolution-1.1.2.tar.gz
| Download URL | guillotina_evolution-1.1.2.tar.gz |
|---|---|
| Size | 17.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f844a9bb4c97be77be82bf5a382a6a0545768a7f6c6946976fbcdf4a82077879
|
|
BLAKE2b-256 checksum How to use checksums |
a9571d41f7f37ffbf9f5e7aeb6418cc5f085d7ef2ef2e953052f3d4a803ec762
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.1
|
Security for guillotina-evolution 1.1.2
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.