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

download relation.py to your project and import it:

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.

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.tar.gz (3.7 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-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: relation-1.0.tar.gz
  • Upload date:
  • Size: 3.7 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.tar.gz
Algorithm Hash digest
SHA256 4e34dd6a6074fe52bd57236fc22498590e51aa2e75b39a35f341f12840e509ed
MD5 5188dd29f86b46780f86fba8207624e7
BLAKE2b-256 bfd53a673075fd95b7715de76390745931aa74f4d6b7c6bff29461a5c0c8581a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: relation-1.0-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-py3-none-any.whl
Algorithm Hash digest
SHA256 17302e8bc831d6965543d0444691040d4a6e2baa0eb703755c699612aec7a619
MD5 01c8170442dce2d97bd8ada226a7c5d8
BLAKE2b-256 bfdee6ff0987f691252e36e8bdd74b5533a0fc2d2569c9ed87ad4451117f326a

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