Skip to main content

Jangada

A Python framework for modeling scientific systems with persistence and composable object capabilities.

Overview

Jangada provides robust infrastructure components for data-intensive scientific applications, emphasizing:

  • Explicit serialization: Descriptor-driven schemas with HDF5 persistence
  • Composable capabilities: Orthogonal mixin classes for identity, metadata, and state
  • Rich terminal output: Template-based formatting with the Rich library
  • System modeling: Hierarchical system/subsystem paradigms with lazy loading

Key Features

Serialization & Persistence

  • SerializableProperty: Descriptors with validation, change tracking, and lazy initialization
  • Serializable: Registry-backed in-memory serialization protocol
  • Persistable: HDF5 persistence layer with lazy dataset loading via ProxyDataset
  • Support for NumPy arrays, Pandas DataFrames, and custom types

Composable Mixins

Six orthogonal capability classes:

  • Identifiable: Globally unique IDs with weak reference registry
  • Taggable: Validated symbolic tags for organization
  • Nameable: Human-readable names with validation
  • Describable: Long-form descriptions
  • Colorable: Canonical color representation (hex format)
  • Activatable: Boolean activation state

Display & Representation

  • Displayable: Abstract base for Rich library integration
  • Representable: Template method pattern for consistent formatting
  • Customizable terminal output with panels, tables, and color

System Modeling

  • System: Container for subsystems with hierarchical organization
  • Namespace management for system/subsystem paradigms
  • Integration with all framework capabilities

Installation

pip install jangada

Quick Start

from jangada import Persistable, SerializableProperty
from jangada.mixin import Identifiable, Nameable, Taggable

class ScientificModel(Persistable, Identifiable, Nameable, Taggable):
    """A simple scientific model with persistence and metadata."""
    
    data = SerializableProperty(default=None)
    parameters = SerializableProperty(default=dict)
    
    def __init__(self, name: str, tag: str):
        self.name = name
        self.tag = tag
        self.parameters = {"learning_rate": 0.01}

# Create and persist
model = ScientificModel(name="Experiment-1", tag="ml_model")
model.save("/path/to/storage.h5")

# Load later
loaded_model = ScientificModel.load("/path/to/storage.h5")
print(f"Loaded {loaded_model.name} with ID {loaded_model.id}")

Design Philosophy

Jangada follows these principles:

  • Modularity: Orthogonal components that work independently
  • Composability: Mix-and-match capabilities via multiple inheritance
  • Explicitness: Clear schemas and configuration over magic
  • Efficiency: Lazy loading for large datasets
  • Quality: Comprehensive documentation, testing, and type hints

Documentation

Full documentation is available at readthedocs.io.

Requirements

  • Python >= 3.10
  • numpy >= 1.20.0
  • pandas >= 1.3.0
  • h5py >= 3.0.0
  • matplotlib >= 3.4.0
  • rich >= 10.0.0

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details.

Author

Rafael - GitHub Profile

Metadata

Release files for jangada 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jangada 0.1.9
File Size Uploaded Provenance Actions
jangada-0.1.9.tar.gz 91.1 kB Without provenance Details for jangada-0.1.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jangada 0.1.9
File Interpreter ABI Platform Actions
jangada-0.1.9-py3-none-any.whl Python 3 none any Details for jangada-0.1.9-py3-none-any.whl

Total release size: 145.6 kB

Release files / jangada-0.1.9.tar.gz

Download URL jangada-0.1.9.tar.gz
Size 91.1 kB
Tags Source
SHA-256 checksum
How to use checksums
bdcb648664bd5eab4d9a5e92796ea0ebe0255065d2c8907656095e185b0843e3
BLAKE2b-256 checksum
How to use checksums
b8533b7400053d3e8e32b29fe2e2b7273e966c82165277b68450d2aaf2179770
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / jangada-0.1.9-py3-none-any.whl

Download URL jangada-0.1.9-py3-none-any.whl
Size 54.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1864ee868148e99dbd4bad9596f22ae24f25b7350fdd6b3ec60151976999fac
BLAKE2b-256 checksum
How to use checksums
e04a71d9e26644454d3a171f3bccc404bae201a04d59db5ad377fa35be28d061
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for jangada 0.1.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page