{ "info": { "author": "Jordi Masip", "author_email": "jmasip@vinissimus.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Natural Language :: English", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# guillotina_evolution\n\n\n[![Build Status](https://travis-ci.org/vinissimus/guillotina_evolution.svg?branch=master)](https://travis-ci.org/vinissimus/guillotina_evolution) [![PyPI version](https://badge.fury.io/py/guillotina-evolution.svg)](https://badge.fury.io/py/guillotina-evolution) [![Codcov](https://codecov.io/gh/vinissimus/guillotina_evolution/branch/master/graph/badge.svg)](https://codecov.io/gh/vinissimus/guillotina_evolution/branch/master) ![](https://img.shields.io/pypi/pyversions/guillotina_evolution.svg)\n\nAddon that provides evolutions/migrations to create or update objects in your Guillotina containers.\n\n\n## Install\n\n```console\npip install guillotina_evolution\n```\n\n\n## Configure\n\nAdd the following values in `app_settings`:\n\n```python\napp_settings = {\n \"applications\": [\n \"guillotina_evolution\",\n ],\n \"commands\": {\n \"g-evolve\": \"guillotina_evolution.commands.evolve.EvolveCommand\",\n },\n```\n\nConfigure your app addon to initialize guillotina_evolution when is installed:\n\n```python\nfrom guillotina.component import get_utility\nfrom guillotina_evolution.interfaces import IEvolutionUtility\n\n@configure.addon(name=\"app\", title=\"Your guillotina app\")\nclass ManageAddon(Addon):\n @classmethod\n async def install(cls, container, request):\n utility = get_utility(IEvolutionUtility)\n utility.install() # initialize current generation with the greatest registered generation\n\n # ...\n```\n\n\n## Write your evolver\n\nCreate a folder `evolutions` inside your guillotina app that contains the following files:\n\n`app/evolutions/__init__.py`\n```python\nfrom .r20190118 import * # noqa\n# Don't forget to add all rXXXXXXXX.py!\n```\n\n`app/evolutions/r20190118.py`\n```python\nfrom guillotina_evolution.utils import register_evolution\n\n@register_evolution(1)\nasync def evolver(container):\n async for item in container.async_items():\n item.title = item.title + ' (Migrated)'\n item.register()\n```\n\nUpdate the `includeme()` of your app:\n\n`app/__init__.py`\n```python\ndef includeme(root):\n # ...\n configure.scan(\"app.evolutions\")\n```\n\n\n## Evolve\n\nRun guillotina command `g-evolve` to run your migrations.\n\n```console\ng -c config.yaml g-evolve\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/vinissimus/guillotina_evolution", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "guillotina-evolution", "package_url": "https://pypi.org/project/guillotina-evolution/", "platform": "", "project_url": "https://pypi.org/project/guillotina-evolution/", "project_urls": { "Homepage": "https://github.com/vinissimus/guillotina_evolution" }, "release_url": "https://pypi.org/project/guillotina-evolution/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "", "version": "1.0.1" }, "last_serial": 5977499, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "aaff44175de1d682d17a6501b3627b7d", "sha256": "98d3c029bf6d8850d8f4f608235a6a73977dfb7f65c4e923f895e370da5e7668" }, "downloads": -1, "filename": "guillotina_evolution-0.2.0.tar.gz", "has_sig": false, "md5_digest": "aaff44175de1d682d17a6501b3627b7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4317, "upload_time": "2019-07-15T10:56:52", "url": "https://files.pythonhosted.org/packages/60/5a/0a16fab8bb0844073d9e98e8d2e9da46af1a190b770c9384edf87fde14b6/guillotina_evolution-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "fa6b196e2377b2cfebf70a4ff0dea4df", "sha256": "0bbed58eff13b710cc98528392dcb1acbf39063d84181bbaf16cb7a98b0d6149" }, "downloads": -1, "filename": "guillotina_evolution-0.2.1.tar.gz", "has_sig": false, "md5_digest": "fa6b196e2377b2cfebf70a4ff0dea4df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4477, "upload_time": "2019-07-15T12:20:42", "url": "https://files.pythonhosted.org/packages/99/3f/2bcb058e3040839d5a612d8eba18fe81c07a1b3feb5676ed89918e764b6e/guillotina_evolution-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "00b7c254a8e03db83ca07ee3b7de74ac", "sha256": "358df0a8f69c3fdce339cdd2026f6490ed4670afd4fb3d562a4862f96eb63bd7" }, "downloads": -1, "filename": "guillotina_evolution-0.2.2.tar.gz", "has_sig": false, "md5_digest": "00b7c254a8e03db83ca07ee3b7de74ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16824, "upload_time": "2019-07-18T16:01:19", "url": "https://files.pythonhosted.org/packages/82/89/a568109bc4946bc41565a22db22e68fba467607a5e4ff00f8082859de05c/guillotina_evolution-0.2.2.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "e163eb4e7ac8696430970bbc2c1088d4", "sha256": "8c6137b4e575c453a320365add6933e14d619c2b82432214ea7fc37e2dc0b1a9" }, "downloads": -1, "filename": "guillotina_evolution-1.0.0.tar.gz", "has_sig": false, "md5_digest": "e163eb4e7ac8696430970bbc2c1088d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16493, "upload_time": "2019-10-15T13:44:03", "url": "https://files.pythonhosted.org/packages/32/b9/b7b81a18e3b074f46475375b54a72363698f7b51bc7a94f6e6d25468c4ac/guillotina_evolution-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "abda872ebc1699495fc69c4c4ce66d40", "sha256": "2b20a18bfd22def533f2e3bff0607bca60494cd3be2483fdb55b402f1ffaa631" }, "downloads": -1, "filename": "guillotina_evolution-1.0.1.tar.gz", "has_sig": false, "md5_digest": "abda872ebc1699495fc69c4c4ce66d40", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16791, "upload_time": "2019-10-15T13:52:23", "url": "https://files.pythonhosted.org/packages/45/7c/feb14cd1d489f098a0fc5423e4ba9200dba65e52da8deab928681ae93457/guillotina_evolution-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "abda872ebc1699495fc69c4c4ce66d40", "sha256": "2b20a18bfd22def533f2e3bff0607bca60494cd3be2483fdb55b402f1ffaa631" }, "downloads": -1, "filename": "guillotina_evolution-1.0.1.tar.gz", "has_sig": false, "md5_digest": "abda872ebc1699495fc69c4c4ce66d40", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16791, "upload_time": "2019-10-15T13:52:23", "url": "https://files.pythonhosted.org/packages/45/7c/feb14cd1d489f098a0fc5423e4ba9200dba65e52da8deab928681ae93457/guillotina_evolution-1.0.1.tar.gz" } ] }