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", certificate=keys.get_cert(), private_key=keys.get_key(), password=b"{key_password}")
conn = AnaplanConnection(auth.auth_token, "{workspace_id}", "{model_id}")
anaplan.file_upload(conn=conn, file_id="{file_id}", chunk_size=5, data='/Users.csv')
results = anaplan.execute_action(conn=conn, action_id="", retry_count=3)
for result in results.responses:
print(result.task_details)
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.3.2.tar.gz
(48.1 kB
view hashes)
Built Distribution
Close
Hashes for anaplan_api-0.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a22f149205be11347bf650659c263bd24f970f513fd4f6234f949e91c3df082 |
|
MD5 | f656f9118e407dee84caf00e1a1ff927 |
|
BLAKE2b-256 | 24772d70ea468b9a794ca91739e946c0914e97f66eb70ac35e7d9a9a43e2855d |