palantir-hello-world

Featured

Create a minimal working Palantir Foundry example querying Ontology objects. Use when starting a new Foundry integration, testing your setup, or learning basic Foundry API and Ontology patterns. Trigger with phrases like "palantir hello world", "palantir example", "palantir quick start", "foundry first query".

AI & Automation 2,926 stars 433 forks Updated yesterday 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 Hello World ## Overview Build a minimal working example that connects to Palantir Foundry, queries Ontology objects via the REST API, reads a dataset, and applies an action. Uses real `foundry-platform-sdk` Python API calls. ## Prerequisites - Completed `palantir-install-auth` setup - Valid bearer token or OAuth2 credentials - At least one Ontology with object types configured in your Foundry enrollment ## Instructions ### Step 1: List Available Ontologies ```python import os import foundry client = foundry.FoundryClient( auth=foundry.UserTokenAuth( hostname=os.environ["FOUNDRY_HOSTNAME"], token=os.environ["FOUNDRY_TOKEN"], ), hostname=os.environ["FOUNDRY_HOSTNAME"], ) # List all ontologies you have access to for ont in client.ontologies.Ontology.list(): print(f"Ontology: {ont.api_name} RID: {ont.rid}") ``` ### Step 2: Query Ontology Objects ```python # List objects of type "Employee" from the default ontology # The object type api_name comes from your Ontology configuration ONTOLOGY = "your-ontology-api-name" OBJECT_TYPE = "Employee" objects = client.ontologies.OntologyObject.list( ontology=ONTOLOGY, object_type=OBJECT_TYPE, page_size=5, ) for obj in objects.data: props = obj.properties print(f" {props.get('fullName', 'N/A')} — {props.get('department', 'N/A')}") ``` ### Step 3: Get a Single Object by Primary Key ```python employee = client.ontologies.OntologyObject.get( ontology=ONTOLOGY, obje...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category