Skip to main content

Loman tracks state of computations, and the dependencies between them, allowing full and partial recalculations.

Project description

Loman

PyPI - Version PyPI - Wheel PyPI - Python Version PyPI - License Github - Test Status ReadTheDocs

Loman tracks the state of your computations, and the dependencies between them, allowing full and partial recalculations.

Example

>>> comp = Computation()
>>> comp.add_node('a')
>>> comp.add_node('b', lambda a: a+1)
>>> comp.add_node('c', lambda a, b: 2*a)
>>> comp.add_node('d', lambda b, c: b + c)
>>> comp.add_node('e', lambda c: c + 1)
>>> comp.compute('d') # Will not compute e unnecessarily
>>> comp.get_value_dict() # Can see all the intermediates
{'a': 1, 'b': 2, 'c': 2, 'd': 4, 'e': None}
>>> comp.draw_graphviz() # Can quickly see what calculated

Loman Graph Example

For further examples, take a look at the Quickstart.

Purpose

Loman makes it easy to ingest data from multiple sources, clean and integrate that data, and then use it to produce results for exporting to databases and other systems, as well as reports or dashboards for humans. Uses of Loman include:

  • Real-time systems. Inputs to real-time systems frequently tick at different rates. Loman ensures that only what is necessary is recalculated. Furthermore, given some outputs that a slower to produce than others, Loman allows you to control which outputs are computed how frequently. Loman allows you to quickly show status of all items, and keep track of what needs to be updated.
  • Batch systems. When used as part of a daily process, Loman can serialize some or all nodes of a computation graph, allowing for easy inspection of original inputs, intermediate calculations and tracebacks when failures occur. Original inputs can be replaced, or intermediate calculation methods or values overwritten in-place, allowing easy recovery from failures, without re-acquiring potentially expensive inputs or re-performing time-consuming calculations unnecessarily.
  • Research. Loman allows you to keep track of complex dependencies as you create new calculation systems, or revisit old ones. Calculate new data, statistics and reports re-using existing raw inputs and calculated intermediates. Improve your productivity by ncreasing the frequency of iterations - make adjustments to methods in-place and re-run only what needs to be re-run.

The Introduction section of the documentation has more details on why Loman might be useful for you.

Installation

To install loman:

$ pip install loman

Or you can download from github: https://github.com/janusassetallocation/loman

Documentation

Up-to-date and thorough documentation is available on ReadTheDocs at http://loman.readthedocs.io/

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

loman-0.5.3.tar.gz (43.0 kB view details)

Uploaded Source

Built Distribution

loman-0.5.3-py3-none-any.whl (30.8 kB view details)

Uploaded Python 3

File details

Details for the file loman-0.5.3.tar.gz.

File metadata

  • Download URL: loman-0.5.3.tar.gz
  • Upload date:
  • Size: 43.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for loman-0.5.3.tar.gz
Algorithm Hash digest
SHA256 139610c7e41b8fad205475e9158659d8ec11b1bcfed51fa8c192dbc033117a8e
MD5 86a351391e97def0209945fafa222baf
BLAKE2b-256 c7d5ff0f4376ed7d14b1e68c57cf94d9955dd90e00e00b591cb66f44ffa2259e

See more details on using hashes here.

File details

Details for the file loman-0.5.3-py3-none-any.whl.

File metadata

  • Download URL: loman-0.5.3-py3-none-any.whl
  • Upload date:
  • Size: 30.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for loman-0.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 15cb65278b6c05accb4131f7d0d019463a232af1e12ae0c97f7ae12955240c41
MD5 04ea2c29ce379047fe99be11d588ffb4
BLAKE2b-256 4ae80b316d54ff0edb3b1a55e0842b155226b157e353c5226d98454526e75eba

See more details on using hashes here.

Supported by

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