Skip to main content

Zope schema related support

Project description

nti.schema

Latest release Supported Python versions https://travis-ci.org/NextThought/nti.schema.svg?branch=master https://coveralls.io/repos/github/NextThought/nti.schema/badge.svg Documentation Status

nti.schema includes utilities for working with schema-driven development using zope.schema.

For complete details and the changelog, see the documentation.

Overview

Some of the most useful features include:

  • nti.schema.interfaces.find_most_derived_interface for finding a bounded interface.

  • nti.schema.eqhash.EqHash is a class-decorator for creating efficient, correct implementations of equality and hashing.

  • nti.schema.field contains various schema fields, including a Variant type and more flexible collection types, all of which produce better validation errors.

  • nti.schema.fieldproperty contains field properties that can adapt to interfaces or decode incoming text. The function createDirectFieldProperties can assign just the necessary properties automatically.

Changes

1.4.0 (2018-09-10)

  • Drop support for dm.zope.schema fields, in particular the Object field. The validation performed by zope.schema.Object is much improved.

  • Drop support for zope.schema older than 4.6.1.

  • Deprecate nti.schema.field.Number.

  • Add support for Python 3.7.

1.3.3 (2018-09-07)

  • Minor fix for changes in zope.schema 4.6.0 (import BeforeObjectAssignedEvent from its new, but still private, location).

1.3.2 (2017-10-24)

  • Depend on zope.deferredimport >= 4.2.1 to be able to generate Sphinx documentation.

  • Clean up code to match PEP8.

1.3.1 (2017-10-18)

  • Fix an UnboundLocalError on Python 3 in the Variant field. See issue 14.

1.3.0 (2017-07-06)

  • Drop the Python 2 dependency on plone.i18n in favor of the new library nti.i18n, which supports Python 3. If plone.i18n is installed, it should not be configured (ZCML), but its utility objects can be looked up by either interface.

1.2.0 (2017-05-17)

  • Remove use of unicode_literals.

  • Add support for Python 3.6.

  • The SchemaConfigured constructor doesn’t hide errors when checking for properties on Python 2. See issue 11.

1.1.3 (2017-01-17)

  • Add info to minLength validation message.

1.1.2 (2016-09-14)

  • Add Acquisition and zope.event as install dependencies. Previously they were only pulled in via the test extra.

1.1.1 (2016-09-08)

  • Substantial speedups to the hash functions generated by EqHash.

  • Substantial speedups to the equality functions generated by EqHash.

1.1.0 (2016-07-29)

  • Add support for Python 3. Note the countries vocabulary will not be complete on Python 3.

  • Drop the dolmen.builtins dependency.

  • Drop the dm.zope.schema dependency.

  • The plone.i18n dependency is Python 2 only (and can even be removed).

  • The matchers in nti.schema.testing have been moved to nti.testing.matchers.

  • Using AdaptingFieldProperty will now raise the more specific SchemaNotProvided error instead of a TypeError if adapting the value fails.

  • EqHash has moved from nti.schema.schema to nti.schema.eqhash. A compatibility shim remains.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nti.schema-1.4.0.tar.gz (41.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nti.schema-1.4.0-py2.py3-none-any.whl (40.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file nti.schema-1.4.0.tar.gz.

File metadata

  • Download URL: nti.schema-1.4.0.tar.gz
  • Upload date:
  • Size: 41.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for nti.schema-1.4.0.tar.gz
Algorithm Hash digest
SHA256 b54e6d40fb026337b54bdadb4389a0b34baffb05aea238ad613c281c59c25403
MD5 4162c49260b0160c85b730e9e8fc4e03
BLAKE2b-256 f2685be422988bc6142ac21ce6711c3e64ffb83df8588620a5d6fa7acdcfc508

See more details on using hashes here.

File details

Details for the file nti.schema-1.4.0-py2.py3-none-any.whl.

File metadata

  • Download URL: nti.schema-1.4.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 40.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for nti.schema-1.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 344ae8d51a7430c4fdbb062f8070bbc9219def37be27bb3b51dfe69cb4a93448
MD5 ef39d4e5bf2b5aaec9faafcdb48866a0
BLAKE2b-256 76974fd995684462a5ca423ed839239b8032dd98c067c3a1511b0b61c416e611

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page