Working with our API
Our API is based on the OpenAI specification and can be found here:
At the moment we support:
- Listing workspaces
- Get meta table information
- Get table data
- Export pandas DataFrame to our platform
We also provide a simple Python client:
pip install priceloop-api
Once you installed the client you can start working with it.
- Export Pandas DataFrame to our platform:
import pandas as pd
from priceloop_api.utils import DefaultConfiguration, to_nocode
configuration = DefaultConfiguration.with_user_credentials('username', 'password')
d = {'col1': [1, 2], 'col2': [3, 4]}
df = pd.DataFrame(data=d)
to_nocode(df, 'table_name', configuration)
- Read from our platform to a Pandas DataFrame:
from priceloop_api.utils import DefaultConfiguration, read_nocode
configuration = DefaultConfiguration.with_user_credentials('username', 'password')
data = read_nocode('table_name', configuration, limit=2, offset=0)
print(data)
- Getting the raw data:
from priceloop_api import ApiClient
from priceloop_api.api.default_api import DefaultApi
from priceloop_api.util import DefaultConfiguration
configuration = DefaultConfiguration.with_user_credentials('username', 'password')
with ApiClient(configuration) as api_client:
api_instance = DefaultApi(api_client)
workspaces = api_instance.list_workspaces()
workspace = api_instance.get_workspace(workspaces[0])
table = api_instance.get_table(workspace.name, workspace.tables[0].name)
table_data = api_instance.get_table_data(workspace.name, 'table_name', limit=2, offset=0)
print(table_data)