Developer Documentation
Learn how to build, schedule, and scale your Python automations on CyberOak v2.0.
Platform Overview
CyberOak is a cloud-native RPA platform that runs standard Python scripts. Unlike traditional RPA that relies on visual recorders, CyberOak gives you full code-level control.
.py file, map your inputs (Secrets/Files), and let us handle the infrastructure, logging, and alerts.
The Automation Workflow
1. Develop
Write your script locally. Test using standard libraries.
2. Configure
Upload to CyberOak. Map variables in the UI and upload any necessary input files (Excel, Configs).
3. Execute
Trigger via CRON schedule or on-demand. Output files are automatically captured and saved.
4. Notifications
Get notified when execution is complete.
Python Runtime Environment
Your robots execute in an isolated sandbox environment.
- Python Version 3.11.7
- Operating System Linux (Debian/Ubuntu based)
Handling Inputs & Secrets
Avoid hardcoding sensitive data. CyberOak provides two ways to inject data into your script at runtime.
1. Environment Variables (Secrets)
Defined in the "secrets" tab of your robot. Securely encrypted.
# Access a secret defined in the UI
db_password = parameters.get('ORACLE_DB_PASS')
2. Runtime Variables
Defined in "Parameters" section. Useful for dynamic parameters.
# 'inputs' is a global dictionary available in the runtime
target_email = inputs.get('notification_email')
Built-in Helper Functions
The platform exposes specific utility functions globally to simplify common tasks like saving reports or generating PDFs.
Saves a generated file to the execution results. It automatically links the file to the automation run.
# 1. Saving simple text/JSON
import json
data = {"status": "success", "processed": 50}
save_file("log.json", json.dumps(data))
# 2. Saving an in-memory Excel file (using BytesIO)
from io import BytesIO
from openpyxl import Workbook
wb = Workbook()
ws = wb.active
ws['A1'] = "Report Data"
buffer = BytesIO()
wb.save(buffer)
save_file("Weekly_Report.xlsx", buffer)
Generates a PDF binary from an uploaded HTML template using xhtml2pdf.
# template_file: Name of the HTML file uploaded in 'File Inputs'
# context_dict: Data to inject into the template
context = {"user_name": "Alice", "date": "2025-01-01"}
pdf_bytes = generate_pdf("invoice_template.html", context)
save_file("Invoice_Alice.pdf", pdf_bytes)
Run CPU-intensive tasks across multiple worker processes.
def heavy_calc(x):
return x * x
# Automatically distributes work
results = list(executor.map(heavy_calc, range(1000)))
Database Connectivity
www.cyber-oak.com in your database's "Allowed Hosts" settings.
We support the following adapters out of the box:
- PostgreSQL:
psycopg2(v2.9.11) - Oracle:
oracledb(v3.4.1) - MySQL:
mysqlclient(v2.2.7)
Pre-installed Libraries
No pip install required. The following libraries are available in the environment:
Web & Scraping
| Library | Version | Use Case |
|---|---|---|
| requests | 2.32.3 | HTTP REST API clients |
| selenium | 4.38.0 | Browser automation & scraping |
| beautifulsoup4 | 4.14.3 | HTML/XML Parsing |
| scrapy | 2.13.4 | Web crawling framework |
| zeep | 4.3.2 | SOAP / WSDL clients |
Data Processing & Office
| Library | Version | Use Case |
|---|---|---|
| pandas | 2.3.3 | Data analysis |
| numpy | 2.2.6 | Numeric arrays |
| polars | 1.35.2 | High-performance DataFrames |
| openpyxl | 3.1.5 | Excel (XLSX) manipulation |
| pdfplumber | 0.11.8 | PDF text extraction |
| xhtml2pdf | 0.2.17 | HTML to PDF generation |
Utilities & Cloud
| Library | Version | Use Case |
|---|---|---|
| boto3 | 1.38.17 | AWS SDK |
| paramiko | 4.0.0 | SSH & SFTP |
| opencv-python | 4.12.0 | Image processing |
| Pillow (PIL) | 12.0.0 | Image manipulation |
| smtplib | Built-in | Sending emails |
Coding Guidelines
- Validation: Raise
ValidationErrorfor recoverable issues rather than crashing withexit(1). - Logging: Use the standard
loggingmodule. All stdout/stderr is captured in the Orchestrator logs. - Paths: Do not rely on absolute paths like
C:/Users/.... Use relative paths or the temporary directory.