'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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e393a283119f58f693d0291804de912db9c46a411fa643ca97ab6f5c9af16e4 |
|
MD5 | 7b419699838f87f0dc5975fdbc829b9e |
|
BLAKE2b-256 | df154139fe27f7c8f258aa353cf81af180e5bb2354764d11c4aa7eaf61809856 |
File details
Details for the file zinspect-0.2.0-py2.5.egg
.
File metadata
- Download URL: zinspect-0.2.0-py2.5.egg
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28e55065f460f7f5d765f4724dced5846f66175017256e543feda9caa11b5ef3 |
|
MD5 | a75b7af09e0db0530a115c7828c155b4 |
|
BLAKE2b-256 | 10f9ed8655e6e45d9db2d4ab3a8b4c2efcf527d10c1b05dc0efab1487a0921d3 |