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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: relation-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b680ee980c1a706f73946f09bab6f7abd3823afeba565a38cf7dfd485ed74566
MD5 53bfc390d5f33d1135382f93424133b8
BLAKE2b-256 d1fb07539f64b1639ddf8426b1d10ba3fd64b8dc2e500c2f5c2197c839cd5b92

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