eule


Nameeule JSON
Version 1.3.0 PyPI version JSON
download
home_pagehttps://pypi.org/project/eule/
SummaryEuler diagrams in python
upload_time2024-04-22 22:45:23
maintainerNone
docs_urlNone
authorBruno Peixoto
requires_python<4.0,>=3.8.1
licenseMIT
keywords euler-diagram sets
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            ![a night owl](https://github.com/trouchet/eule/blob/main/images/eule_small.png?raw=true)

[![Version](https://img.shields.io/pypi/v/eule.svg)](https://pypi.python.org/pypi/eule)
[![downloads](https://img.shields.io/pypi/dm/eule)](https://pypi.org/project/eule/)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/trouchet/eule/HEAD)

[![codecov](https://codecov.io/gh/trouchet/eule/branch/main/graph/badge.svg?token=PJMBaLIqar)](https://codecov.io/gh/trouchet/eule)
[![Documentation Status](https://readthedocs.org/projects/eule/badge/?version=latest)](https://eule.readthedocs.io/en/latest/?version=latest)
[![Lint workflow](https://github.com/trouchet/eule/actions/workflows/check-lint.yaml/badge.svg)](https://github.com/trouchet/eule/actions/workflows/check-lint.yaml)

Euler\'s diagrams are non-empty Venn\'s diagrams. For further information about:

1. the library: on URL <https://eule.readthedocs.io>;
2. Euler diagrams: on wikipedia article <https://en.wikipedia.org/wiki/Euler_diagram>

Motivation
================

<img src="https://github.com/trouchet/eule/blob/main/images/euler_venn.png?raw=true" width="400" height="364"/>

How to install
================

We run the command on desired installation environment:

``` {.bash}
pip install eule
```

Minimal example
================

<details>
    <summary>
    Click to unfold usage
    </summary>

We run command `python example.py` on the folder with file `example.py` and following content:

``` {.python}
#!/usr/bin/env python
from eule import euler, euler_keys, euler_boundaries, Euler

sets = {
    'a': [1, 2, 3],
    'b': [2, 3, 4],
    'c': [3, 4, 5],
    'd': [3, 5, 6]
}

euler_diagram = euler(sets)
euler_keys = euler_keys(sets)
euler_boundaries = euler_boundaries(sets)
euler_instance=Euler(sets)

# Euler dictionary:
# {('a', 'b'): [2], ('b', 'c'): [4], ('a', 'b', 'c', 'd'): [3], ('c', 'd'): [5], ('d', ): [6], ('a', ): [1]}
print(euler_diagram)
print(euler_instance.as_dict())

print('\n')

# Euler keys list:
# [('a', 'b'), ('b', 'c'), ('a', 'b', 'c', d'), ('c', 'd'), ('d', ), ('a', )]
print(euler_keys)
print(euler_instance.euler_keys())

print('\n')

# Euler boundaries dictionary:
# {
#   'a': ['b', 'c', 'd'],
#   'b': ['a', 'c', 'd'],
#   'c': ['a', 'b', 'd'],
#   'd': ['a', 'b', 'c']
# }
print(euler_boundaries)
print(euler_instance.euler_boundaries())

print('\n')

# Euler instance match:
# {'a'}
# {'a', 'b'}
# {'c', 'a', 'b'}

print(euler_instance.match({1,2,3}))
print(euler_instance.match({1,2,3,4}))
print(euler_instance.match({1,2,3,4,5}))

print('\n')

# Euler instance getitem dunder:
# [1, 2, 3]
# [1, 2, 3]
# [1, 2, 3, 4]
# [1, 2, 3, 4, 5]
print(euler_instance['a'])
print(euler_instance[('a', )])
print(euler_instance[('a', 'b', )])
print(euler_instance[('a', 'b', 'c',)])

print('\n')

# Euler instance remove_key:
# {('b', 'c'): [4], ('c', 'd'): [5], ('b', 'c', 'd'): [3], ('d',): [6], ('b',): [2]}
euler_instance.remove_key('a')
print(euler_instance.as_dict())
```

</details>

            

Raw data

            {
    "_id": null,
    "home_page": "https://pypi.org/project/eule/",
    "name": "eule",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8.1",
    "maintainer_email": null,
    "keywords": "euler-diagram, sets",
    "author": "Bruno Peixoto",
    "author_email": "brunolnetto@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/e5/1e/9279280ca3d0e390e8593176bb03e71aafabc972bf8aa311be12130c2740/eule-1.3.0.tar.gz",
    "platform": null,
    "description": "![a night owl](https://github.com/trouchet/eule/blob/main/images/eule_small.png?raw=true)\n\n[![Version](https://img.shields.io/pypi/v/eule.svg)](https://pypi.python.org/pypi/eule)\n[![downloads](https://img.shields.io/pypi/dm/eule)](https://pypi.org/project/eule/)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/trouchet/eule/HEAD)\n\n[![codecov](https://codecov.io/gh/trouchet/eule/branch/main/graph/badge.svg?token=PJMBaLIqar)](https://codecov.io/gh/trouchet/eule)\n[![Documentation Status](https://readthedocs.org/projects/eule/badge/?version=latest)](https://eule.readthedocs.io/en/latest/?version=latest)\n[![Lint workflow](https://github.com/trouchet/eule/actions/workflows/check-lint.yaml/badge.svg)](https://github.com/trouchet/eule/actions/workflows/check-lint.yaml)\n\nEuler\\'s diagrams are non-empty Venn\\'s diagrams. For further information about:\n\n1. the library: on URL <https://eule.readthedocs.io>;\n2. Euler diagrams: on wikipedia article <https://en.wikipedia.org/wiki/Euler_diagram>\n\nMotivation\n================\n\n<img src=\"https://github.com/trouchet/eule/blob/main/images/euler_venn.png?raw=true\" width=\"400\" height=\"364\"/>\n\nHow to install\n================\n\nWe run the command on desired installation environment:\n\n``` {.bash}\npip install eule\n```\n\nMinimal example\n================\n\n<details>\n    <summary>\n    Click to unfold usage\n    </summary>\n\nWe run command `python example.py` on the folder with file `example.py` and following content:\n\n``` {.python}\n#!/usr/bin/env python\nfrom eule import euler, euler_keys, euler_boundaries, Euler\n\nsets = {\n    'a': [1, 2, 3],\n    'b': [2, 3, 4],\n    'c': [3, 4, 5],\n    'd': [3, 5, 6]\n}\n\neuler_diagram = euler(sets)\neuler_keys = euler_keys(sets)\neuler_boundaries = euler_boundaries(sets)\neuler_instance=Euler(sets)\n\n# Euler dictionary:\n# {('a', 'b'): [2], ('b', 'c'): [4], ('a', 'b', 'c', 'd'): [3], ('c', 'd'): [5], ('d', ): [6], ('a', ): [1]}\nprint(euler_diagram)\nprint(euler_instance.as_dict())\n\nprint('\\n')\n\n# Euler keys list:\n# [('a', 'b'), ('b', 'c'), ('a', 'b', 'c', d'), ('c', 'd'), ('d', ), ('a', )]\nprint(euler_keys)\nprint(euler_instance.euler_keys())\n\nprint('\\n')\n\n# Euler boundaries dictionary:\n# {\n#   'a': ['b', 'c', 'd'],\n#   'b': ['a', 'c', 'd'],\n#   'c': ['a', 'b', 'd'],\n#   'd': ['a', 'b', 'c']\n# }\nprint(euler_boundaries)\nprint(euler_instance.euler_boundaries())\n\nprint('\\n')\n\n# Euler instance match:\n# {'a'}\n# {'a', 'b'}\n# {'c', 'a', 'b'}\n\nprint(euler_instance.match({1,2,3}))\nprint(euler_instance.match({1,2,3,4}))\nprint(euler_instance.match({1,2,3,4,5}))\n\nprint('\\n')\n\n# Euler instance getitem dunder:\n# [1, 2, 3]\n# [1, 2, 3]\n# [1, 2, 3, 4]\n# [1, 2, 3, 4, 5]\nprint(euler_instance['a'])\nprint(euler_instance[('a', )])\nprint(euler_instance[('a', 'b', )])\nprint(euler_instance[('a', 'b', 'c',)])\n\nprint('\\n')\n\n# Euler instance remove_key:\n# {('b', 'c'): [4], ('c', 'd'): [5], ('b', 'c', 'd'): [3], ('d',): [6], ('b',): [2]}\neuler_instance.remove_key('a')\nprint(euler_instance.as_dict())\n```\n\n</details>\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Euler diagrams in python",
    "version": "1.3.0",
    "project_urls": {
        "Homepage": "https://pypi.org/project/eule/",
        "Repository": "https://github.com/trouchet/eule"
    },
    "split_keywords": [
        "euler-diagram",
        " sets"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dd9cf747d85111e2d455636bde133090630dff10a67286541c80759df8062dfe",
                "md5": "8fda7e520af7fb2b209f7423ca973fc1",
                "sha256": "21651d46077eeb08237eaba39e96c7408d1bf58f7ac453aebfefe03d1dc9b52a"
            },
            "downloads": -1,
            "filename": "eule-1.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8fda7e520af7fb2b209f7423ca973fc1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8.1",
            "size": 8731,
            "upload_time": "2024-04-22T22:45:21",
            "upload_time_iso_8601": "2024-04-22T22:45:21.894521Z",
            "url": "https://files.pythonhosted.org/packages/dd/9c/f747d85111e2d455636bde133090630dff10a67286541c80759df8062dfe/eule-1.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e51e9279280ca3d0e390e8593176bb03e71aafabc972bf8aa311be12130c2740",
                "md5": "64998057ccc1d3e422ae50c6aff6904b",
                "sha256": "bb5b4c1d2906d0fc6315286bf54c219c897e89bb83d333136f3a80e9c49040f7"
            },
            "downloads": -1,
            "filename": "eule-1.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "64998057ccc1d3e422ae50c6aff6904b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8.1",
            "size": 8452,
            "upload_time": "2024-04-22T22:45:23",
            "upload_time_iso_8601": "2024-04-22T22:45:23.644921Z",
            "url": "https://files.pythonhosted.org/packages/e5/1e/9279280ca3d0e390e8593176bb03e71aafabc972bf8aa311be12130c2740/eule-1.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-22 22:45:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "trouchet",
    "github_project": "eule",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "eule"
}
        
Elapsed time: 0.24362s