For implementing Anaplan Bulk API
Reason this release was yanked:
Feature enhancements
Project description
anaplan-api
Anaplan-API is a Python library wrapper for Anaplan Bulk API and Anaplan Authentication API.
Installation
Use the package manager pip to install Anaplan-API.
pip install anaplan-api
Usage
import anaplan-api as ap
from anaplan-api.AuthToken import AuthToken
from anaplan-api import keystore_manager as km
from anaplan-api.AnaplanConnection import AnaplanConnection
#Generate Basic Auth token for API requests
auth = ap.generate_authorization('Basic', 'user', 'password')
#Generate Cert Auth token for API requests
key_pair = km.get_keystore_pair('/path/to/keystore.jks', 'keystore_pass', 'key_alias', 'private_key_passphrase')
privKey = key_pair[0]
pubCert = key_pair[1]
authReq = ap.generate_authorization('Certificate', privKey, pubCert)
auth = AuthToken(authReq[0], authReq[1])
# Create connection object to interact with API
conn = AnaplanConnection(auth.get_auth_token(), "workspaceId", "modelId")
#Uploading a file
with open('file.csv', 'r') as file:
data = file.read()
anaplan.stream_upload(conn, "113000000116", data)
anaplan.stream_upload(conn, "113000000116", "", complete=True)
# Execute Anaplan action
#Returns a strint with task results and error dumps if any
print(ap.execute_action(conn, "actionId", retryCount))
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
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
anaplan-api-0.1.5.tar.gz
(15.0 kB
view hashes)
Built Distribution
Close
Hashes for anaplan_api-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8d8e20b065584460e2afe40b16cf9f0aef145b125e23d35c3231062396e834a |
|
MD5 | 68d52ab784b9579f2b94a9b540d14808 |
|
BLAKE2b-256 | 788552dd6ff86cf910e92743e5b89ab090e92f98be2bad1480f1241be07e2fdf |