Python wrapper around the different PriceCypher APIs
Project description
PriceCypher Python SDK
Python wrapper around the different PriceCypher APIs.
Usage
Installation
Simply execute pip install pricecypher-sdk
Dataset SDK
from pricecypher import Datasets
datasets = Datasets(BEARER_TOKEN)
datasets.index()
datasets.get_meta(DATASET_ID)
datasets.get_scopes(DATASET_ID)
datasets.get_scope_values(DATASET_ID, SCOPE_ID)
datasets.get_transaction_summary(DATASET_ID)
columns = [
{'name_dataset': 'cust_group', 'filter': ['Big', 'Small'], 'key': 'group'},
{'representation': 'cost_price', 'aggregate': 'sum', 'key': 'cost_price'}
]
datasets.get_transactions(DATASET_ID, AGGREGATE, columns)
Contracts
The Script
or ScopeScript
abstract classes can be extended with their abstract methods implemented to create
scripts usable in other services. The ScopeScript
in particular is intended for scripts that calculate values of
certain scopes for transactions. See the documentation on the abstract functions for further specifics.
Development
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Prerequisites
- Python >= 3.9
Setup
The endpoints
module models the different PriceCypher API endpoints. Each file represents a different API and the
contents of each file are structured into the different endpoints that are provided by the API.
Similarly, each file in the models
module defines the models that are provided by the different APIs.
The SDK that this package provides is contained in the top-level package contents.
Deployment
- Execute
python3 -m build
to build the source archive and a built distribution. - Execute
python3 -m twine upload dist/*
to upload the package to PyPi.
Authors
- Marijn van der Horst - Initial work
- Pieter Voors - Contracts
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE file for details
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
Built Distribution
Hashes for pricecypher_sdk-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e9447fae6f4263a017378614170097af0bdcd33dbfad139f26e3f1e5927fcab |
|
MD5 | be553201299740cbfc8d55e915a1c33f |
|
BLAKE2b-256 | 40f9bd95d88f46a70366b30f36a6192fe18f2f07d00ff7e50cfffb5cf4bfbf39 |