Skip to main content

'Interface enforcement'

Project description

Inspects objects/classes to enforce that they respect the zope.interface they declare to implement/provide. It works with zope.interfaces.

Examples

the unit tests provided with the source package contain a lot of examples of how to use the package to validate objects and classes.

Discussion

I have written this package mainly out of a specific need for ensuring that plugins I load into my application would always implement the interfaces they declared to implement. This is a way to ensure that the application using the plugin won’t encounter an exception trying to access an attribute that should be present but is not.

Status

The package is in its early infancy and will not detect an attribute that is created outside the __init__ method or not present directly on the class itself. This could be added in the future if there is enough demand.

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

zinspect-0.2.0.zip (7.7 kB view details)

Uploaded Source

Built Distribution

zinspect-0.2.0-py2.5.egg (6.2 kB view details)

Uploaded Source

File details

Details for the file zinspect-0.2.0.zip.

File metadata

  • Download URL: zinspect-0.2.0.zip
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for zinspect-0.2.0.zip
Algorithm Hash digest
SHA256 0e393a283119f58f693d0291804de912db9c46a411fa643ca97ab6f5c9af16e4
MD5 7b419699838f87f0dc5975fdbc829b9e
BLAKE2b-256 df154139fe27f7c8f258aa353cf81af180e5bb2354764d11c4aa7eaf61809856

See more details on using hashes here.

File details

Details for the file zinspect-0.2.0-py2.5.egg.

File metadata

File hashes

Hashes for zinspect-0.2.0-py2.5.egg
Algorithm Hash digest
SHA256 28e55065f460f7f5d765f4724dced5846f66175017256e543feda9caa11b5ef3
MD5 a75b7af09e0db0530a115c7828c155b4
BLAKE2b-256 10f9ed8655e6e45d9db2d4ab3a8b4c2efcf527d10c1b05dc0efab1487a0921d3

See more details on using hashes here.

Supported by

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