zope.app.schema


Namezope.app.schema JSON
Version 5.0 PyPI version JSON
download
home_pagehttps://github.com/zopefoundation/zope.app.schema
SummaryComponent Architecture based Vocabulary Registry
upload_time2023-02-07 09:44:47
maintainer
docs_urlNone
authorZope Corporation and Contributors
requires_python>=3.7
licenseZPL 2.1
keywords zope3 vocabulary registry local component
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            This package provides a component architecture based vocabulary registry.


=====================================
 Component-based Vocabulary Registry
=====================================

This package provides a vocabulary registry for zope.schema,
based on the component architecture.

**NOTE:** This functionality has been replaced with
``zope.vocabularyregistry``. These imports continue to work
for backwards compatibility.

It replaces the zope.schema's simple vocabulary registry
when ``zope.app.schema`` package is imported, so it's done
automatically. All we need is provide vocabulary factory
utilities:

  >>> import zope.app.schema
  >>> from zope.component import provideUtility
  >>> from zope.schema.interfaces import IVocabularyFactory
  >>> from zope.schema.vocabulary import SimpleTerm
  >>> from zope.schema.vocabulary import SimpleVocabulary

  >>> def SomeVocabulary(context=None):
  ...     terms = [SimpleTerm(1), SimpleTerm(2)]
  ...     return SimpleVocabulary(terms)

  >>> provideUtility(SomeVocabulary, IVocabularyFactory,
  ...                name='SomeVocabulary')

Now we can get the vocabulary using standard zope.schema
way:

  >>> from zope.schema.vocabulary import getVocabularyRegistry
  >>> vr = getVocabularyRegistry()
  >>> voc = vr.get(None, 'SomeVocabulary')
  >>> [term.value for term in voc]
  [1, 2]

Configuration
=============

This package provides configuration that sets security permissions and
factories for the objects provided in ``zope.schema``. The
``zope.security`` package must be installed to use it.

  >>> from zope.configuration import xmlconfig
  >>> _ = xmlconfig.string(r"""
  ... <configure xmlns="http://namespaces.zope.org/zope" i18n_domain="zope">
  ...   <include package="zope.app.schema" />
  ... </configure>
  ... """)


=========
 CHANGES
=========

5.0 (2023-02-07)
================

- Drop support for Python 2.7, 3.5, 3.6.

- Add support for Python 3.7, 3.8, 3.9, 3.10, 3.11.


4.1.0 (2017-05-10)
==================

- Replaced the local implementation of ``ZopeVocabularyRegistry`` with
  one imported from ``zope.vocabularyregistry``. Backwards
  compatibility imports remain.


4.0.1 (2017-05-10)
==================

- Packaging: Add the Python version and implementation classifiers.


4.0.0 (2017-04-17)
==================

- Support for Python 3.5, 3.6 and PyPy has been added.

- Added support for tox.

- Drop dependency on ``zope.app.testing``, since it was not needed.


3.6.0 (2017-04-17)
==================

- Package modernization including manifest.


3.5.0 (2008-12-16)
==================

- Remove deprecated ``vocabulary`` directive.
- Add test for component-based vocabulary registry.


3.4.0 (2007-10-27)
==================

