Python signature and behaviour checker inspired by Elixir.
Project description
Vidimera
Python signature and behaviour checker inspired by Elixir.
In Swedish, vidimera means to attest or to certify. It is commonly used to attest that a copy of a document is accurate compared to the original.
Installation
Install the package vidimera version 0.3+ from PyPI.
The recommended requirements.txt line is vidimera~=0.3.
Current Functionality
assert_implements(object, expected, scope=Behaviour.PUBLIC_AND_SPECIAL)
- Raises an
AssertionErrorlisting missing callables and their signatures if there are any. Based onbehaviour.implements.
Behaviour(object)
- Creates a new
Behaviourinstance. - If
objectalready is an instance ofBehaviour, it is returned unchanged.
behaviour.implemented_by(other, scope=Behaviour.PUBLIC_AND_SPECIAL)
- Verifies that
otherat least has the same public and dunderscore callables with the same signatures as thebehaviour. - Creats a
Behaviourfromotherbefore making the comparison.
behaviour.implements(other, scope=Behaviour.PUBLIC_AND_SPECIAL)
- Verifies that the
behaviourat least has the same public and dunderscore callables with the same signatures asother. - Creats a
Behaviourfromotherbefore making the comparison.
behaviour.signatures(scope=Behaviour.PUBLIC_AND_SPECIAL)
- Returns a
setof tuples that represent the name and the callable selected based on thescope. - Possible scopes include
PUBLIC,PRIVATE,SPECIAL, andPUBLIC_AND_SPECIAL.
MissingBehaviour(delta)
- An internal representation of missing behaviour. Created from a set of names and signatures. If the set is empty, this object will be truthy. If the set is non-empty, this object is falsy.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vidimera-0.3.1.tar.gz.
File metadata
- Download URL: vidimera-0.3.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4970467f4d07e59f39386cddbdb5bf1b6e9db14d2123312bce884f0a29ac339
|
|
| MD5 |
72806476cc6c7218cde849ba44215c97
|
|
| BLAKE2b-256 |
2b87441a249cd848d7eb030436d86450195a7b0c5439b9da2b1c9a16f7f6b622
|
File details
Details for the file vidimera-0.3.1-py3-none-any.whl.
File metadata
- Download URL: vidimera-0.3.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14d34b9d0bb506e7b9885c1f00984ed06b3f27f25427e925cf76d3c047a53e82
|
|
| MD5 |
968a79baaeac38882ecde00875a79614
|
|
| BLAKE2b-256 |
a122a48f5223b6aa8a6bdb02f110b5173f868039c8e1d38ca9e8dc520b58a544
|