Data analysis framework to log operations and interface with MongoDB.
Project description
# 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.
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
File details
Details for the file kaiju-0.1.0.tar.gz
.
File metadata
- Download URL: kaiju-0.1.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b44305965f36277aab073fe7ddaf9cece29e0707f07c3fc27d48ec60a39516a |
|
MD5 | a7eb5e039cdc189c88fe2ef147f1d295 |
|
BLAKE2b-256 | 3392c99882e371d80785f1244deab685b959d09c76c8dc01809ac242e69527bf |