- Initial release independent of the main Zope tree.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/zopefoundation/zope.app.schema",
    "name": "zope.app.schema",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "zope3 vocabulary registry local component",
    "author": "Zope Corporation and Contributors",
    "author_email": "zope-dev@zope.dev",
    "download_url": "https://files.pythonhosted.org/packages/06/8a/248ccc0bb28b214a96ae0db81d289aacf7e20a48c59c1d8f89591a8f2518/zope.app.schema-5.0.tar.gz",
    "platform": null,
    "description": "This package provides a component architecture based vocabulary registry.\n\n\n=====================================\n Component-based Vocabulary Registry\n=====================================\n\nThis package provides a vocabulary registry for zope.schema,\nbased on the component architecture.\n\n**NOTE:** This functionality has been replaced with\n``zope.vocabularyregistry``. These imports continue to work\nfor backwards compatibility.\n\nIt replaces the zope.schema's simple vocabulary registry\nwhen ``zope.app.schema`` package is imported, so it's done\nautomatically. All we need is provide vocabulary factory\nutilities:\n\n  >>> import zope.app.schema\n  >>> from zope.component import provideUtility\n  >>> from zope.schema.interfaces import IVocabularyFactory\n  >>> from zope.schema.vocabulary import SimpleTerm\n  >>> from zope.schema.vocabulary import SimpleVocabulary\n\n  >>> def SomeVocabulary(context=None):\n  ...     terms = [SimpleTerm(1), SimpleTerm(2)]\n  ...     return SimpleVocabulary(terms)\n\n  >>> provideUtility(SomeVocabulary, IVocabularyFactory,\n  ...                name='SomeVocabulary')\n\nNow we can get the vocabulary using standard zope.schema\nway:\n\n  >>> from zope.schema.vocabulary import getVocabularyRegistry\n  >>> vr = getVocabularyRegistry()\n  >>> voc = vr.get(None, 'SomeVocabulary')\n  >>> [term.value for term in voc]\n  [1, 2]\n\nConfiguration\n=============\n\nThis package provides configuration that sets security permissions and\nfactories for the objects provided in ``zope.schema``. The\n``zope.security`` package must be installed to use it.\n\n  >>> from zope.configuration import xmlconfig\n  >>> _ = xmlconfig.string(r\"\"\"\n  ... <configure xmlns=\"http://namespaces.zope.org/zope\" i18n_domain=\"zope\">\n  ...   <include package=\"zope.app.schema\" />\n  ... </configure>\n  ... \"\"\")\n\n\n=========\n CHANGES\n=========\n\n5.0 (2023-02-07)\n================\n\n- Drop support for Python 2.7, 3.5, 3.6.\n\n- Add support for Python 3.7, 3.8, 3.9, 3.10, 3.11.\n\n\n4.1.0 (2017-05-10)\n==================\n\n- Replaced the local implementation of ``ZopeVocabularyRegistry`` with\n  one imported from ``zope.vocabularyregistry``. Backwards\n  compatibility imports remain.\n\n\n4.0.1 (2017-05-10)\n==================\n\n- Packaging: Add the Python version and implementation classifiers.\n\n\n4.0.0 (2017-04-17)\n==================\n\n- Support for Python 3.5, 3.6 and PyPy has been added.\n\n- Added support for tox.\n\n- Drop dependency on ``zope.app.testing``, since it was not needed.\n\n\n3.6.0 (2017-04-17)\n==================\n\n- Package modernization including manifest.\n\n\n3.5.0 (2008-12-16)\n==================\n\n- Remove deprecated ``vocabulary`` directive.\n- Add test for component-based vocabulary registry.\n\n\n3.4.0 (2007-10-27)\n==================\n\n- Initial release independent of the main Zope tree.\n",
    "bugtrack_url": null,
    "license": "ZPL 2.1",
    "summary": "Component Architecture based Vocabulary Registry",
    "version": "5.0",
    "split_keywords": [
        "zope3",
        "vocabulary",
        "registry",
        "local",
        "component"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f79463d14c7b7ee305107a2c883a211602e32da80e665fb04fbfb41b0845b588",
                "md5": "9d53b41b255c85a793aa5e2f94e8625b",
                "sha256": "d69d037d092b075f39cb68060a6cfe7b3bad57788b42138327191a4aeaf5b428"
            },
            "downloads": -1,
            "filename": "zope.app.schema-5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9d53b41b255c85a793aa5e2f94e8625b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 8500,
            "upload_time": "2023-02-07T09:44:45",
            "upload_time_iso_8601": "2023-02-07T09:44:45.342719Z",
            "url": "https://files.pythonhosted.org/packages/f7/94/63d14c7b7ee305107a2c883a211602e32da80e665fb04fbfb41b0845b588/zope.app.schema-5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "068a248ccc0bb28b214a96ae0db81d289aacf7e20a48c59c1d8f89591a8f2518",
                "md5": "2aff77eec0bd4d0245d56290022a1093",
                "sha256": "90a103760a2d7317c6c2a10b781fd78f2da4a96a4c8c7a18b9b7895a1417c2f9"
            },
            "downloads": -1,
            "filename": "zope.app.schema-5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2aff77eec0bd4d0245d56290022a1093",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 8267,
            "upload_time": "2023-02-07T09:44:47",
            "upload_time_iso_8601": "2023-02-07T09:44:47.332539Z",
            "url": "https://files.pythonhosted.org/packages/06/8a/248ccc0bb28b214a96ae0db81d289aacf7e20a48c59c1d8f89591a8f2518/zope.app.schema-5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-07 09:44:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "zopefoundation",
    "github_project": "zope.app.schema",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "zope.app.schema"
}
        
Elapsed time: 0.07781s