LAM
LAM is a data transformation tool designed for Laminar's API integration platform.
Overview
LAM enables you to write efficient transformations for your API data using either JavaScript (Bun) or Python. It's designed to be secure, fast, and easy to integrate into your Laminar workflows.
Features
- Dual Engine Support: Choose between JavaScript (Bun runtime) for fast execution or Python for complex data processing
- Built-in Libraries: Access lodash and date-fns in JavaScript, comprehensive Python standard library modules
- Security: Runs in sandboxed environments with strict resource limits and security restrictions
- Performance: Uses Bun runtime for JavaScript and sandboxed Python interpreter
- Monitoring: Built-in execution statistics and error tracking
Execution Environments
Bun JavaScript Runtime (js)
Configuration:
- Engine: Bun
- Timeout: 5 seconds
- Execution: Isolated with
--no-fetch --smol --silentflags - Storage: No localStorage/sessionStorage support
- Modules: Shared node_modules directory
Available Libraries:
- lodash (^4.17.21): Utility library for array/object manipulation, data transformations (Global:
_) - date-fns (^2.30.0): Modern date utility library with
format,parseISOfunctions
Transform Function Signature:
(input) => { /* transform logic */ return result; }
Python Interpreter with Sandboxing (py)
Configuration:
- Engine: Python interpreter
- Timeout: 5 seconds
- Memory Limit: 100MB
- CPU Limit: 5 seconds (RLIMIT_CPU)
- Virtual Memory: 100MB (RLIMIT_AS)
- Execution: Isolated with
-Iflag (ignores environment/site packages)
Security Restrictions:
- Blocked Modules: subprocess, sys, os, shutil, pathlib, importlib, builtins, _thread, ctypes, socket, pickle, multiprocessing
- Blocked Functions: import, eval, exec, globals, locals, getattr, setattr, delattr, compile, open
- Blocked Patterns: subclasses, dunder attributes access
Available Standard Library Modules:
- json: JSON encoder and decoder
- datetime: Date and time handling
- time: Time-related functions
- math: Mathematical functions and constants
- statistics: Statistical functions (mean, median, mode, standard deviation)
- collections: Counter, defaultdict, OrderedDict, deque
- itertools: Efficient looping, combinations, permutations
- functools: reduce, partial, lru_cache
- re: Regular expression operations
- copy: Shallow and deep copy operations
- decimal: Precise decimal calculations
- csv: CSV file reading and writing
- io: StringIO, BytesIO for in-memory files
- dataclasses: Data classes for storing data
- typing: Type hints support
- enum: Support for enumerations
- random: Random number generation
- uuid: UUID generation
- hashlib: Secure hash and message digest algorithms
- base64: Base64 encoding and decoding
- urllib: URL handling modules
- urllib.parse: URL parsing utilities
- html: HTML processing utilities
- xml: XML processing
- xml.etree: XML ElementTree API
- xml.etree.ElementTree: XML parsing and creation
- string: String constants and classes
- textwrap: Text wrapping and filling
- operator: Standard operators as functions
- bisect: Array bisection algorithm
- heapq: Heap queue algorithm
- array: Efficient arrays of numeric values
- unicodedata: Unicode character database
- locale: Internationalization services
- calendar: Calendar-related functions
- zoneinfo: Time zone support (Python 3.9+)
- struct: Pack and unpack binary data
- binascii: Binary/ASCII conversions
- codecs: Encode and decode data
- difflib: Sequence comparison utilities
- pprint: Pretty-printer for data structures
- reprlib: Alternate repr() implementation
- abc: Abstract base classes
- contextlib: Context management utilities
- secrets: Cryptographically secure random numbers
- fractions: Rational numbers
- numbers: Numeric abstract base classes
Safe Built-in Functions:
abs, all, any, bool, chr, dict, divmod, enumerate, filter, float, format, frozenset, hash, hex, int, isinstance, issubclass, iter, len, list, map, max, min, next, oct, ord, pow, print, range, repr, reversed, round, set, slice, sorted, str, sum, tuple, type, zip
Transform Function Signature:
def transform(input_data):
# transform logic
return result
Examples
JavaScript (Bun) Transformations
Perfect for fast data manipulation with familiar syntax:
(input) => {
// Use lodash for data manipulation
const processed = _.map(input.data, item => ({
id: item.id,
formattedDate: format(parseISO(item.date), 'MMM dd, yyyy'),
value: item.value * 2
}));
return {
processed,
summary: {
total: _.sumBy(processed, 'value'),
count: processed.length
}
};
}
Python Transformations
Ideal for complex data processing and statistical analysis:
def transform(input_data):
import statistics
from collections import Counter
# Process numerical data
values = [item["value"] for item in input_data["data"] if "value" in item]
return {
"statistics": {
"mean": statistics.mean(values) if values else 0,
"median": statistics.median(values) if values else 0,
"count": len(values)
},
"frequency": dict(Counter(item["category"] for item in input_data["data"])),
"processedAt": datetime.now().isoformat()
}
Integration with Laminar
LAM is designed to work seamlessly with Laminar's integration platform:
- Flows: Add data transformations to your API flows
- Automation: Schedule and automate data processing
- Monitoring: Track execution statistics and errors
Getting Started
Using LAM in Laminar
- Create a new flow in Laminar
- Add a transformation step
- Choose your engine (JavaScript or Python)
- Write your transformation function
- Deploy and monitor
Resources
Support
Get help with LAM:
Metadata
Release files for lam-cli 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lam_cli-1.0.1.tar.gz | 39.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lam_cli-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 74.8 kB
Release files / lam_cli-1.0.1.tar.gz
| Download URL | lam_cli-1.0.1.tar.gz |
|---|---|
| Size | 39.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f87fbf80f2dd234ea6b447addc952ef9ec425a9b327ed654a86d6f4a6c6eee5
|
|
BLAKE2b-256 checksum How to use checksums |
41607f9c14817a30d2f84da911bd035d7d594ed6b27c519adfce0cec21935a15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 4, 2026.
Transparency logRelease files / lam_cli-1.0.1-py3-none-any.whl
| Download URL | lam_cli-1.0.1-py3-none-any.whl |
|---|---|
| Size | 35.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4cd1c99a1ac91cce26db81186a7f9aed7f0909acaa4bb3c74354f8a13410ea54
|
|
BLAKE2b-256 checksum How to use checksums |
a50e902fd9d1801020969957a5d072ed40e324e60c00ef65577a13031e8a690a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 4, 2026.
Transparency log