Skip to main content

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

Project description

porchlight logo. A snake's head erupts from the bottom of a porchlight casing, reaching towards a spinning triangular pyramid. The pyramid radiates bright, saturated, multicolored light.

porchlight

porchlight is a function management suite that handles common inputs and outputs of methods and/or functions which evolve over the lifetime of a program.

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+, and that examples may require external libraries such as numpy and matplotlib.

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 increase_x(x: int, y: int) -> int:
    x = x * y
    return x

neighborhood.add_function(increase_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)

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.5.0.tar.gz (40.8 kB view details)

Uploaded Source

Built Distribution

porchlight-0.5.0-py3-none-any.whl (46.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: porchlight-0.5.0.tar.gz
  • Upload date:
  • Size: 40.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for porchlight-0.5.0.tar.gz
Algorithm Hash digest
SHA256 abbd7ebf500769cf0c9be49dbe8fb75ec33faa4179752b1888dbba9328a2b7ce
MD5 bb26cdf07138b28e314e8f05c40bdacc
BLAKE2b-256 1393fb2f6e7ad6f882116c93bb0677a859297938a66ef76a097f1ad233be9130

See more details on using hashes here.

File details

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

File metadata

  • Download URL: porchlight-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 46.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for porchlight-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf5ee5b275ddfb58448676786367b3b918b390d407c3cef1d718dfb36ec81511
MD5 aa1fed464869dc2dd53657a0e632cab2
BLAKE2b-256 78eea1e7b3beda88b2e65aeb27e16281df741f333dff3055e272c8eed39d7c89

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