Skip to main content

A client library for accessing Priceloop API

Project description

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

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

priceloop-api-0.213.6.tar.gz (57.6 kB view details)

Uploaded Source

Built Distribution

priceloop_api-0.213.6-py3-none-any.whl (209.5 kB view details)

Uploaded Python 3

File details

Details for the file priceloop-api-0.213.6.tar.gz.

File metadata

  • Download URL: priceloop-api-0.213.6.tar.gz
  • Upload date:
  • Size: 57.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for priceloop-api-0.213.6.tar.gz
Algorithm Hash digest
SHA256 ed78e447656aaa9a6a276a193357da2a81ee892cecfa8dcc629e94c843f2eabb
MD5 6ffc6b80b20e17c499082a4d611b7a65
BLAKE2b-256 6e9476e56db1beb851540141701e73f654669a4293b3ec4e88a6d48963a1d3eb

See more details on using hashes here.

File details

Details for the file priceloop_api-0.213.6-py3-none-any.whl.

File metadata

File hashes

Hashes for priceloop_api-0.213.6-py3-none-any.whl
Algorithm Hash digest
SHA256 5c30f2374bf2e6f14e490f32555b1ee922a8228336c7b5c1947d73f59758998d
MD5 1927c4b52baca1e4797a2c59316f8f15
BLAKE2b-256 001e76c52121640e760ccb1ec52f81ad436e4e525a42d73bc1a1c5ac9f0a07f5

See more details on using hashes here.

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