Python SDK

Install and start using the Python SDK.

Intro

The Docusign eSignature REST API SDK provides access to the Docusign eSignature REST API REST APIs.

The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign.

Installation

Add the SDK to your project from its folder, with whichever package manager your project uses. Give each tool a path containing a slash, such as ../docusign-e-signature-rest-api — a bare folder name is looked up on PyPI instead, and resolves to whatever project holds that name there:

Terminal
pip install <path-to-sdk>
Terminal
uv add <path-to-sdk>
Terminal
poetry add <path-to-sdk>

Quick Start

Synchronous client

Construct DocusignESignatureRestApiClient with keyword arguments, and call close() when you are done. Every argument is optional.

Python
from docusign_e_signature_rest_api import DocusignESignatureRestApiClient

client = DocusignESignatureRestApiClient(o_auth2="YOUR_BEARER_TOKEN", environment="production")

client.close()

Alternatively, scope it — with DocusignESignatureRestApiClient(...) as client: closes the pool on exit.

Asynchronous client

AsyncDocusignESignatureRestApiClient mirrors DocusignESignatureRestApiClient with identical method names, and every endpoint method is a coroutine. It takes the same arguments, with some differences — for example, the transport argument is custom_async_http_client.

Python
from asyncio import run

from docusign_e_signature_rest_api import AsyncDocusignESignatureRestApiClient


async def main() -> None:
    client = AsyncDocusignESignatureRestApiClient(o_auth2="YOUR_BEARER_TOKEN", environment="production")
    await client.aclose()


run(main())

Alternatively, scope it — async with AsyncDocusignESignatureRestApiClient(...) as client: closes the pool on exit.

On this page