> ## 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.

# How to expose an Atoti application to Atoti Python SDK

In this guide, we will perform all the necessary changes to expose a custom Atoti application as a backend for Atoti Python SDK.<br />
At the end of this guide, you will be able to connect to your application from Atoti Python SDK.

In this guide, we assume the project is using Maven and Spring Boot configured with a file *application.yml*.

<Danger>
  Atoti Python SDK is a complete SDK to configure an Atoti application. As such, it must be considered like an open door to the application as much as any system allowing to run Java code on the server. Thus, **it is not recommended to expose such a feature in a production environment**.<br />
  See this [document](../atoti_server_application_starter#considerations) for more information.
</Danger>

## 1. Add the starter to your project

The very first step to expose your project is to add a dependency to the [Atoti Server Application Starter](../atoti_server_application_starter).

```xml theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
<dependency>
    <groupId>com.activeviam.springboot</groupId>
    <artifactId>atoti-server-application-starter</artifactId>
    <version>${project.version}</version>
</dependency>
```

## 2. Define a technical user

In addition to the Py4j socket, Atoti Python SDK uses some HTTP calls - REST and GraphQL - to interact with the Atoti application. These calls are authenticated with a JWT, retrieved through the Py4J socket.<br />
This user must be granted with the roles `ROLE_ADMIN` and `ROLE_USER` to perform all the necessary operations.

In the *application.yml* file, we add the following line, to point to an existing user with such roles.

```yaml theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
# In this example, admin is the existing user with the required roles
atoti.server.application.technical-user.name: "admin"
```

## 3. Re-export the GraphQL schema

Finally, while Atoti Server Application Starter ships all the necessary resources, we still need to
manually re-export the GraphQL schema to the client in Atoti Python SDK.

```yaml theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
spring:
  graphql:
    schema:
      locations: "classpath*:graphql/**/"
```

## Play with your application

After this point, it is possible to start a Python notebook or script and connect to your application.<br />
To know how to set up Atoti Python SDK to use your application, head to \{@doc: "Atoti Python SDK|python://"}.
