Skip to main content

A Python tool to model inheritance hierarchy of Python class

Project description

Introduce

This package use tree structure to model inheritance hierarchy of Python project. The core class is _ClassNode which represents a Python class, it maintains two lists to store all of its base classes and subclasses

On top of that, _ClassNode provides hierarchy visualization

Usage

## Initiaze ClassNodeFactory which manages all _ClassNode
node_factory = ClassNodeFactory()

## Initiaze a class node of BasePromptTemplate which is a class from langchain
bpt_node = node_factory.init(BasePromptTemplate)

## Visuralize the class node by calling _ClassNode.visualize_from_self(). It returns a Digraph from graphviz
graph = bpt_node.visualize_from_self()
graph.render('class_nodes', format='png', cleanup=True, view=True)

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyinheritance-0.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

pyinheritance-0.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file pyinheritance-0.1.tar.gz.

File metadata

  • Download URL: pyinheritance-0.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for pyinheritance-0.1.tar.gz
Algorithm Hash digest
SHA256 db5f659bdf2cc02658a65696142b365caaa3b59eec02f53f3f585a1a730083b8
MD5 e01b858f71a588b2ddfed54111edfb30
BLAKE2b-256 7dd42a9f21cdb1cd24bf9add20758726692487649d6ccb5b6fb524f7319fcc98

See more details on using hashes here.

File details

Details for the file pyinheritance-0.1-py3-none-any.whl.

File metadata

  • Download URL: pyinheritance-0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for pyinheritance-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7477398cc2f98e812229196ed268a191606d1e3e0289d9c8ad2a00f3dbb748e0
MD5 a2167b5eae1375227eaa6722c60bd925
BLAKE2b-256 9d93e46fbcc7407257940ee96c143181ca8d70f196a347491491401edd768bf3

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