Skip to main content

A function-managing package for models and systems with shared variables.

Project description

porchlight

porchlight is a function management suite that manages common inputs and outputs of methods and/or functions.

This package's original intent was to be a part of a modular scientific package yet to be released. Rather than isolating this method to a single model, the already-developed work has been modified to stand alone as a package.

porchlight does not have any dependencies outside of the standard CPython library. Please note that porchlight requires Python 3.9+.

Installation

You can install porchlight by cloning this repository to a local directory, opening a command line, and running: pip install porchlight

Usage

The main object used in porchlight is the porchlight.Neighborhood object. This groups all functions together and keeps track of call order and parameters.

import porchlight


# We call a porchlight.Neighborhood object to instantiate it with no functions
# yet.
neighborhood = porchlight.Neighborhood()

# To add a function, we simply define it and pass it to porchlight.
def increment_x(x: int, y: int) -> int:
    x = x * y
    return x

neighborhood.add_function(increment_x)

# The neighborhood object inspects the function, finding input and output
# variables if present. These are added to the collections of functions and
# parameters.
print(neighborhood)  # porchlight.Neighborhood has a pretty-print string.

Although this is the current extent of documentation, there should be some more complete documentation within the next couple weeks/months.

Documentation

Documentation for porchlight can be found on Read the Docs here: https://porchlight.readthedocs.io/en/latest/

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

porchlight-0.1.2.tar.gz (26.3 kB view details)

Uploaded Source

Built Distribution

porchlight-0.1.2-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file porchlight-0.1.2.tar.gz.

File metadata

  • Download URL: porchlight-0.1.2.tar.gz
  • Upload date:
  • Size: 26.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for porchlight-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2972a4460ae6a0c79d5d404e0e7c819a32df3f20ba8e2175d6451d59b5f817bd
MD5 e61a5f114c099790705c6945eedb7bc2
BLAKE2b-256 6fbc7d0fb9469f2deb9e5a0b4ce9d270dd2854ac0e8165f87056be26f98c24a2

See more details on using hashes here.

File details

Details for the file porchlight-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: porchlight-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for porchlight-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 306e1c9fdd06a51ed720f476257543e8d0345f9e271f3b273692d5ef9c7b7402
MD5 13ca2c59a5a367445a33ac192d8e1732
BLAKE2b-256 704b9854bb3fc6459ed8ba0e5ef58f1c91aa33ef2232e59a3e0e4892efe0588d

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