Loading

Developer Documentation

Learn how to build, schedule, and scale your Python automations on CyberOak

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.

Core Philosophy: Upload a .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 scripts execute in a controlled orchestrated environment.

  • Python Version 3.11.7

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.

save_file(filename, content)

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)
generate_pdf(template_file, context_dict)

Generates a PDF binary from an uploaded HTML template using Weasyprint.

# 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)
executor.map(func, iterable)

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

Firewall Rule Required: To ensure your script can connect, you must whitelist the CyberOak domain 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:

AI & Intelligent Automation
LibraryVersionUse Case
anthropic0.116.0Anthropic Claude API client
openai2.44.0OpenAI API client (GPT-4o, Embeddings)
Web & Scraping
LibraryVersionUse Case
beautifulsoup44.14.3HTML/XML Parsing
playwright1.61.0Headless browser automation & E2E testing
requests2.34.2HTTP REST API clients
httpx0.28.1HTTP client library for Python 3 featuring synchronous and asynchronous APIs
scrapy2.13.4Web crawling framework
selenium4.38.0Browser automation & scraping
zeep4.3.2SOAP / WSDL clients
Data Processing & Office
LibraryVersionUse Case
sqlalchemy2.0.51SQL toolkit and Object-Relational Mapper (ORM).
GeoPandas1.1.4Geographic and geometric data analysis
gspread6.2.1Google Sheets API interaction
numpy2.2.6Numeric arrays
openpyxl3.1.5Excel (XLSX) manipulation
pandas2.3.3Data analysis
pdfplumber0.11.8PDF text extraction
polars1.35.2High-performance DataFrames
pytesseract0.3.13Tesseract OCR image text extraction
weasyprint69.0HTML to PDF generation
matplotlib3.10.8Data Visualization
plotly6.8.0Data Visualization
scikit-learn1.8.0Data analysis
seaborn0.13.2Data Visualization
Utilities & Cloud
LibraryVersionUse Case
boto31.38.17AWS SDK
google-cloud-storage3.12.0Google Cloud Object Storage SDK
opencv-python4.12.0Image processing
paramiko4.0.0SSH & SFTP
Pillow (PIL)12.0.0Image manipulation
smtplibBuilt-inSending emails
twilio9.10.9SMS, WhatsApp & communication API
markdown3.10.2Markdown Tool
pyftpdlib2.2.0FTP server library
google-core / oauthVariousCore dependencies (google-auth 2.55.2, oauthlib 3.3.1, etc.)
Workflow Management & Orchestration
LibraryVersionUse Case
apache-airflow3.3.0Apache Airflow
prefect3.7.7Open-source workflow orchestration framework

Coding Guidelines

  • Validation: Raise ValidationError for recoverable issues rather than crashing with exit(1).
  • Logging: Use the standard logging module. 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.