collective.regenv


Namecollective.regenv JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/collective/collective.regenv
SummaryAn add-on for Plone
upload_time2023-11-15 09:42:16
maintainer
docs_urlNone
authormamico
requires_python>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*
licenseGPL version 2
keywords python plone cms
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            .. This README is meant for consumption by humans and pypi. Pypi can render rst files so please do not use Sphinx features.
   If you want to learn more about writing documentation, please check out: http://docs.plone.org/about/documentation_styleguide.html
   This text does not appear on pypi or github. It is a comment.

.. image:: https://img.shields.io/pypi/v/collective.regenv.svg
    :target: https://pypi.org/project/collective.regenv/
    :alt: Latest Version

.. image:: https://img.shields.io/pypi/pyversions/collective.regenv.svg?style=plastic
    :target: https://pypi.org/project/collective.regenv/
    :alt: Supported - Python Versions

.. image:: https://img.shields.io/pypi/dm/collective.regenv.svg
    :target: https://pypi.org/project/collective.regenv/
    :alt: Number of PyPI downloads

.. image:: https://img.shields.io/pypi/l/collective.regenv.svg
    :target: https://pypi.org/project/collective.regenv/
    :alt: License

.. image:: https://github.com/collective/collective.regenv/actions/workflows/tests.yml/badge.svg
    :target: https://github.com/collective/collective.regenv/actions
    :alt: Tests

.. image:: https://coveralls.io/repos/github/collective/collective.regenv/badge.svg?branch=main
    :target: https://coveralls.io/github/collective/collective.regenv?branch=main
    :alt: Coverage


=================
collective.regenv
=================

This product allows to override the values stored in the portal registry
and property manager object (i.e. a PAS plugin) with values defined on a local file
defined in an environment variable called ``PLONE_REGISTRY_YAML``.

When it comes to PropertyManager, this product actually only works if you use the accessor
``getProperty`` to read properties.

Features
--------

Using this product you can:

1. have different values for development and production environments
   (think about the ``MailHost`` settings,
   connection parameters to external services,
   etc.)

2. have different values for different instances in the same buildout,
   allowing for example to toggle features on and off for A/B testing.


Documentation
-------------

Registry overrides should be in a YAML file::

    % cat sample.yaml

    defaults: &defaults
        plone.cachepurging.interfaces.ICachePurgingSettings.cachingProxies:
            - http://localhost:8000
            - http://localhost:8001
        plone.app.theming.interfaces.IThemeSettings.hostnameBlacklist:
            - 127.0.0.1
            - localhost

    /Plone/portal_registry:
        <<: *defaults

    /Plone2/portal_registry:
        <<: *defaults
        plone.cachepurging.interfaces.ICachePurgingSettings.cachingProxies:
            - http://localhost:9000

    /Plone/acl_users/oidc:
        issuer:
            http://localhost:1234/realms/plone/
        client_id:
            plone

Run zope instance with environment pointing to the YAML file, for example::

    PLONE_REGISTRY_YAML=$(pwd)/sample.yaml bin/instance fg

Or using the docker image, for example::

    docker run -p 8080:8080 \
        -e ADDONS=collective.regenv \
        -e PLONE_REGISTRY_YAML=/app/registry.yaml \
        -v$(pwd)/sample.yaml:/app/registry.yaml \
        plone/plone-backend:latest


Alternatively you can add the contents of the YAML file in an environment
variable called `PLONE_REGISTRY_YAML_CONTENT` and pass the values directly.
This way you do not need to mount a volume with the configuration file.
For example::

    export PLONE_REGISTRY_YAML_CONTENT=$(cat sample.yaml)
    docker run -p 8080:8080 \
        -e ADDONS=collective.regenv \
        -e PLONE_REGISTRY_YAML_CONTENT
        plone/plone-backend:latest



Installation
------------

Install collective.regenv by adding it to your buildout::

    [buildout]

    ...

    eggs =
        collective.regenv


and then running ``bin/buildout``


Contribute
----------

- Issue Tracker: https://github.com/collective/collective.regenv/issues
- Source Code: https://github.com/collective/collective.regenv
- Documentation: https://pypi.org/project/collective.regenv/


