Skip to main content

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
  • 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

relation-1.0.2.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

relation-1.0.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file relation-1.0.2.tar.gz.

File metadata

  • Download URL: relation-1.0.2.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

Hashes for relation-1.0.2.tar.gz
Algorithm Hash digest
SHA256 aa4a242aa029b26b28217851068961e5d392b086458a4c33773882fccc547d0b
MD5 b3a5ca1c4cfd244fb84890674fcde348
BLAKE2b-256 55062c79ff6436f92c48f46e73bf812011b057afcd13aa4175ca4a94132c196c

See more details on using hashes here.

File details

Details for the file relation-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: relation-1.0.2-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

Hashes for relation-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1e1044db50cafa4c2eba1d69aefd5e670ed1d679d85dc7fbaad8c002c4b7d2a8
MD5 7b2ab488bcf548e230983912a322416b
BLAKE2b-256 640624026638597ee7b66c8c0bfe74e0735f84b7bd65e8399639b0d6b350295d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page