An Indico Automatic Downloader is typically set up by connecting the Indico Python Client Library to the Indico Data Platform API. This configuration allows you to automate the extraction and download of processed documents, submission files, or event attachments. Prerequisites
Before writing your automation script, ensure you have the following components: An active Indico Platform Account.
Python installed on your system (version 3.7 or higher recommended).
Your specific Indico Cluster URL (e.g., your-cluster.indico.io). Step-by-Step Setup Guide 1. Install the Indico Client Library
Open your terminal or command prompt and install the official client package using pip: pip install indico-client Use code with caution. 2. Obtain Your API Token
To authenticate your automated downloads, you must generate a secure token from your Indico platform: Log into your Indico platform dashboard.
Navigate to Agents and Workflows and open your Account page. Click the Download New API Token button.
Save the downloaded text file (usually named indico_api_token.txt) into your project directory or home folder. 3. Create the Downloader Script
Create a new Python file (e.g., downloader.py) and use the template below to initialize the client and fetch files automatically:
from indico import IndicoClient, IndicoConfig # Define paths and credentials TOKEN_PATH = “./indico_api_token.txt” CLUSTER_HOST = “your-cluster.indico.io” # 1. Initialize the client configuration config = IndicoConfig( host=CLUSTER_HOST, api_token_path=TOKEN_PATH ) client = IndicoClient(config=config) # 2. Add your downloder logic here # Example: Fetching a document from a workflow submission submission_id = 12345 submission = client.submissions.get(submission_id) if submission.status == “COMPLETE”: # Download the final processed artifact file_content = client.storage.get(submission.result_file) with open(f”downloadeddoc{submission_id}.json”, “wb”) as f: f.write(file_content) print(f”Successfully downloaded submission {submission_id}“) Use code with caution. 4. Automate the Downloader Runtime
To make the script run completely automatically without manual interaction, schedule it based on your operating system:
Linux / macOS: Use a Cron job. Open your crontab using crontab -e and add a line like 0/usr/bin/python3 /path/to/downloader.py to check for and download new files every hour.
Windows: Open Task Scheduler, click Create Basic Task, choose your time interval trigger, and select Start a Program pointing to your python.exe and script path. Important Security Guidelines
Token Expiration: Indico API tokens remain valid indefinitely until you generate a new one.
Token Invalidation: Generating a new token from the dashboard instantly expires any previous token files you deployed. Ensure you update your downloader scripts immediately if you hit regenerate.
Environment Security: Never commit your indico_api_token.txt file to public code repositories like GitHub.
If you need help building out specific automation rules, tell me:
Are you downloading files from Indico Data Workflows (AI/ML) or Indico Event Management?
Getting Started — Indico Python Client 3.1.0 documentation
Installation * pip install indico-client. * pip install –upgrade indico-client. * import indico print(indico. version) indicodatasolutions.github.io Indico Registration System
Leave a Reply