License
-------

The project is licensed under the GPLv2.


Contributors
============

- mamico, mauro.amico@gmail.com


Changelog
=========


1.0.0 (2023-11-15)
------------------

- Add another environment variable to get the YAML file content from
  [erral]

1.0.0rc1 (2023-03-21)
---------------------

- Get overridden keys more efficiently.
  [maurits]

- Fix ``python_requires`` metadata.
  [maurits]


1.0.0a2 (2022-12-27)
--------------------

- Fix monkeys init
  [mamico]


1.0.0a1 (2022-12-27)
--------------------

- Initial release.
  [mamico]

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/collective/collective.regenv",
    "name": "collective.regenv",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*",
    "maintainer_email": "",
    "keywords": "Python Plone CMS",
    "author": "mamico",
    "author_email": "mauro.amico@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/fb/ea/b94ba30e2d12b489f7371c9c4f24d5e3a148940d794162092766a5f093a8/collective.regenv-1.0.0.tar.gz",
    "platform": null,
    "description": ".. This README is meant for consumption by humans and pypi. Pypi can render rst files so please do not use Sphinx features.\n   If you want to learn more about writing documentation, please check out: http://docs.plone.org/about/documentation_styleguide.html\n   This text does not appear on pypi or github. It is a comment.\n\n.. image:: https://img.shields.io/pypi/v/collective.regenv.svg\n    :target: https://pypi.org/project/collective.regenv/\n    :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/pyversions/collective.regenv.svg?style=plastic\n    :target: https://pypi.org/project/collective.regenv/\n    :alt: Supported - Python Versions\n\n.. image:: https://img.shields.io/pypi/dm/collective.regenv.svg\n    :target: https://pypi.org/project/collective.regenv/\n    :alt: Number of PyPI downloads\n\n.. image:: https://img.shields.io/pypi/l/collective.regenv.svg\n    :target: https://pypi.org/project/collective.regenv/\n    :alt: License\n\n.. image:: https://github.com/collective/collective.regenv/actions/workflows/tests.yml/badge.svg\n    :target: https://github.com/collective/collective.regenv/actions\n    :alt: Tests\n\n.. image:: https://coveralls.io/repos/github/collective/collective.regenv/badge.svg?branch=main\n    :target: https://coveralls.io/github/collective/collective.regenv?branch=main\n    :alt: Coverage\n\n\n=================\ncollective.regenv\n=================\n\nThis product allows to override the values stored in the portal registry\nand property manager object (i.e. a PAS plugin) with values defined on a local file\ndefined in an environment variable called ``PLONE_REGISTRY_YAML``.\n\nWhen it comes to PropertyManager, this product actually only works if you use the accessor\n``getProperty`` to read properties.\n\nFeatures\n--------\n\nUsing this product you can:\n\n1. have different values for development and production environments\n   (think about the ``MailHost`` settings,\n   connection parameters to external services,\n   etc.)\n\n2. have different values for different instances in the same buildout,\n   allowing for example to toggle features on and off for A/B testing.\n\n\nDocumentation\n-------------\n\nRegistry overrides should be in a YAML file::\n\n    % cat sample.yaml\n\n    defaults: &defaults\n        plone.cachepurging.interfaces.ICachePurgingSettings.cachingProxies:\n            - http://localhost:8000\n            - http://localhost:8001\n        plone.app.theming.interfaces.IThemeSettings.hostnameBlacklist:\n            - 127.0.0.1\n            - localhost\n\n    /Plone/portal_registry:\n        <<: *defaults\n\n    /Plone2/portal_registry:\n        <<: *defaults\n        plone.cachepurging.interfaces.ICachePurgingSettings.cachingProxies:\n            - http://localhost:9000\n\n    /Plone/acl_users/oidc:\n        issuer:\n            http://localhost:1234/realms/plone/\n        client_id:\n            plone\n\nRun zope instance with environment pointing to the YAML file, for example::\n\n    PLONE_REGISTRY_YAML=$(pwd)/sample.yaml bin/instance fg\n\nOr using the docker image, for example::\n\n    docker run -p 8080:8080 \\\n        -e ADDONS=collective.regenv \\\n        -e PLONE_REGISTRY_YAML=/app/registry.yaml \\\n        -v$(pwd)/sample.yaml:/app/registry.yaml \\\n        plone/plone-backend:latest\n\n\nAlternatively you can add the contents of the YAML file in an environment\nvariable called `PLONE_REGISTRY_YAML_CONTENT` and pass the values directly.\nThis way you do not need to mount a volume with the configuration file.\nFor example::\n\n    export PLONE_REGISTRY_YAML_CONTENT=$(cat sample.yaml)\n    docker run -p 8080:8080 \\\n        -e ADDONS=collective.regenv \\\n        -e PLONE_REGISTRY_YAML_CONTENT\n        plone/plone-backend:latest\n\n\n\nInstallation\n------------\n\nInstall collective.regenv by adding it to your buildout::\n\n    [buildout]\n\n    ...\n\n    eggs =\n        collective.regenv\n\n\nand then running ``bin/buildout``\n\n\nContribute\n----------\n\n- Issue Tracker: https://github.com/collective/collective.regenv/issues\n- Source Code: https://github.com/collective/collective.regenv\n- Documentation: https://pypi.org/project/collective.regenv/\n\n\nLicense\n-------\n\nThe project is licensed under the GPLv2.\n\n\nContributors\n============\n\n- mamico, mauro.amico@gmail.com\n\n\nChangelog\n=========\n\n\n1.0.0 (2023-11-15)\n------------------\n\n- Add another environment variable to get the YAML file content from\n  [erral]\n\n1.0.0rc1 (2023-03-21)\n---------------------\n\n- Get overridden keys more efficiently.\n  [maurits]\n\n- Fix ``python_requires`` metadata.\n  [maurits]\n\n\n1.0.0a2 (2022-12-27)\n--------------------\n\n- Fix monkeys init\n  [mamico]\n\n\n1.0.0a1 (2022-12-27)\n--------------------\n\n- Initial release.\n  [mamico]\n",
    "bugtrack_url": null,
    "license": "GPL version 2",
    "summary": "An add-on for Plone",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/collective/collective.regenv",
        "PyPI": "https://pypi.org/project/collective.regenv/",
        "Source": "https://github.com/collective/collective.regenv",
        "Tracker": "https://github.com/collective/collective.regenv/issues"
    },
    "split_keywords": [
        "python",
        "plone",
        "cms"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a8d9368baf98bcb88928ff88dde91dcf818f7b62f2ca7cd3ed585c2409b788c1",
                "md5": "8173261ca1d4f725b2b55a12d99ad93f",
                "sha256": "74236bb8522b5693269993f97ef49c01521cf2e641db44cb9aff4d28d09f3204"
            },
            "downloads": -1,
            "filename": "collective.regenv-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8173261ca1d4f725b2b55a12d99ad93f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*",
            "size": 16052,
            "upload_time": "2023-11-15T09:42:15",
            "upload_time_iso_8601": "2023-11-15T09:42:15.126031Z",
            "url": "https://files.pythonhosted.org/packages/a8/d9/368baf98bcb88928ff88dde91dcf818f7b62f2ca7cd3ed585c2409b788c1/collective.regenv-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fbeab94ba30e2d12b489f7371c9c4f24d5e3a148940d794162092766a5f093a8",
                "md5": "0408aacb884a5d90aaa94297283b6171",
                "sha256": "bf377c9ea873ff3d3d722dd60b9b003040267f91390006a06e2b06eb2a241981"
            },
            "downloads": -1,
            "filename": "collective.regenv-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0408aacb884a5d90aaa94297283b6171",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*",
            "size": 19046,
            "upload_time": "2023-11-15T09:42:16",
            "upload_time_iso_8601": "2023-11-15T09:42:16.844292Z",
            "url": "https://files.pythonhosted.org/packages/fb/ea/b94ba30e2d12b489f7371c9c4f24d5e3a148940d794162092766a5f093a8/collective.regenv-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-15 09:42:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "collective",
    "github_project": "collective.regenv",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "collective.regenv"
}
        
Elapsed time: 0.14471s