Python

Installation in Python - PyPI release

Fusionbase is on PyPI, so you can use pip to install it.

pip install fusionbase

If you want to use all features, you must make sure that pandas and numpy are installed.

pip install pandas
pip install numpy

Fusionbase by default uses the standard JSON library of Python to serialize and locally store data. However, you can use the faster orjson library as a drop-in replacement.

Therefore, just install orjson and Fusionbase will automatically detect and use it.

pip install orjson

Getting Started

Got to examples to deep dive into Fusionbase and see various examples on how to use the package.

Here are some Examples for a quick start:

Data Streams

The Data Stream module lets you conveniently access data and metadata of all Data Streams. Each stream can be accessed via its unique stream id or label.

Setup

Human readable datastream information

Getting the data

The samples below show how to retrieve the data of a datastream as a list of dictionaries. Each element in the list represents one row within the dataset.

Note that the data can by hierarchical.

Get Data as a pandas DataFrame

If you are working with pandas, it is probably the most convenient way to load to data directly as a pandas DataFrame.

Storing the data

Large datasets potentially do not fit into the memory. Therefore, it is possible to get the data of a stream directly as partitioned files.

The folder structure is automatically created and always like ./{ID-OF-THE-STREAM}/data/*

Data Services

A data service can be seen as an API that returns a certain output for a specific input. For example, our address normalization service parses an address and returns the structured and normalized parts of it.

Setup

Human readable data service information:

Human readable data service definition:

Invoke a data service:

Last updated

Was this helpful?