Salureconnect python documentatie

Salureconnect python documentatie

SalureConnect

SalureConnect is a Python package that handles the credential information between other packages and the web platform SalureConnect. The package simplifies the process of fetching and refreshing authentication credentials, as well as downloading files stored on the SalureConnect platform.

Table of Contents

Installation

To install the salureconnect package, run:

Copy code
  1. pip install salureconnect

Usage

Initialization

To start using the SalureConnect package, you first need to import the module and create an instance of the SalureConnect class:

pythonCopy code
  1. from salureconnect import SalureConnect salure = SalureConnect(customer=
  2. salure = SalureConnect(customer=
  3. 'your_customer_name', api_token='your_api_token', staging='prod')

You can also set the following environment variables instead of passing the customer and API token as parameters:

  1. SALURECONNECT_CUSTOMER_NAME
  2. SALURECONNECT_API_TOKEN
  3. SALURECONNECT_ENVIRONMENT

Fetching Credentials

To fetch authentication credentials for a specific system, use the get_system_credential() method:

  1. pythonCopy code
  2. credentials = salure.get_system_credential(system='system_name', label='label_name', test_environment=False)

Refreshing Credentials

To refresh OAuth authentication credentials for a specific system, use the refresh_system_credential() method:

  1. pythonCopy code
  2. credentials = salure.refresh_system_credential(system='system_name', system_id=123)

Listing Files

To list available files from the SalureConnect API, use the list_files() method:

pythonCopy code
  1. files = salure.list_files()

Downloading Files

To download multiple files from SalureConnect, use the download_files() method:

pythonCopy code
  1. salure.download_files(output_path='path/to/output/folder', filter_upload_definition_ids=[1, 2], filter_file_names=['file1', 'file2'], filter_deleted=False)

To download a specific file from SalureConnect, use the download_file() method:


python
Copy code
  1. salure.download_file(file_id=123, file_name_and_path='path/to/output/file.ext')




    • Related Articles

    • Profit Package Documentation

      Profit Package Documentation The Profit package is a Python package designed to retrieve specific GetConnectors defined by the user in their AFAS environment. It utilizes the SalureConnect package to securely retrieve the necessary credential ...
    • Voorbeeld configuratie NginX

      De volgende configuratie is een minimale configuratie in NginX voor het gebruik van de Agent. Natuurlijk kan deze configuratie worden uitgebreid en verdeeld over meerdere conf-bestanden. worker_processes  1; events {       worker_connections  1024; } ...
    • Salurefunctions helpers

      SalureFunctions This module provides a class SalureFunctions which contains various utility functions that can be used for data processing and error handling in a data manipulation context. The class contains the following functions: applymap(key: ...
    • Requirements en installatie

      Om de agent correct te laten werken, zijn de volgende instellingen nodig. Hard- en softwarevereisten Windows Server 2012 64 bit of 2016 64 bit met 8 GB Ram, minimaal 2 CPU cores met 2.40 GhZ, 150 GB harde schijf; Verbinding met het internet ...
    • Beveiliging

      De agent van SalureConnect is een webserver zonder front-end. Dit betekent dat beveiligingsproblemen zoals CORS, XSS, CSRF enz. niet van toepassing zijn. De belangrijkste beveiligingskwesties zijn authenticatie, encryptie en rate-limiting. ...