Skip to main content

priceloop-api-python

A client library for accessing Priceloop API

Install

pip install priceloop-api

Usage

First, create a PriceloopClient:

from priceloop_api.priceloop.auth import PriceloopClient

client = PriceloopClient.with_credentials("username", "password")

read and write to nocode:

import pandas as pd
from priceloop_api.priceloop.data import to_nocode, read_nocode

# write to nocode
data = [["Alex", 10], ["Bob", 12], ["Clarke", 13]]
df = pd.DataFrame(data, columns=["Name", "Age"])
to_nocode(df, "table_name", client)

# read from nocode
new_df = read_nocode("table_name", client, limit=limit, offset=offset)

call your endpoint, example:

from priceloop_api.api.workspace_api import list_workspaces, get_workspace

workspaces = list_workspaces.sync(client=client)
workspace = get_workspace.sync(workspaces[0], client=client)

add columns to existing table:

from priceloop_api.api.column_api import add_data_column, add_formula_column
from priceloop_api.models import AddDataColumnType

add_data_column.sync(workspace.name, "table_name", "column_name", type=AddDataColumnType.STRING, client=client)
add_formula_column.sync(workspace.name, "table_name", "column_name", "expression", client=client)

Things to know:

  1. Every path/method combo becomes has four functions:

    1. sync: Blocking request that returns parsed data (if successful) or None
    2. sync_detailed: Blocking request that always returns a Request, optionally with parsed set if the request was successful.
    3. asyncio: Like sync but async instead of blocking
    4. asyncio_detailed: Like sync_detailed but async instead of blocking
  2. All path/query params, and bodies become method arguments.

  3. If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above)

  4. Any endpoint which did not have a tag will be in priceloop_api.api.default

Metadata

Release files for priceloop-api-dev1 0.127.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for priceloop-api-dev1 0.127.0
File Size Uploaded
priceloop-api-dev1-0.127.0.tar.gz 33.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for priceloop-api-dev1 0.127.0
File Interpreter ABI Platform
priceloop_api_dev1-0.127.0-py3-none-any.whl Python 3 none any Details

Total release size: 145.3 kB

Release files / priceloop-api-dev1-0.127.0.tar.gz

Download URL priceloop-api-dev1-0.127.0.tar.gz
Size 33.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1e37a9b3ce17c27c1d09adcfd53e761f0fe34e6316ad399382a9b8375d5af02e
BLAKE2b-256 checksum
How to use checksums
86ef96a059e0ccc14a48a4a248182d840947a55f6679d0e555b308b3559b8e16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.17

Release files / priceloop_api_dev1-0.127.0-py3-none-any.whl

Download URL priceloop_api_dev1-0.127.0-py3-none-any.whl
Size 112.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
096152fee6e83c9c0795662fbb691fc0aa378ff03e2b10e2e1dfc12447b765f1
BLAKE2b-256 checksum
How to use checksums
8dc8c282c052d390813ae043e4fdae4bcf53d303002c7d733eed1408d898cce8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.17

Release history Release notifications | RSS feed

This release

0.127.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page