a python module for making relationships between classes
Project description
Relation
a python module for making relationships between classes
how to use
pip install relation and import it in your python project:
from relation import Relator
- to define a new relator (a custom class), use
class insert_name_here(Relator): - to add a relation to a relator, multiply them
- to add a child to a relator, use
parent+child- you can do
parent+[child1,child2,child3...]to add multiple children
- you can do
- to merge 2 relators, use
|to change both or|=to change the first one - to access a relator's relationships as a list of strings, use
.[insert relationship]_names
see examples for more usage
mindmap (new)
import mindmap with
from relation.map import create_graph
create graphs with create_graph. you can define the depth and whether to include relations, parents, children or self from the graph.
the function will return a pyvis network, so make sure you have pyvis installed and show the graph with graph.show.
note that non-relator objects do not work in mindmaps
roadmap
- Python File
- More examples and features
- mindmaps
- Upload to PyPi to able to be pip installed
- Swift Package
- NPM Package
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 relation-1.0.3.tar.gz.
File metadata
- Download URL: relation-1.0.3.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2a26cee2b6f4669757c147d6d9b814875cf735482b1b461ee02602d6265684c
|
|
| MD5 |
c8f28f242ecb11ccbd8592322cac3da8
|
|
| BLAKE2b-256 |
b0d77a40ffcfa67b9e5da7caae7aca62b85ca7ab9cfc79bfade9f4d546d34517
|
File details
Details for the file relation-1.0.3-py3-none-any.whl.
File metadata
- Download URL: relation-1.0.3-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22f6a232f5c1a97f2cf043152fde8e52c417613fd2fa78256b5ca74b85bb3001
|
|
| MD5 |
f4f41763aaef0f2de8eb7e9db259049f
|
|
| BLAKE2b-256 |
20302d946b5e030423de28b48d0b0b1b3cd9992dd8999e67af04e36d1fd66032
|