| name | palantir-local-dev-loop |
| description | Configure Palantir Foundry local development with Python transforms and testing.
Use when setting up a development environment, running transforms locally,
or establishing a fast iteration cycle with Foundry.
Trigger with phrases like "palantir dev setup", "palantir local development",
"foundry local dev", "develop with palantir".
|
| allowed-tools | Read, Write, Edit, Bash(pip:*), Bash(npm:*), Grep |
| version | 1.5.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","palantir","foundry","development","testing"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Palantir Local Dev Loop
Overview
Set up local development for Palantir Foundry integrations. Covers running transforms locally against sample data, mocking the Foundry API for fast iteration, and testing with pytest before pushing to Foundry.
Prerequisites
- Completed
palantir-install-auth setup
- Python 3.9+ with pip
- A Foundry Code Repository cloned locally (or a standalone project)
Instructions
Step 1: Project Structure
my-foundry-project/
├── src/myproject/
│ ├── __init__.py
│ ├── pipeline.py # @transform functions
│ └── utils.py # Shared logic
├── tests/
│ ├── conftest.py # Fixtures with sample DataFrames
│ ├── test_pipeline.py # Transform unit tests
│ └── sample_data/ # CSV/Parquet test fixtures
├── .env # FOUNDRY_HOSTNAME, FOUNDRY_TOKEN
├── requirements.txt # foundry-platform-sdk, pytest, pyspark
└── pyproject.toml
Step 2: Install Local Dependencies
set -euo pipefail
pip install foundry-platform-sdk pyspark pytest pandas
python -c "import foundry; import pyspark; print('Dependencies ready')"
Step 3: Test Transforms Locally with PySpark
import pytest
from pyspark.sql import SparkSession
@pytest.fixture(scope="session")
def spark():
return SparkSession.builder.master("local[2]").appName("test").getOrCreate()
@pytest.fixture
def sample_orders(spark):
data = [
("ORD-001", "alice@company.com", "2026-03-01", 99.99),
("ORD-002", "bob@test.com", "2026-03-02", 49.99),
(, , , ),
]
spark.createDataFrame(data, [, , , ])