> For the complete documentation index, see [llms.txt](https://calctree.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://calctree.gitbook.io/docs/calculations/creating-calculations/python/consuming-files.md).

# Consuming files

Create Python-powered calculations

You can upload any file type to a CalcTree page and access it directly within your Python script. This is useful for referencing input datasets such as CSVs, DXF files, or configuration files.

### Uploading Files (Learn more [here](/docs/integrations/csv-files.md))

To upload a file:

1. Open the right-hand panel on your CalcTree page
2. Click on the Files Tab
3. Click on **'+'**
4. Select your file
5. Once uploaded, the file will appear in the Files Tab

<figure><img src="https://94933883-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS1yC9mBIPsA0bB8PMGaq%2Fuploads%2FmcJ3H0aNd8Wt4UEAYfG7%2FScreenshot%202025-10-15%20at%203.13.46%E2%80%AFPM.png?alt=media&amp;token=9d4d188d-bd17-41ac-99ea-962baa0c5d44" alt=""><figcaption></figcaption></figure>

### Accessing Files in Python

Uploaded files are accessible through the `ct.page_files` dictionary using the file name as the key. For example:

```python
import pandas as pd

# Load a CSV file uploaded to the page
df = pd.read_csv(ct.page_files['my_input_data.csv'])
```

This pattern works for any file type compatible with your chosen Python libraries.

### Use Cases

* Load tabular data using `pandas.read_csv()`
* Import geometric or CAD files (e.g. `.dxf`) using domain-specific libraries
* Use in conjunction with [plugins](/docs/integrations/3rd-party-plugins.md) to automate processing of data files from ETABS etc. into reports in CalcTree

### Notes&#x20;

* File names must match exactly (including extension)
* Uploaded files are only available within the page they are uploaded to
* Large files may increase processing time

{% hint style="success" %}
For file upload instructions, refer to our [CSV File Upload Guide](/docs/integrations/csv-files.md). To see this in practice, check our [template](https://www.calctree.com/templates) examples.
{% endhint %}
