> You are reading the Docusign Developer Documentation. For clean Markdown of any page, append .md to the page URL.
>
> Documentation indexes by section:
> - APIs and SDKs: https://docusign.docs.buildwithfern.com/docs/llms.txt
> - Platform 101: https://docusign.docs.buildwithfern.com/platform/llms.txt
> - Extension Apps: https://docusign.docs.buildwithfern.com/extension-apps/llms.txt
> - Docusign CLI: https://docusign.docs.buildwithfern.com/docusign-cli/llms.txt
>
> Authentication (OAuth, JWT Grant, M2M): https://docusign.docs.buildwithfern.com/platform/auth
> Webhooks and Connect: https://docusign.docs.buildwithfern.com/platform/webhooks
>
> OpenAPI specifications: https://docusign.docs.buildwithfern.com/openapi.json
> MCP server: https://docusign.docs.buildwithfern.com/_mcp/server

# Accessing the Python SDK object model

> **Note**
>
> Learn about [Quickstart](/docs/esign-rest-api/quickstart) and how you can use it to quickly set up and run eSignature REST API code examples.

## Instantiating the models

When making a specific eSignature REST API call using the Python SDK, you usually have to import a specific class used for the data sent or returned as part of that API request. The Python classes used to pass data to and from API endpoints are called models. We will use the
`Brand` object as an example. The
[Brand class](https://github.com/docusign/docusign-python-client/blob/master/docusign_esign/models/brand.py) can be found in our open-source GitHub repository.

Each class in the Python SDK defines its properties using the
`@property` decorator.
`brand_name` is an example of a property of the
`Brand` class. To set the
`brand_name` property of a
`Brand` object, use this code:

```text
    brand.brand_name = "my brand"
```

To get the value of the
`brand_name` property, you can simply use the string that it returns like this:

```text
    print("The brand name is" + brand.brand_name)
```

Most Python models also provide a constructor that enables developers to initialize many of the object’s properties at the same time that it is created. For example, you can instantiate a new
`Brand` object and set some of its properties at the same time, like this:

```text
    brand = Brand(
        brand_name="My Brand",
        default_brand_language="en",
        colors=myBrandColors
    )
```

## Making API calls

To construct an API call, you need to include both the model and the
`account_id` of the account making the API call each time you make a request. That information is not part of the
`ApiClient` object, but is required by the SDK to be able to generate the URL for the specific endpoint.

For example, to create a new brand, you would instantiate a
`Brand` object and populate it with initial values as shown above, then use it along with the
`account_id` to call the API, as shown below.

```text
    response = account_api.create_brand(account_id=account_id, brand=brand)
```

## Naming conventions

The Python SDK uses the naming conventions in the
[Style Guide for Python Code](https://www.python.org/dev/peps/pep-0008/). All class names use PascalCase while methods and properties of those classes use snake_case.

* The categories in the API reference are
  `apis` in the Python SDK and can be found in the
  [docusign_esign.apis](https://github.com/docusign/docusign-python-client/tree/master/docusign_esign/apis) namespace. As an example, the
  [AccountsApi](https://github.com/docusign/docusign-python-client/blob/master/docusign_esign/apis/accounts_api.py#L27) class would be the class you use to make API calls for endpoints in the
  [Accounts Category](/docs/esign-rest-api/reference/accounts) in the API Reference.

* The resources within each category in the API Reference do not have direct counterparts in the Python SDK. Instead, each API method in each resource corresponds to a Python method within the class corresponding to the top-level category. The method name is always snake_case and is a combination of the verb and the object that is being worked on. For example, for the
  [AccountBrands: update](/docs/esign-rest-api/reference/accounts/accountbrands/update) API method, the Python method within the
  `AccountsApi` class is named
  [update_brand](https://github.com/docusign/docusign-python-client/blob/master/docusign_esign/apis/accounts_api.py#L6278).

* The parameters for each API method are based on the API reference. Every API call has to specify the
  `account_id` as its first parameter, required to determine which account is making the API request. The remaining parameters are defined per API call in the documentation and may include optional parameters. Parameter names are always written in snake_case.

* The request and response objects (if they exist; some methods have one or the other) are all defined as objects in the
  [docusign_esign.models](https://github.com/docusign/docusign-python-client/tree/master/docusign_esign/models) namespace as public classes. These classes are a deserialized version of the JSON that is sent by the REST API. For example, the
  [update_brand](https://github.com/docusign/docusign-python-client/blob/master/docusign_esign/apis/accounts_api.py#L6278) method returns an object called
  [Brand](https://github.com/docusign/docusign-python-client/blob/master/docusign_esign/models/brand.py), which represents the response of the API call. Models do not include any methods; they only include properties (all written in snake_case) that have getters and setters. For any array returned by the JSON, the model would include a dictionary called
  `attribute_map` with elements corresponding to that information.