---
title: conf
description: "SparkSession.conf property in PySpark: Runtime configuration interface for Spark."
canonical_url: https://docs.databricks.com/gcp/en/pyspark/reference/classes/sparksession/conf
---

# conf

Runtime configuration interface for Spark.

This is the interface through which the user can get and set all Spark and Hadoop configurations relevant to Spark SQL. When getting the value of a config, this defaults to the value set in the underlying `SparkContext`, if any.

## Syntax

```
conf
```

## Returns

`pyspark.sql.conf.RuntimeConfig`

## Examples

```python
spark.conf

# Set a runtime configuration for the session.
spark.conf.set("key", "value")
spark.conf.get("key")
# 'value'
```
