Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Loman

Manage complex calculation flow via robust DAG-based dependency logic in Python

License: BSD-3-Clause Python versions PyPI - Version PyPI - Wheel ReadTheDocs

Github Linux MAC OS Code style: ruff uv Hatch project CodeFactor

CI MARIMO DEVCONTAINER

Open in GitHub Codespaces

Smart computation management - Only recalculate what's necessary

Loman tracks the state of your computations and their dependencies, enabling intelligent partial recalculations that save time and computational resources. Perfect for data pipelines, real-time systems, and complex analytical workflows.

Table of Contents

โœจ Features

Build smarter computation graphs with automatic dependency tracking

  • ๐Ÿ”„ Smart Recalculation: Only compute what's changed - save time and resources
  • ๐Ÿ“Š Dependency Tracking: Automatic graph-based dependency management
  • ๐ŸŽฏ Selective Updates: Control which outputs to compute and when
  • ๐Ÿ’พ State Persistence: Serialize computation graphs for inspection and recovery
  • ๐Ÿ” Visual Debugging: Built-in GraphViz integration for computation visualization
  • โšก Real-time Ready: Perfect for systems with inputs that tick at different rates
  • ๐Ÿงช Research Friendly: Iterate quickly by updating methods and re-running only necessary computations
  • ๐Ÿ”— Framework Agnostic: Works with NumPy, Pandas, and your favorite Python libraries

๐Ÿš€ Quick Start

Loman Graph Example

The above computation graph was generated with this simple Loman code:

from loman import Computation

# Create a computation graph
comp = Computation()
comp.add_node('a', value=1)                    # Input node
comp.add_node('b', lambda a: a + 1)            # b depends on a
comp.add_node('c', lambda a, b: 2 * a)         # c depends on a and b
comp.add_node('d', lambda b, c: b + c)         # d depends on b and c
comp.add_node('e', lambda c: c + 1)            # e depends on c

# Smart computation - only calculates what's needed
comp.compute('d')  # Will not compute 'e' unnecessarily!

# Inspect intermediate values
comp.to_dict()
# {'a': 1, 'b': 2, 'c': 2, 'd': 4, 'e': None}

# Visualize the computation graph
comp.draw()  # Creates the graph shown above

๐Ÿ“š Explore More: Check out our Interactive Examples including:

  • ๐Ÿ’ฐ Interest Rate Swap Pricing
  • ๐Ÿ“ˆ Portfolio Valuation
  • ๐Ÿฆ CDO Modeling

Why Loman?

Loman transforms how you build and maintain complex data processing pipelines by making computational dependencies explicit and manageable. Instead of manually tracking what needs to be recalculated when data changes, Loman handles this automatically.

Perfect for:

  • ๐Ÿ”ด Real-time Systems: Handle inputs that tick at different rates efficiently

    • Only recalculate affected downstream computations
    • Control which outputs are computed and when
    • Monitor status of all components in your pipeline
  • ๐Ÿ“ฆ Batch Processing: Build robust daily/periodic processes

    • Serialize computation state for easy inspection and debugging
    • Replace inputs or override intermediate values without full recomputation
    • Recover from failures efficiently by resuming from last good state
  • ๐Ÿ”ฌ Research & Analytics: Accelerate iterative development

    • Modify calculation methods and re-run only what's needed
    • Track complex dependencies in evolving analysis pipelines
    • Reuse expensive intermediate computations across experiments

๐Ÿ“– Learn More: The Introduction explains in detail how Loman can transform your workflow.

๐Ÿ“ฅ Installation

Using pip (recommended)

pip install loman

From source (development)

git clone https://github.com/janusassetallocation/loman.git
cd loman
pip install -e .

Note: Use -e flag for editable installation during development

๐Ÿ› ๏ธ Development

For contributors and advanced users

Loman uses modern Python development tools for a smooth developer experience:

# ๐Ÿ“ฆ Install development dependencies
make install

# ๐Ÿงช Run tests with coverage
make test

# โœจ Format and lint code
make check

Development Tools

  • Testing: pytest with coverage reporting
  • Formatting: ruff for code formatting and linting
  • Task Management: Taskfile for build automation
  • Quality: Pre-commit hooks for code quality

๐Ÿ“– Documentation

โ˜๏ธ Try Loman in Codespaces

Open in GitHub Codespaces

Instant development environment in your browser Click the button to launch a fully configured development environment in your browser.

What's Included

  • ๐Ÿ Python 3.13 - Latest Python with all dependencies pre-installed
  • ๐Ÿ› ๏ธ Development Tools - pytest, ruff, mypy, pre-commit hooks ready to go
  • ๐Ÿ““ Interactive Notebooks - Marimo notebooks for exploring examples
  • โšก Zero Setup - Everything configured ready to go
  • ๐ŸŽฏ VS Code Extensions - Python, testing, and productivity extensions pre-installed

๐Ÿ‘ฅ Contributing

We welcome contributions! ๐ŸŽ‰

Whether you're fixing bugs, adding features, or improving documentation, your help makes Loman better for everyone.

Quick Start for Contributors

  1. ๐Ÿด Fork the repository
  2. ๐ŸŒฟ Create your feature branch: git checkout -b feature/amazing-feature
  3. โœจ Make your changes and add tests
  4. ๐Ÿงช Test your changes: make test
  5. ๐Ÿ“ Commit your changes: git commit -m 'Add amazing feature'
  6. ๐Ÿš€ Push to your branch: git push origin feature/amazing-feature
  7. ๐ŸŽฏ Open a Pull Request

Resources

Acknowledgments ๐Ÿ™


โญ If you find Loman useful, please consider giving it a star! โญ

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.6.1a4.tar.gz (531.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

loman-0.6.1a4-py3-none-any.whl (104.8 kB view details)

Uploaded Python 3

File details

Details for the file loman-0.6.1a4.tar.gz.

File metadata

  • Download URL: loman-0.6.1a4.tar.gz
  • Upload date:
  • Size: 531.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for loman-0.6.1a4.tar.gz
Algorithm Hash digest
SHA256 1ac347725dcb8bc1fe27944ec2b25c0f5490f176e0097358511ed2eb517d5310
MD5 bdd00400a814fd0037062f4ed985f9c3
BLAKE2b-256 405a6732973dccb1379a2ef046ea2c58d90a02960eee137eb9ff413fa6d3ec4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for loman-0.6.1a4.tar.gz:

Publisher: rhiza_release.yml on janushendersonassetallocation/loman

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file loman-0.6.1a4-py3-none-any.whl.

File metadata

  • Download URL: loman-0.6.1a4-py3-none-any.whl
  • Upload date:
  • Size: 104.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for loman-0.6.1a4-py3-none-any.whl
Algorithm Hash digest
SHA256 ccc6cf4fb035e052b194700991ecf6913e9c7fc4cae20032d212ac6f9386ba2e
MD5 dc54b0f92cedd077a586ff1a2347a925
BLAKE2b-256 596083bc2dc586e8b914bca19ba83d64fe37454ada339960b5acade8abede539

See more details on using hashes here.

Provenance

The following attestation bundles were made for loman-0.6.1a4-py3-none-any.whl:

Publisher: rhiza_release.yml on janushendersonassetallocation/loman

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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