Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken documentation #23

Merged
merged 2 commits into from
Jun 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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