Skip to content

Latest commit

 

History

History
37 lines (23 loc) · 1.12 KB

File metadata and controls

37 lines (23 loc) · 1.12 KB

Code Execution Examples

This directory contains examples of executing code in various programming languages using the AGB SDK.

Supported Languages

  • Python: Full Python 3 environment with standard libraries.
  • JavaScript: Node.js environment.
  • Java: Java execution environment (supports snippets).
  • R: R statistical computing environment.

Examples

Basic Execution

Comprehensive example demonstrating execution in all supported languages.

<<< ./main.py

Caching Results

Demonstrates how to implement client-side caching for deterministic code execution results to save costs and reduce latency.

<<< ./caching.py

Concurrency

Demonstrates how to execute multiple code tasks in parallel using threading for high-throughput scenarios.

<<< ./concurrency.py

Security Best Practices

Demonstrates security best practices, including input validation and sanitization for untrusted code.

<<< ./security.py

Multiple Results Scenarios

Demonstrates scenarios where code execution returns multiple results, including multiple display() calls, charts, and mixed output types.

<<< ./multiple_results_demo.py