eule 1.3.1
pip install eule
Latest version
Released:
Euler diagrams in python
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT License)
- Author: Bruno Peixoto
- Maintainer: Bruno Peixoto
- Tags euler-diagram, sets
- Requires: Python >=3.9
Classifiers
- Development Status
- Intended Audience
- License
- Natural Language
- Programming Language
Project description
Euler's diagrams are non-empty Venn's diagrams. For further information about:
- the library: on URL https://eule.readthedocs.io;
- Euler diagrams: on wikipedia article https://en.wikipedia.org/wiki/Euler_diagram
Motivation
How to install
We run the command on desired installation environment:
pip install eule
Minimal example
Click to unfold usage
We run command python example.py
on the folder with file example.py
and following content:
#!/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())
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT License)
- Author: Bruno Peixoto
- Maintainer: Bruno Peixoto
- Tags euler-diagram, sets
- Requires: Python >=3.9
Classifiers
- Development Status
- Intended Audience
- License
- Natural Language
- Programming Language
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 eule-1.3.1.tar.gz
.
File metadata
- Download URL: eule-1.3.1.tar.gz
- Upload date:
- Size: 213.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5e4efe738e08468736afd4086f502f73bb4296fc9fe1824351bb046dc5806c2 |
|
MD5 | d8f7048568e68c4b3d940f119af12cda |
|
BLAKE2b-256 | e6c4816b7899c160dfb5feab06c7d373683c59e7b2ba6b7cb9a331f5a8fcecd4 |
File details
Details for the file eule-1.3.1-py3-none-any.whl
.
File metadata
- Download URL: eule-1.3.1-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ba71e007808bcbf9eef728e49eba04c44027df994cfadb6bdb8e96eb0d1e2bb |
|
MD5 | 6a834999582299b6f63a8aacee02ecf9 |
|
BLAKE2b-256 | c349dead3b7b384639efb2ac5b9038b9f227266b7330647af49980c417ef7326 |