Simple Anaplan Connector Package
Introduction
This is a simple Anaplan connector intended to be used as a quick and easy way to mainly integrate with Anaplan using Python. This package does not include all API options. It uses the main calls to push data to anaplan via files, call a process, and export data.
Anaplan Integration Overview
The method of pushing data to Anaplan is common in the data warehousing space. Instead of pushing data in a transaction api (i.e. record by record), Anaplan utilizes a bulk data API which includes pushing delimitted files to a file location, and then copying the file into an Anaplan database. This is similar to Postgres and Snowflake's COPY INTO command.
Command Summary
Import anaplan connector
from anaplanConnector import Connection
Intialize the connection
- Basic authentication
anaplan = Connection(authType='basic',email='email@example.com',password='SecurePassword',workspaceId='anaplanWorkspaceID',modelId='AnaplanModelID')
- Certificate authentication
anaplan = Connection(authType='certificate', privateCertPath='./AnaplanPrivateKey.pem', publicCertPath='./AnaplanPublicKey.pem', workspaceId='anaplanWorkspaceID', modelId='AnaplanModelID')
There are two auth types: "basic" and "certificate". If basic is supplied, then the fields "email" and "password" are required. If "certificate" is supplied, then the fields "privateCertPath" and "publicCertPath" are required.
Multiple workspaceIds and modelIds can be used by doing one of the following:
-
Change the ids directly:
anaplan.workspaceId = 'NewWorkspaceId'anpalan.modelId = 'NewModelId' -
Make new initialization of the connector:
anaplanModel1 = Connection(email='email@example.com',password='SecurePassword',workspaceId='anaplanWorkspaceID',modelId='AnaplanModelID')
anaplanModel2 = Connection(email='email@example.com',password='SecurePassword',workspaceId='anaplanWorkspaceID2',modelId='AnaplanModelID2')
Get a list of Workspaces
workspaces = anaplan.getWorkspaces()
Get a list of Models
models = anaplan.getModels()
Get a list of files
files = anaplan.getFiles()
Get the fileId from a filename
fileId = anaplan.getFileIdByFilename(filename)
Load a file
anaplan.loadFile(filepath,fileId)
filepath = The local location and filename of the file to load (e.g. '/home/fileToLoad.csv')
fileId = The Anaplan file ID which can be found by running one of the above commands
Get a list of processes
processes = anaplan.getProcesses()
Get a processId from a process name
processId = anaplan.getProcessIdByName(processName)
Run a process
anaplan.runProcess(processId)
Get a list of exports
exports = anaplan.getExports()
Get an exportId from an export name
exportId = anaplan.getExportIdByName(exportName)
Export data
anaplan.export(exportId, filepath)
exportId = is Anaplan's Export ID that can be found with the above commands
filepath = is the location and filename of where you want to save the file (e.g. '/home/export.csv')
encoding (optional) = is the character encoding of the export file (default is utf-8)
Process Examples
Load data into Anaplan
from anaplanConnector import Connection
anaplan = Connection(authType='basic',email='email@example.com',password='SecurePassword',workspaceId='anaplanWorkspaceID',modelId='AnaplanModelID')
filepath = '/tmp/dataToLoad.csv'
anaplan.loadFile(filepath,anaplan.getFileIdByFilename('ExampleFile.csv'))
anaplan.runProcess(anaplan.getProcessIdByName('Import Data'))
Export data from Anaplan
from anaplanConnector import Connection
anaplan = Connection(authType='basic',email='email@example.com',password='SecurePassword',workspaceId='anaplanWorkspaceID',modelId='AnaplanModelID')
filepath = '/tmp/LocalExportedData.csv'
anaplan.export(anaplan.getExportIdByName('ExportedData.csv'), filepath)
List of features that are currently being developed
- Script to create the public and private pem keys from the .p12 file.
Metadata
Release files for anaplanConnector 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| anaplanConnector-0.1.2.tar.gz | 10.7 kB | Without provenance | Details for anaplanConnector-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anaplanConnector-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for anaplanConnector-0.1.2-py3-none-any.whl |
Total release size: 20.1 kB
Release files / anaplanConnector-0.1.2.tar.gz
| Download URL | anaplanConnector-0.1.2.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
33bc4edc130dbff7e4f8c5e4224fd504697948fa24ed8336103022d888cde770
|
|
BLAKE2b-256 checksum How to use checksums |
abfe34e6d3d64a20057aa1aeaecc673659848bf52a5c54902953f3e290455115
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
|
Release files / anaplanConnector-0.1.2-py3-none-any.whl
| Download URL | anaplanConnector-0.1.2-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26a9bb43253c671bed6747d7aedc4e234a0706a7b94ae35a8bacfb2ef6ae1b76
|
|
BLAKE2b-256 checksum How to use checksums |
4d44d800a670a21372c1f6bd3340c436138026cb45002d56d760bc92712cbabf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
|
Security for anaplanConnector 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.