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.4.tar.gz
(45.1 kB
view details)
Built Distribution
File details
Details for the file anaplan_api-0.3.4.tar.gz
.
File metadata
- Download URL: anaplan_api-0.3.4.tar.gz
- Upload date:
- Size: 45.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87cd4a06be840bb6737ec1224ad19bdac6993991918e72d321b07b6f4a21dda3 |
|
MD5 | 53f7dbda97b4f1a0cf12e0ea029fa6f7 |
|
BLAKE2b-256 | 709218dca10cc3ccdef2a76077419d3cc07a1a6fd08fb5b20fbe20ae40088d35 |
File details
Details for the file anaplan_api-0.3.4-py3-none-any.whl
.
File metadata
- Download URL: anaplan_api-0.3.4-py3-none-any.whl
- Upload date:
- Size: 71.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2e2af89d28e3537411a1fadc729534e716626288caf667c628204020bb42e79 |
|
MD5 | f8a2050c3d001d8ddb8546d447841e12 |
|
BLAKE2b-256 | defa121f836f138fdef401a1c1675c7382372f2d550714bd9048daab04c366ed |