eule


Nameeule JSON
Version 1.3.1 PyPI version JSON
download
home_pageNone
SummaryEuler diagrams in python
upload_time2024-11-20 16:30:56
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License
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/)
[![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)

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/trouchet/eule/HEAD)

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": null,
    "name": "eule",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "Bruno Peixoto <brunolnetto@gmail.com>",
    "keywords": "euler-diagram, sets",
    "author": null,
    "author_email": "Bruno Peixoto <brunolnetto@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e6/c4/816b7899c160dfb5feab06c7d373683c59e7b2ba6b7cb9a331f5a8fcecd4/eule-1.3.1.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[![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\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/trouchet/eule/HEAD)\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 License",
    "summary": "Euler diagrams in python",
    "version": "1.3.1",
    "project_urls": {
        "homepage": "https://pypi.org/project/eule/",
        "repository": "https://github.com/trouchet/eule"
    },
    "split_keywords": [
        "euler-diagram",
        " sets"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c349dead3b7b384639efb2ac5b9038b9f227266b7330647af49980c417ef7326",
                "md5": "6a834999582299b6f63a8aacee02ecf9",
                "sha256": "6ba71e007808bcbf9eef728e49eba04c44027df994cfadb6bdb8e96eb0d1e2bb"
            },
            "downloads": -1,
            "filename": "eule-1.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6a834999582299b6f63a8aacee02ecf9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 9089,
            "upload_time": "2024-11-20T16:30:52",
            "upload_time_iso_8601": "2024-11-20T16:30:52.831022Z",
            "url": "https://files.pythonhosted.org/packages/c3/49/dead3b7b384639efb2ac5b9038b9f227266b7330647af49980c417ef7326/eule-1.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e6c4816b7899c160dfb5feab06c7d373683c59e7b2ba6b7cb9a331f5a8fcecd4",
                "md5": "d8f7048568e68c4b3d940f119af12cda",
                "sha256": "d5e4efe738e08468736afd4086f502f73bb4296fc9fe1824351bb046dc5806c2"
            },
            "downloads": -1,
            "filename": "eule-1.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d8f7048568e68c4b3d940f119af12cda",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 213155,
            "upload_time": "2024-11-20T16:30:56",
            "upload_time_iso_8601": "2024-11-20T16:30:56.007291Z",
            "url": "https://files.pythonhosted.org/packages/e6/c4/816b7899c160dfb5feab06c7d373683c59e7b2ba6b7cb9a331f5a8fcecd4/eule-1.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-20 16:30:56",
    "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: 4.43122s