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:
-
Every path/method combo becomes has four functions:
sync
: Blocking request that returns parsed data (if successful) orNone
sync_detailed
: Blocking request that always returns aRequest
, optionally withparsed
set if the request was successful.asyncio
: Likesync
but async instead of blockingasyncio_detailed
: Likesync_detailed
but async instead of blocking
-
All path/query params, and bodies become method arguments.
-
If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above)
-
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.182.1.dev0.tar.gz
(49.2 kB
view hashes)
Built Distribution
Close
Hashes for priceloop-api-0.182.1.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48a35a0b9d839e7bf8f460db6d027bc5425b680b9b56c62e73c226ff1683965a |
|
MD5 | 4fb4dd9ac6f4e4078bfaf02a4b9ccc6d |
|
BLAKE2b-256 | c13aa807d0c7705b62bd2736b5fa1a0451a2b9e5cebaf6e562b3065a43e75451 |
Close
Hashes for priceloop_api-0.182.1.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a419df9a2a717b946ec2c0aa51b1dea9e66cd927e8928daca875d1cdd4f13f0d |
|
MD5 | 27ca9d67f628b9e3df1f3a3a13d34097 |
|
BLAKE2b-256 | 3ed7cfb86aaba60a8f2950f4aa39886fb9790864230c97875aef742acc00d790 |