palantir-sdk-patterns

Featured

Apply production-ready Palantir Foundry SDK patterns for Python and TypeScript. Use when implementing Foundry integrations, refactoring SDK usage, or establishing team coding standards for Foundry API calls. Trigger with phrases like "palantir SDK patterns", "foundry best practices", "palantir code patterns", "idiomatic foundry SDK".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Palantir SDK Patterns ## Overview Production-ready patterns for Foundry Platform SDK and OSDK usage. Covers client singletons, typed error handling, pagination helpers, retry logic, and multi-tenant client factories. ## Prerequisites - Completed `palantir-install-auth` setup - Familiarity with async/await patterns - `foundry-platform-sdk` or `@osdk/client` installed ## Instructions ### Step 1: Singleton Client (Python) ```python # src/foundry_client.py import os import foundry from functools import lru_cache @lru_cache(maxsize=1) def get_client() -> foundry.FoundryClient: """Thread-safe singleton — cached after first call.""" auth = foundry.ConfidentialClientAuth( client_id=os.environ["FOUNDRY_CLIENT_ID"], client_secret=os.environ["FOUNDRY_CLIENT_SECRET"], hostname=os.environ["FOUNDRY_HOSTNAME"], scopes=["api:read-data", "api:write-data"], ) auth.sign_in_as_service_user() return foundry.FoundryClient(auth=auth, hostname=os.environ["FOUNDRY_HOSTNAME"]) ``` ### Step 2: Typed Error Handling ```python import foundry from dataclasses import dataclass from typing import TypeVar, Generic, Optional T = TypeVar("T") @dataclass class Result(Generic[T]): data: Optional[T] = None error: Optional[str] = None status_code: Optional[int] = None def safe_call(fn, *args, **kwargs) -> Result: """Wrap any Foundry SDK call with structured error handling.""" try: return Result(data=fn(*args, **kwargs)) e...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

elevenlabs-sdk-patterns

Apply production-ready ElevenLabs SDK patterns for TypeScript and Python. Use when implementing ElevenLabs integrations, refactoring SDK usage, or establishing team coding standards for audio AI applications. Trigger: "elevenlabs SDK patterns", "elevenlabs best practices", "elevenlabs code patterns", "idiomatic elevenlabs", "elevenlabs typescript".

2,266 Updated today
jeremylongshore
AI & Automation Solid

webflow-sdk-patterns

Apply production-ready Webflow SDK patterns — singleton client, typed error handling, pagination helpers, and raw response access for the webflow-api package. Use when implementing Webflow integrations, refactoring SDK usage, or establishing team coding standards. Trigger with phrases like "webflow SDK patterns", "webflow best practices", "webflow code patterns", "idiomatic webflow", "webflow typescript".

2,266 Updated today
jeremylongshore
AI & Automation Featured

palantir-common-errors

Diagnose and fix Palantir Foundry common errors and API exceptions. Use when encountering Foundry errors, debugging failed API calls, or troubleshooting transform build failures. Trigger with phrases like "palantir error", "fix palantir", "foundry not working", "debug foundry", "palantir 401 403".

2,266 Updated today
jeremylongshore
AI & Automation Featured

apollo-sdk-patterns

Apply production-ready Apollo.io SDK patterns. Use when implementing Apollo integrations, refactoring API usage, or establishing team coding standards. Trigger with phrases like "apollo sdk patterns", "apollo best practices", "apollo code patterns", "idiomatic apollo", "apollo client wrapper".

2,266 Updated today
jeremylongshore
AI & Automation Featured

palantir-install-auth

Install and configure Palantir Foundry SDK authentication with OAuth2 or token auth. Use when setting up a new Foundry integration, configuring API credentials, or initializing the foundry-platform-sdk in your project. Trigger with phrases like "install palantir", "setup palantir", "palantir auth", "configure palantir API key", "foundry SDK setup".

2,266 Updated today
jeremylongshore