Skip to main content

Flow Python for nodes and edges

This article is one of the Integration features supported by Flow. See also: Using Flow Datasets Integrations

Introducing the Flow Immersive Python Client – a convenient solution for pushing data from pandas to Flow. With this library, you can easily upload datasets and identify them using a unique title. If you upload a new dataset with the same title, it will create a new version of the same dataset.

Our python library is available on PyPi. Start by installing it with pip:

pip install flowgl

Here's a short script pushing an example pandas DataFrame to a dataset titled 'My Dataset'.

# Import the necessary libraries:
import pandas as pd
from flowgl import Client

# Create a sample pandas dataframe:
df = pd.DataFrame({
    'name': ['John', 'Jane', 'Joe'],
    'age': [30, 25, 40],
    'city': ['New York', 'San Francisco', 'Los Angeles']
})

# Create an instance of the client with your Flow credentials:
client = Client(
    username="flow immersive username",
    password="flow immersive password",
)

# Push the dataframe to Flow by defining a title:
client.push_data(
    df,
    dataset_title='Test',
)

If the title doesn't yet exist for your user, a dataset will be created. If the title exists, a new version will be created.

With the Flow Immersive Python Client, it's easier than ever to push data from pandas to Flow. The code examples provided in this blog post give you a good starting point for using the Flow Immersive Python Client in your own projects.

See also: Using Flow Datasets Integrations