Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

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.

Release files for zope.app.schema 5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zope.app.schema 5.0
File Size Uploaded
zope.app.schema-5.0.tar.gz 8.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zope.app.schema 5.0
File Interpreter ABI Platform
zope.app.schema-5.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.8 kB

Release files / zope.app.schema-5.0.tar.gz

Download URL zope.app.schema-5.0.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
90a103760a2d7317c6c2a10b781fd78f2da4a96a4c8c7a18b9b7895a1417c2f9
BLAKE2b-256 checksum
How to use checksums
068a248ccc0bb28b214a96ae0db81d289aacf7e20a48c59c1d8f89591a8f2518
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / zope.app.schema-5.0-py3-none-any.whl

Download URL zope.app.schema-5.0-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d69d037d092b075f39cb68060a6cfe7b3bad57788b42138327191a4aeaf5b428
BLAKE2b-256 checksum
How to use checksums
f79463d14c7b7ee305107a2c883a211602e32da80e665fb04fbfb41b0845b588
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page