> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# UserContentStorageConfig

> atoti\_jdbc.UserContentStorageConfig(\
>
>     *url*: Annotated\[[str](https://docs.python.org/3/builtins/stdtypes.html#str), AfterValidator(normalize\_jdbc\_url)],\
>
>     \*,\
>
>     *driver*: Annotated\[[str](https://docs.python.org/3/builtins/stdtypes.html#str) | [None](https://docs.python.org/3/builtins/constants.html#None), AfterValidator(\_validate\_driver)] = `None`,\
>
>     *hibernate\_options*: FrozenMapping\[[str](https://docs.python.org/3/builtins/stdtypes.html#str), [str](https://docs.python.org/3/builtins/stdtypes.html#str)] = `frozendict({})`,\
>
>     *prefix*: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [None](https://docs.python.org/3/builtins/constants.html#None) = `None`,\
>
>     *database\_locks*: [DatabaseLocksConfig](https://docs.activeviam.com/engine/python-sdk/6.2/api/atoti_jdbc.DatabaseLocksConfig.md#atoti_jdbc.DatabaseLocksConfig) | [None](https://docs.python.org/3/builtins/constants.html#None) = `None`,\
>
> )

The config for storing user content in a separate database.

```pycon theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
>>> from atoti_jdbc import UserContentStorageConfig
>>> config = UserContentStorageConfig(
...     "h2:/home/user/database/file/path;USER=username;PASSWORD=passwd"
... )
```

### Attributes

#### *hibernate\_options*

Extra options to pass to Hibernate.

See [AvailableSettings](https://javadoc.io/static/org.hibernate/hibernate-core/5.6.15.Final/org/hibernate/cfg/AvailableSettings.html).

#### *driver*

The Java class name of the [`driver`](./atoti_jdbc.driver#module-atoti_jdbc.driver) to use.

This defines Hibernate’s [DRIVER](https://javadoc.io/static/org.hibernate/hibernate-core/5.6.15.Final/org/hibernate/cfg/AvailableSettings.html#DRIVER) option.

Inferred from [`url`](#atoti_jdbc.UserContentStorageConfig.url) if `None`.

#### *prefix*

The prefix to add to all paths when reading and writing files and directories.

This allows sharing the same database in multiple Atoti applications without conflicts.

#### *url*

The JDBC connection string of the database.

The `"jdbc"` scheme is optional but the database specific scheme (such as `"h2"`) is mandatory.
For instance:

* `"h2:/home/user/database/file/path;USER=username;PASSWORD=passwd"`
* `"postgresql://postgresql.db.server:5430/example?user=username&password=passwd"`

More examples can be found [here](https://www.baeldung.com/java-jdbc-url-format).

This defines Hibernate’s [URL](https://javadoc.io/static/org.hibernate/hibernate-core/5.6.15.Final/org/hibernate/cfg/AvailableSettings.html#URL) option.

#### *database\_locks*

The config of the database level locks.

> [!NOTE]
>
> Added in version 6.2.2.
