# \#python-functions

**URL:** https://community.palantir.com/tag/python-functions/96.md

[Latest](https://community.palantir.com/latest.md) · [Categories](https://community.palantir.com/categories.md) · [Tags](https://community.palantir.com/tags.md)

---

## [How to Run a Streamlit Application in Palantir Foundry?](https://community.palantir.com/t/how-to-run-a-streamlit-application-in-palantir-foundry/2661)

<div class="topic-metadata">

**Author:** [@ashesh](https://community.palantir.com/u/ashesh)\
**Replies:** 2\
**Last updated:** [January 28, 2025, 12:39pm UTC](https://community.palantir.com/t/how-to-run-a-streamlit-application-in-palantir-foundry/2661 "2025-01-28T12:39:08Z")

</div>

I have written a code in streamlit, what process should i follow to run it in foundry ? Could anyone guide me through the steps ?

---

## [Remove Palantir license file in Python Functions repositories](https://community.palantir.com/t/remove-palantir-license-file-in-python-functions-repositories/4701)

<div class="topic-metadata">

**Author:** [@pwest-northslope](https://community.palantir.com/u/pwest-northslope)\
**Replies:** 1\
**Last updated:** [August 7, 2025, 2:38pm UTC](https://community.palantir.com/t/remove-palantir-license-file-in-python-functions-repositories/4701 "2025-08-07T14:38:46Z")

</div>

Python Functions repositories are generated with a python-functions/python/LICENSE.txt file which starts with COPYRIGHT (c) 2023 PALANTIR TECHNOLOGIES INC. If this file is deleted, CI fails; apparently CI requires the L…

---

## [Workflow Builder Support for Python Functions](https://community.palantir.com/t/workflow-builder-support-for-python-functions/4692)

<div class="topic-metadata">

**Author:** [@Flackermann](https://community.palantir.com/u/Flackermann)\
**Replies:** 4\
**Last updated:** [August 5, 2025, 8:55pm UTC](https://community.palantir.com/t/workflow-builder-support-for-python-functions/4692 "2025-08-05T20:55:50Z")

</div>

Since Python functions are now generally available, I was wondering when we can expect them to be supported in the Workflow Builder for tracking and updating in the respective applications.

---

## [Reading a file from UDF](https://community.palantir.com/t/reading-a-file-from-udf/4069)

<div class="topic-metadata">

**Author:** [@amaroli](https://community.palantir.com/u/amaroli)\
**Replies:** 0\
**Last updated:** [June 2, 2025, 10:41pm UTC](https://community.palantir.com/t/reading-a-file-from-udf/4069 "2025-06-02T22:41:05Z")

</div>

I am trying to read a file (sample.json) that is at the same location as python code. Code below works with a compute module, but it does not seem to work with in a UDF. with open("./client/queries/sample.json", "r") a…

---

## [How to execute stateful Python functions?](https://community.palantir.com/t/how-to-execute-stateful-python-functions/6574)

<div class="topic-metadata">

**Author:** [@VincentF](https://community.palantir.com/u/VincentF)\
**Replies:** 1\
**Last updated:** [May 12, 2026, 6:41pm UTC](https://community.palantir.com/t/how-to-execute-stateful-python-functions/6574 "2026-05-12T18:41:17Z")

</div>

I want to execute stateful functions. For example, that could share a common cache or counter, between runs. For instance, it could only query the ontology once, keep a temporary cache, and serve a few calls before refr…

---

## [Python packages with native C++ bindings crash in published Functions (work in preview)](https://community.palantir.com/t/python-packages-with-native-c-bindings-crash-in-published-functions-work-in-preview/6359)

<div class="topic-metadata">

**Author:** [@bretfrederick-pvmit](https://community.palantir.com/u/bretfrederick-pvmit)\
**Replies:** 1\
**Last updated:** [April 9, 2026, 10:00pm UTC](https://community.palantir.com/t/python-packages-with-native-c-bindings-crash-in-published-functions-work-in-preview/6359 "2026-04-09T22:00:21Z")

</div>

Python Function with OR-Tools CP-SAT works in live preview but consistently fails when called from a Workshop function-backed variable I have a Python Function that uses Google’s OR-Tools CP-SAT solver to optimize assig…

---

## [Function-backed action type in Workshop Scenarios on global branch](https://community.palantir.com/t/function-backed-action-type-in-workshop-scenarios-on-global-branch/6373)

<div class="topic-metadata">

**Author:** [@bretfrederick-pvmit](https://community.palantir.com/u/bretfrederick-pvmit)\
**Replies:** 1\
**Last updated:** [April 13, 2026, 11:33am UTC](https://community.palantir.com/t/function-backed-action-type-in-workshop-scenarios-on-global-branch/6373 "2026-04-13T11:33:04Z")

</div>

Problem: Function-backed action type cannot be used in Workshop scenario on a global branch Environment: Code Repository: Master branch (Python Functions) Ontology/Workshop: Global branch Error Message: Error …

---

## [Batched Action Execution in Python](https://community.palantir.com/t/batched-action-execution-in-python/6308)

<div class="topic-metadata">

**Author:** [@andre.barros](https://community.palantir.com/u/andre.barros)\
**Replies:** 0\
**Last updated:** [April 2, 2026, 2:45pm UTC](https://community.palantir.com/t/batched-action-execution-in-python/6308 "2026-04-02T14:45:20Z")

</div>

I’m trying to create a function that leverages the batch execution capabilities provided by actions. I noticed in the documentation that there is only one example provided, and it’s in TypeScript. I attempted to implemen…

---

## [Batched Execution in Python](https://community.palantir.com/t/batched-execution-in-python/6267)

<div class="topic-metadata">

**Author:** [@ggsmith842](https://community.palantir.com/u/ggsmith842)\
**Replies:** 7\
**Last updated:** [March 31, 2026, 10:36am UTC](https://community.palantir.com/t/batched-execution-in-python/6267 "2026-03-31T10:36:17Z")

</div>

I can’t find any clear references in the documentation, but does Python support batch execution for an ontology action? I ran into an issue where the user needs to upload a csv file to an object. Using the standard crea…

---

## [Run a Python function in multiple ontologies](https://community.palantir.com/t/run-a-python-function-in-multiple-ontologies/6236)

<div class="topic-metadata">

**Author:** [@andre.barros](https://community.palantir.com/u/andre.barros)\
**Replies:** 0\
**Last updated:** [March 23, 2026, 3:54pm UTC](https://community.palantir.com/t/run-a-python-function-in-multiple-ontologies/6236 "2026-03-23T15:54:28Z")

</div>

Hi folks, I have a python function from the code repository and I want to use the same function in multiple ontologies, that is, I want to reuse my function. I read in the documentation that interface is not possible in …

---

## [Polars / DuckDB - read and write column descriptions](https://community.palantir.com/t/polars-duckdb-read-and-write-column-descriptions/1975)

<div class="topic-metadata">

**Author:** [@ZygD](https://community.palantir.com/u/ZygD)\
**Replies:** 1\
**Last updated:** [May 6, 2025, 11:15am UTC](https://community.palantir.com/t/polars-duckdb-read-and-write-column-descriptions/1975 "2025-05-06T11:15:50Z")

</div>

We always use column descriptions. We read them from input datasets and write them to the output. In Python repositories, when using Spark, Below I provide our currently used functions for reading and writing the column…

---

## [Can we run export files from an Ontology Function?](https://community.palantir.com/t/can-we-run-export-files-from-an-ontology-function/5947)

<div class="topic-metadata">

**Author:** [@rp23678](https://community.palantir.com/u/rp23678)\
**Replies:** 3\
**Last updated:** [February 5, 2026, 11:03pm UTC](https://community.palantir.com/t/can-we-run-export-files-from-an-ontology-function/5947 "2026-02-05T23:03:27Z")

</div>

Can we currently run an export sync of a file from an ontology function? source - Google Cloud Storage source. function - python function.

---

## [Get pytest results in checks for Python Function repos](https://community.palantir.com/t/get-pytest-results-in-checks-for-python-function-repos/5948)

<div class="topic-metadata">

**Author:** [@coffee-operator](https://community.palantir.com/u/coffee-operator)\
**Replies:** 0\
**Last updated:** [February 3, 2026, 12:58am UTC](https://community.palantir.com/t/get-pytest-results-in-checks-for-python-function-repos/5948 "2026-02-03T00:58:57Z")

</div>

In a python function code repo I want to run tests via pytest upon every commit as part of ci/cd checks. Once the result have ran, I want to see them in the checks for that commit. I’ve set enablePytest = True in gradle…

---

## [SSL validation failed](https://community.palantir.com/t/ssl-validation-failed/1734)

<div class="topic-metadata">

**Author:** [@dakd03](https://community.palantir.com/u/dakd03)\
**Replies:** 1\
**Last updated:** [November 14, 2024, 11:15am UTC](https://community.palantir.com/t/ssl-validation-failed/1734 "2024-11-14T11:15:26Z")

</div>

I am using the boto3 api to retrieve data from Foundry using the s3-compatible API. I am using this code session = boto3.session.Session() client = session.client(service\_name='sts', endpoint\_url=endpoint) However, I …

---

## [Python Function fails with Source](https://community.palantir.com/t/python-function-fails-with-source/5818)

<div class="topic-metadata">

**Author:** [@tb123](https://community.palantir.com/u/tb123)\
**Replies:** 1\
**Last updated:** [January 11, 2026, 8:05pm UTC](https://community.palantir.com/t/python-function-fails-with-source/5818 "2026-01-11T20:05:24Z")

</div>

Hi, I’m building a Python Function in Foundry that is intended to be triggered via an Ontology Action. The function makes an outbound HTTP request to an external service (Cloudflare Worker) and needs to read an API key…

---

## [Function backed data for Vega only supported via Typescript (not Python)](https://community.palantir.com/t/function-backed-data-for-vega-only-supported-via-typescript-not-python/5713)

<div class="topic-metadata">

**Author:** [@robind](https://community.palantir.com/u/robind)\
**Replies:** 1\
**Last updated:** [December 19, 2025, 5:24pm UTC](https://community.palantir.com/t/function-backed-data-for-vega-only-supported-via-typescript-not-python/5713 "2025-12-19T17:24:14Z")

</div>

Are function-backed data inputs for Vega plots only supported via Typescript functions? I tried using python, but the function is not being recognised. AIP Assist says only Typescript functions will work, just checking…

---

## [What scope is shared in between function executions in a Deployed TSv2 function](https://community.palantir.com/t/what-scope-is-shared-in-between-function-executions-in-a-deployed-tsv2-function/5657)

<div class="topic-metadata">

**Author:** [@Bougs](https://community.palantir.com/u/Bougs)\
**Replies:** 0\
**Last updated:** [December 10, 2025, 1:48am UTC](https://community.palantir.com/t/what-scope-is-shared-in-between-function-executions-in-a-deployed-tsv2-function/5657 "2025-12-10T01:48:41Z")

</div>

This is a follow up to my previous question on shared scopes: Are static class properties shared across concurrent function invocations in Foundry Functions? In the official docs, Deploy functions, there is this line: …

---

## [VS Code for Python Functions](https://community.palantir.com/t/vs-code-for-python-functions/5614)

<div class="topic-metadata">

**Author:** [@Flackermann](https://community.palantir.com/u/Flackermann)\
**Replies:** 1\
**Last updated:** [December 5, 2025, 3:49pm UTC](https://community.palantir.com/t/vs-code-for-python-functions/5614 "2025-12-05T15:49:49Z")

</div>

I wondered if there is already an ETA for python functions in VSCode. I am running into a lot of trouble trying to debug the test environment in my code repository since there is no output for the test environment and lo…

---

## [Filtering object sets in a Python function](https://community.palantir.com/t/filtering-object-sets-in-a-python-function/1587)

<div class="topic-metadata">

**Author:** [@meehirbhalla](https://community.palantir.com/u/meehirbhalla)\
**Replies:** 1\
**Last updated:** [October 20, 2024, 10:38pm UTC](https://community.palantir.com/t/filtering-object-sets-in-a-python-function/1587 "2024-10-20T22:38:44Z")

</div>

I have an object in my ontology (obj\_foo) that i want to filter. I have an array all\_ui and want to check if the object property foo\_array contains any value in the array all\_ui. then, i want to apply all\_filters to obj\_…

---

## [Download PDF using function backed export](https://community.palantir.com/t/download-pdf-using-function-backed-export/4966)

<div class="topic-metadata">

**Author:** [@mvsanjeeth](https://community.palantir.com/u/mvsanjeeth)\
**Replies:** 5\
**Last updated:** [November 4, 2025, 7:50pm UTC](https://community.palantir.com/t/download-pdf-using-function-backed-export/4966 "2025-11-04T19:50:15Z")

</div>

I am writing a python function to generate a PDF file which I want to download from a Worshop app. In the button configuration I use function backed export for this and I see the option to export PDF there. However, when…

---

## [Aggregation in v2 functions - includesNulls parameter](https://community.palantir.com/t/aggregation-in-v2-functions-includesnulls-parameter/5336)

<div class="topic-metadata">

**Author:** [@VincentF](https://community.palantir.com/u/VincentF)\
**Replies:** 0\
**Last updated:** [October 28, 2025, 1:25pm UTC](https://community.palantir.com/t/aggregation-in-v2-functions-includesnulls-parameter/5336 "2025-10-28T13:25:51Z")

</div>

I’m using python function in a Code repository, to query and execute aggregation on my Ontology. When I’m aggregating on a property, the default behavior is for nulls to be excluded from the aggregation. The documentat…

---

## [How to cut out frames from a video](https://community.palantir.com/t/how-to-cut-out-frames-from-a-video/1433)

<div class="topic-metadata">

**Author:** [@kazu](https://community.palantir.com/u/kazu)\
**Replies:** 0\
**Last updated:** [October 3, 2024, 8:29am UTC](https://community.palantir.com/t/how-to-cut-out-frames-from-a-video/1433 "2024-10-03T08:29:46Z")

</div>

We would like to discuss about cutting out specific frames from a MediaSet video (mp4). I am currently trying to implement a function that “when a user presses a button in the Workshop, the current frame is extracted fr…

---

## [Use External Video Embedding Model in a Pipeline?](https://community.palantir.com/t/use-external-video-embedding-model-in-a-pipeline/5229)

<div class="topic-metadata">

**Author:** [@3f4d10ccfc49ecdec193](https://community.palantir.com/u/3f4d10ccfc49ecdec193)\
**Replies:** 0\
**Last updated:** [October 12, 2025, 5:17pm UTC](https://community.palantir.com/t/use-external-video-embedding-model-in-a-pipeline/5229 "2025-10-12T17:17:37Z")

</div>

Hi all, I am trying to process video data and I would like to go from my video data in a media set to a dataset of video vector embeddings. What is the simplest way to integrate this external embedding model into a data…

---

## [AIP Logic as query in Python code repo](https://community.palantir.com/t/aip-logic-as-query-in-python-code-repo/5087)

<div class="topic-metadata">

**Author:** [@rebeccanhan](https://community.palantir.com/u/rebeccanhan)\
**Replies:** 1\
**Last updated:** [September 25, 2025, 5:19pm UTC](https://community.palantir.com/t/aip-logic-as-query-in-python-code-repo/5087 "2025-09-25T17:19:09Z")

</div>

I’m using a published AIP Logic as a query function in Python code repo client = FoundryClient() client.ontology.queries.query\_function\_call() In the past, when I’ve saved and republished my AIP Logic, the version in t…

---

## [Multi-type object sets in Functions](https://community.palantir.com/t/multi-type-object-sets-in-functions/5071)

<div class="topic-metadata">

**Author:** [@jpa](https://community.palantir.com/u/jpa)\
**Replies:** 1\
**Last updated:** [September 19, 2025, 12:26am UTC](https://community.palantir.com/t/multi-type-object-sets-in-functions/5071 "2025-09-19T00:26:35Z")

</div>

In workshop, we can use multi type object views to get multi type object sets. I have a workflow where I need custom logic to go through all of this in a function (python / typescript / etc). How can I pass in and proce…

---

## [Curious: seemingly useless OSDK python function](https://community.palantir.com/t/curious-seemingly-useless-osdk-python-function/5069)

<div class="topic-metadata">

**Author:** [@jpa](https://community.palantir.com/u/jpa)\
**Replies:** 2\
**Last updated:** [September 18, 2025, 8:15pm UTC](https://community.palantir.com/t/curious-seemingly-useless-osdk-python-function/5069 "2025-09-18T20:15:11Z")

</div>

Saw this in a Python OSDK recently and it’s in all my object types. Confusing with both self.primary\_key() and self.get\_primary\_key() which begs the question, what exactly is the former for? I can’t really fathom a use …

---

## [Permissions Error when calling AIP agent as a function within Workshop App](https://community.palantir.com/t/permissions-error-when-calling-aip-agent-as-a-function-within-workshop-app/5041)

<div class="topic-metadata">

**Author:** [@cdylpp](https://community.palantir.com/u/cdylpp)\
**Replies:** 3\
**Last updated:** [September 16, 2025, 2:00pm UTC](https://community.palantir.com/t/permissions-error-when-calling-aip-agent-as-a-function-within-workshop-app/5041 "2025-09-16T14:00:47Z")

</div>

I am attempting to call an AIP agent as a Function from a Workshop app. I exposed a function called query\_sumi that looks like @function def query\_sumi(query: str) -\> str: with AllowBetaFeatures(): client =…

---

## [Advanced Tips for Developing and Debugging Python Functions in Ontology](https://community.palantir.com/t/advanced-tips-for-developing-and-debugging-python-functions-in-ontology/5040)

<div class="topic-metadata">

**Author:** [@snikolic](https://community.palantir.com/u/snikolic)\
**Replies:** 0\
**Last updated:** [September 15, 2025, 9:02am UTC](https://community.palantir.com/t/advanced-tips-for-developing-and-debugging-python-functions-in-ontology/5040 "2025-09-15T09:02:22Z")

</div>

Hi everyone, I’m really impressed by the power of Ontology functions — they’ve been a game-changer for how we set up and run our workflows. That said, once my functions get more complex, I often find debugging to be a c…

---

## [Spam auto remote lockfile updates break build: Code Repos](https://community.palantir.com/t/spam-auto-remote-lockfile-updates-break-build-code-repos/4982)

<div class="topic-metadata">

**Author:** [@jpa](https://community.palantir.com/u/jpa)\
**Replies:** 2\
**Last updated:** [September 8, 2025, 2:03pm UTC](https://community.palantir.com/t/spam-auto-remote-lockfile-updates-break-build-code-repos/4982 "2025-09-08T14:03:25Z")

</div>

Literally every 5 seconds I get this message. This requires me to resolve merge conflicts on autogenerated lockfiles which is not useful as I don’t know what’s going on there. It repeatedly breaks all my builds. Ple…

---

## [Issues in OSDK? pydantic.ValidationError when using timeseries\_property.to\_pandas() in Python Functions](https://community.palantir.com/t/issues-in-osdk-pydantic-validationerror-when-using-timeseries-property-to-pandas-in-python-functions/4893)

<div class="topic-metadata">

**Author:** [@JaesungPark](https://community.palantir.com/u/JaesungPark)\
**Replies:** 1\
**Last updated:** [August 29, 2025, 11:29pm UTC](https://community.palantir.com/t/issues-in-osdk-pydantic-validationerror-when-using-timeseries-property-to-pandas-in-python-functions/4893 "2025-08-29T23:29:39Z")

</div>

Language : Python Generator Version : 2.107.0 Hi, I’m writing a Python function that deals with the TimeSeries property of an Ontology object. I’ve confirmed that the generated OSDK properly maps a TimeSeries class to…

[Next page](https://community.palantir.com/tag/python-functions/96.md?match_all_tags=true&page=1&tags%5B%5D=python-functions)
