A function-managing package for models and systems with shared variables.
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file porchlight-0.4.0.tar.gz
.
File metadata
- Download URL: porchlight-0.4.0.tar.gz
- Upload date:
- Size: 39.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 517dce4f7086e1cdd0dffbe5fc53e1d3cc7ec3a3d71f91dfbb9f925bd35e79c2 |
|
MD5 | 148a2909aa0ad40c21dbf65207721737 |
|
BLAKE2b-256 | 694483f6d36a96765ab1c1821b9bb7150fbe6248716b88b8291860d093f19931 |
File details
Details for the file porchlight-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: porchlight-0.4.0-py3-none-any.whl
- Upload date:
- Size: 45.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2959a79de437a7a1952ced554cdb03bc30cfea8c581aa10af9f46dfdb190292 |
|
MD5 | 52d22173572f2611c8830a3bad6ec738 |
|
BLAKE2b-256 | 7575a3e9b831794724f76d960a8c5fe883070a4d700bbf0c42e16072a79608c5 |