Skip to main content

# Kaiju

Kaiju is a framework for data analaysis applications. A Kaiju application contains a set of operations, which correspond to Python methods in your code. Kaiju offers three main features:

  • Automatic command-line parsing configuration.

  • Logging of operation executions.

  • MongoDB interfacing.

This simplifies your research work by automatically documenting your analyses and storing their results, making it easy for you to document and reproduce your work. Kaiju also stimulates you to work from the system shell instead of from within Python, so your application is a stand-alone program from the moment you start building it, and not just a Python module that you are always struggling to integrate to another system.

## Usage

Create a kaiju.Kaiju object with the desired configuration, and use the __call__ to decorate your operation methods.

Kaiju depends on pymongo for interacting with MongoDB.

## Kaiju axioms

A Kaiju application is defined by a Kaiju object, an instance from the Kaiju class.

A Kaiju application contains a set of operations.

Each Kaiju operation is a method from your Python code that was decorated by the Kaiju object.

These operations can consume and produce data. The consumed data are the method arguments, and the output data is whatever the method returns. Operations typically output lists, or generators, and Kaiju iterates over this output.

The output from a non-logged operation is simply sent to stdout.

The output from a logged operation is stored in MongoDB, in the collection specified by the decorator argument output. Each element from this output becomes a separate record in the collection.

A logged operation outputs a maker_id code, which is the _id assigned to this operation execution in the Kaiju log.

You can specify different types for the operation inputs using the classes from the kaiju.arguments submodule.

The Data input class lets you fetch data from the database. The argument receives a maker_id and outputs to the underlying operation method a generator for corresponding data.

Release files for kaiju 0.1.0

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

Source distribution (sdist)

Source distribution for kaiju 0.1.0
File Size Uploaded
kaiju-0.1.0.tar.gz 8.6 kB Details

Release files / kaiju-0.1.0.tar.gz

Download URL kaiju-0.1.0.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9b44305965f36277aab073fe7ddaf9cece29e0707f07c3fc27d48ec60a39516a
BLAKE2b-256 checksum
How to use checksums
3392c99882e371d80785f1244deab685b959d09c76c8dc01809ac242e69527bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file

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