A Python wrapper for the Anaplan Bulk API
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.
pip3 install anaplan_api
Usage
import logging
from anaplan_api.anaplan import anaplan
from anaplan_api.anaplan.models.AnaplanConnection import AnaplanConnection
from anaplan_api.anaplan.KeystoreManager import KeystoreManager
logging.basicConfig(format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s',
datefmt='%H:%M:%S',
level=logging.INFO)
logger = logging.getLogger(__name__)
if __name__ == '__main__':
keys = KeystoreManager(path='/keystore.jks', passphrase='', alias='', key_pass='')
auth = anaplan.authorize("Basic", email="user@mail.com", password="password")
auth = anaplan.authorize("Certificate", private_key=keys.get_key(), certificate=keys.get_cert())
conn = AnaplanConnection(auth, "WorkspaceID", "ModelID")
anaplan.file_upload(conn=conn, file_id="", chunk_size=5, data='/Users.csv')
results = anaplan.execute_action(conn=conn, action_id="", retry_count=3)
for result in results:
if result: # Boolean check of ParserResponse object, true if failure dump is available
print(result.error_dump)
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.2.10.tar.gz
(46.4 kB
view hashes)
Built Distribution
Close
Hashes for anaplan_api-0.2.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a1b21eac95fa4f5dca298563781dcac4d6ea5ec068780ed8874cbcb64d7f756 |
|
MD5 | 9fc7e628cd2dd993ab713f125f9ddcf8 |
|
BLAKE2b-256 | f72905b9e7b35d32cbac605ea5f4131b53340e5427122f4b65f4dedfa9892bb1 |