Skip to main content

This is the main Fusionbase python package to make handling and interacting with data a piece of cake.

Project description

Fusionbase: Fast access to the world's data

📦 PyPI

We believe that working with data, specifically the exploration and integration part, should be fun! Therefore, our API and Python package is designed to seamlessly support a data scientist's and engineer's daily work.

If you have questions, feel free to reach out!

Fusionbase is open source software released by Fusionbase's Engineering Team. It is available for download on PyPI.

Important links

Installation in Python - PyPI release

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

pip install fusionbase

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

# Import Fusionbase
from fusionbase.DataStream import DataStream

# Create a new datastream
# Provide your API Key and the Fusionbase API URI (usually: https://api.fusionbase.com/api/v1)
data_stream = DataStream(auth={"api_key": "*** SECRET CREDENTIALS ***"},
                      connection={"base_uri": "https://api.fusionbase.com/api/v1"})

data_stream_key = 28654971

Human readable datastream information:

# Print a nice table containing the meta data of the stream
data_stream.pretty_meta_data(key=data_stream_key)

Get Data:

data = data_stream.get_data(key=data_stream_key)
print(data)

Get Data as a pandas Dataframe:

df = data_stream.get_dataframe(key=data_stream_key)
print(df)

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

# Import Fusionbase
from fusionbase.DataService import DataService

# Create a new dataservice
# Provide your API Key and the Fusionbase API URI (usually: https://api.fusionbase.com/api/v1)
data_service = DataService(auth={"api_key": "*** SECRET CREDENTIALS ***"},
                      connection={"base_uri": "https://api.fusionbase.com/api/v1"})

data_service_key = 23622632

Human readable dataservice information:

# Retrieves the metadata from a Service by giving a Service specific key and prints it nicely to console
data_service.pretty_meta_data(key=data_service_key)

Human readable dataservice definition:

# Retrieve the request definition (such as required parameters) from a Service by giving a Service specific key and print it to console.
data_service.pretty_request_definition(key=data_service_key)

Invoke a dataservice:

# Invoke a service by providing input data
payload = [
{
	"name": "address_string", # THIS IS THE NAME OF THE INPUT VALUE
	"value": "Agnes-Pockels-Bogen 1, 80992 München" # THE VALUE FOR THE INPUT
}
]

result = data_service.invoke(key=data_service_key, parameters=payload)

print(result)

Changelog

Version 0.1.0 (2022.05.07)

  • Initial release

Contributing

Contributing to Fusionbase can be in contributions to the code base, sharing your experience and insights in the community on the Forums, or contributing to projects that make use of Fusionbase. Please see the contributing guide for more specifics.

License

Fusionbase is licensed under the GPL 3.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fusionbase-0.1.0.tar.gz (31.6 kB view hashes)

Uploaded Source

Built Distribution

fusionbase-0.1.0-py3-none-any.whl (41.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page