Skip to main content

Library to create and execute computation graphs

Project description

Bodkin is a Python library to create, evaluate, and visualize computation graphs.

Usage / terminology

bodkin.Node - an abstract base class for for a black box that updates its outputs based on its inputs

bodkin.Atom - a Node that is a fundamental building block. An Atom provides a function to update its outputs from its inputs. An Atom is what we would conventionally refer to as a node in a graph.

bodkin.DAG - a directed acyclic graph that encapsulates a set of Nodes and evaluates them in order of dependency. A DAG consists of Node objects, so it may contain Atoms and/or other embedded DAGs.

Any Node's inputs and outputs may be accessed through its properties i and o, resepectively. These properties behave like dictionaries but can be linked together so that setting a output on one Node also sets an input on some other Node.

To learn more see the examples/basic.py script for a basic usage example or pass an object into help(). Feel free to open an issue for further questions.

Installation

Dependencies

Basic functionality only relies on the standard library, but visualizing objects via their show method requires the dot command from graphviz.

From PyPI

Install using pip

python3 -m pip install bodkin

From source

python3 -m pip install https://gitlab.com/samflam/bodkin.git

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

bodkin-0.1.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

bodkin-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file bodkin-0.1.0.tar.gz.

File metadata

  • Download URL: bodkin-0.1.0.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for bodkin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3fcf77076e4dfb6b507c2660a5748847babc8cb3bfa11fe1a133a9f5bcc7f851
MD5 82d3743055f37b8cf0c49f1d735a4b88
BLAKE2b-256 6d3df98dd809642a68bbcfc69b512df53efccc1d2338b7ffb4e7244c8f1bac66

See more details on using hashes here.

File details

Details for the file bodkin-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bodkin-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for bodkin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 255e9fbce54a62247f03e746eba4226275adee304f3eb11690c545f734873d49
MD5 9abf6a89d5237e49a4f626c591b9a18e
BLAKE2b-256 9e5302deabbda90d3c38b46b05a17ea4339f7e3e9e02f6ff3f06cd428bfb1983

See more details on using hashes here.

Supported by

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