vidimera


Namevidimera JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/DevL/vidimera
SummaryPython signature and behaviour checker inspired by Elixir.
upload_time2024-10-31 11:18:37
maintainerNone
docs_urlNone
authorLennart Fridén
requires_pythonNone
licenseMIT
keywords [signature behaviour]
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Vidimera

![PyPI](https://img.shields.io/pypi/v/vidimera)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/vidimera)
![PyPI - Status](https://img.shields.io/pypi/status/vidimera)
![PyPI - License](https://img.shields.io/pypi/l/vidimera)
[![Python package](https://github.com/DevL/vidimera/actions/workflows/python-package.yml/badge.svg)](https://github.com/DevL/vidimera/actions/workflows/python-package.yml)

_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 `AssertionError` listing missing callables and their signatures if there are any. Based on `behaviour.implements`.

### `Behaviour(object)`
- Creates a new `Behaviour` instance.
- If `object` already is an instance of `Behaviour`, it is returned unchanged.

### `behaviour.implemented_by(other, scope=Behaviour.PUBLIC_AND_SPECIAL)`
- Verifies that `other` at least has the same public and dunderscore callables with the same signatures as the `behaviour`.
- Creats a `Behaviour` from `other` before making the comparison.

### `behaviour.implements(other, scope=Behaviour.PUBLIC_AND_SPECIAL)`
- Verifies that the `behaviour` at least has the same public and dunderscore callables with the same signatures as `other`.
- Creats a `Behaviour` from `other` before making the comparison.

### `behaviour.signatures(scope=Behaviour.PUBLIC_AND_SPECIAL)`
- Returns a `set` of tuples that represent the name and the callable selected based on the `scope`.
- Possible scopes include `PUBLIC`, `PRIVATE`, `SPECIAL`, and `PUBLIC_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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/DevL/vidimera",
    "name": "vidimera",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "[signature, behaviour]",
    "author": "Lennart Frid\u00e9n",
    "author_email": "lennart@devl.se",
    "download_url": "https://files.pythonhosted.org/packages/2b/87/441a249cd848d7eb030436d86450195a7b0c5439b9da2b1c9a16f7f6b622/vidimera-0.3.1.tar.gz",
    "platform": null,
    "description": "# Vidimera\n\n![PyPI](https://img.shields.io/pypi/v/vidimera)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/vidimera)\n![PyPI - Status](https://img.shields.io/pypi/status/vidimera)\n![PyPI - License](https://img.shields.io/pypi/l/vidimera)\n[![Python package](https://github.com/DevL/vidimera/actions/workflows/python-package.yml/badge.svg)](https://github.com/DevL/vidimera/actions/workflows/python-package.yml)\n\n_Python signature and behaviour checker inspired by Elixir._\n\nIn 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.\n\n## Installation\n\nInstall the package `vidimera` version `0.3+` from PyPI.\nThe recommended `requirements.txt` line is `vidimera~=0.3`.\n\n## Current Functionality\n\n### `assert_implements(object, expected, scope=Behaviour.PUBLIC_AND_SPECIAL)`\n- Raises an `AssertionError` listing missing callables and their signatures if there are any. Based on `behaviour.implements`.\n\n### `Behaviour(object)`\n- Creates a new `Behaviour` instance.\n- If `object` already is an instance of `Behaviour`, it is returned unchanged.\n\n### `behaviour.implemented_by(other, scope=Behaviour.PUBLIC_AND_SPECIAL)`\n- Verifies that `other` at least has the same public and dunderscore callables with the same signatures as the `behaviour`.\n- Creats a `Behaviour` from `other` before making the comparison.\n\n### `behaviour.implements(other, scope=Behaviour.PUBLIC_AND_SPECIAL)`\n- Verifies that the `behaviour` at least has the same public and dunderscore callables with the same signatures as `other`.\n- Creats a `Behaviour` from `other` before making the comparison.\n\n### `behaviour.signatures(scope=Behaviour.PUBLIC_AND_SPECIAL)`\n- Returns a `set` of tuples that represent the name and the callable selected based on the `scope`.\n- Possible scopes include `PUBLIC`, `PRIVATE`, `SPECIAL`, and `PUBLIC_AND_SPECIAL`.\n\n### `MissingBehaviour(delta)`\n- 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.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python signature and behaviour checker inspired by Elixir.",
    "version": "0.3.1",
    "project_urls": {
        "Bug Reports": "https://github.com/DevL/vidimera/issues",
        "Homepage": "https://github.com/DevL/vidimera",
        "Source": "https://github.com/DevL/vidimera"
    },
    "split_keywords": [
        "[signature",
        " behaviour]"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a122a48f5223b6aa8a6bdb02f110b5173f868039c8e1d38ca9e8dc520b58a544",
                "md5": "968a79baaeac38882ecde00875a79614",
                "sha256": "14d34b9d0bb506e7b9885c1f00984ed06b3f27f25427e925cf76d3c047a53e82"
            },
            "downloads": -1,
            "filename": "vidimera-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "968a79baaeac38882ecde00875a79614",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4636,
            "upload_time": "2024-10-31T11:18:36",
            "upload_time_iso_8601": "2024-10-31T11:18:36.838955Z",
            "url": "https://files.pythonhosted.org/packages/a1/22/a48f5223b6aa8a6bdb02f110b5173f868039c8e1d38ca9e8dc520b58a544/vidimera-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2b87441a249cd848d7eb030436d86450195a7b0c5439b9da2b1c9a16f7f6b622",
                "md5": "72806476cc6c7218cde849ba44215c97",
                "sha256": "b4970467f4d07e59f39386cddbdb5bf1b6e9db14d2123312bce884f0a29ac339"
            },
            "downloads": -1,
            "filename": "vidimera-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "72806476cc6c7218cde849ba44215c97",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4021,
            "upload_time": "2024-10-31T11:18:37",
            "upload_time_iso_8601": "2024-10-31T11:18:37.765391Z",
            "url": "https://files.pythonhosted.org/packages/2b/87/441a249cd848d7eb030436d86450195a7b0c5439b9da2b1c9a16f7f6b622/vidimera-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-31 11:18:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DevL",
    "github_project": "vidimera",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "vidimera"
}
        
Elapsed time: 0.44560s