Skip to content

Commit

Permalink
closes: #19 - Fix broken documentation (#23)
Browse files Browse the repository at this point in the history
* updates docs with new models

* updates docs, also bumps version to 1.0.0
  • Loading branch information
thomasborgen committed Jun 9, 2021
1 parent 8ecd4d4 commit 85ffccc
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 103 deletions.
12 changes: 7 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,24 @@

## Version 1.0.0 Release: Kaiba

Kaiba is a data transformation tool written in Python that uses a DTL(Data Transformation Language) expressed in normal JSON to govern output structure, input transformation and mappings.
Kaiba is a data transformation tool written in Python that uses a DTL(Data Transformation Language) expressed in normal JSON to govern output structure, data fetching and data transformation.

### Features

* Mapping with configuration File.
* Looping data from multiple places to create 1 or many objects
* Mapping by configuration File.
* Looping/Iterating data from multiple places to create 1 or many objects
* Combine multiple values to one.
* Default values
* If statements
* is, not, in, contains
* conditions: is, not, in, contains
* can match any valid json value including objects and lists
* Casting
* integer, decimal, iso date
* Regular Expressions
* get whole regex result
* choose groups
* choose matching groups
* Slicing
* Slice/Substring strings or arrays

### Changelog

Expand Down
3 changes: 3 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ The configuration governs not only where to find data, but also the structure of
The two main components of the configuration json is the object and attributes. An object can contain nested objects and/or attributes. In the attribute part of the file is where you actually tell the mapper where to find data. In the object you are deciding the structure and also telling the mapper if there are iterable data anywhere that needs to be iterated to create multiple instances.


!!! warning
This document is a bit outdated since its not updated after switch to pydantic models.

## Object

An object has a name, it can have attributes, nested objects or a special type of objects called [branching objects](#branching-object). It will also know if itself is an array and the path to where the input data can be iterated to create multiple objects.
Expand Down
17 changes: 9 additions & 8 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Kaiba
Configurable Data Mapping for mortals

Kaiba is a data transformation tool written in Python that uses a DTL(Data Transformation Language) expressed in normal JSON to govern output structure, data fetching and data transformation.
___
![test](https://github.com/kaiba-tech/kaiba/workflows/test/badge.svg)
[![codecov](https://codecov.io/gh/kaiba-tech/kaiba/branch/master/graph/badge.svg)](https://codecov.io/gh/kaiba-tech/kaiba)
Expand All @@ -15,7 +16,7 @@ ___

## What is Kaiba

Kaiba is a JSON to JSON mapper. That means that we read input JSON and create output JSON. How the output is created is based on instructions from a configuration file. The configuration file governs the the output structure and tells Kaiba where in the input to find data and where to place it in the output. In addition to this Kaiba supports data transformation with `data casting`, `if conditions`, `combination of data from multiple places` and of course setting `default` values.
Kaiba is a JSON to JSON mapper. That means that we read input JSON and create output JSON. How the output is created is based on instructions from a configuration file. The configuration file governs the the output structure and tells Kaiba where in the input to find data and where to place it in the output. In addition to this Kaiba supports data transformation with `data casting`, `regular expressions`, `if conditions`, `combination of data from multiple places` and of course setting `default` values.

__This enables you to change any input into the output you desire.__

Expand All @@ -25,7 +26,7 @@ The kaiba App is currently in development

[app.kaiba.tech](https://app.kaiba.tech)

The app is a UI for creating Kaiba configurations. With the UI you can map in real time easily with an ui and create the config.
The app provides a user interface for creating Kaiba configurations. With the app you can map in real time easily and create the kaiba config.

## The Kaiba API

Expand Down Expand Up @@ -109,18 +110,18 @@ my_config = {
{
'name': 'invoices',
'array': True,
'iterables': [
'iterators': [
{
'alias': 'invoices',
'alias': 'invoice',
'path': ['root', 'invoices'],
},
],
'attributes': [
{
'name': 'amount',
'mappings': [
'data_fetchers': [
{
'path': ['invoices', 'amount'],
'path': ['invoice', 'amount'],
},
],
'casting': {
Expand All @@ -131,7 +132,7 @@ my_config = {
},
{
'name': 'debtor',
'mappings': [
'data_fetchers': [
{
'path': ['root', 'customer', 'first_name'],
},
Expand Down
Loading

0 comments on commit 85ffccc

Please sign in to comment.