Skip to main content

Tesla API Client

Project description


This library allows access to the unofficial Tesla API for reading data and issuing commands to Tesla vehicles.

A key feature of this library is that it offers an easy way to sync OAuth credentials with a data store of your choice. Credentials are auto-saved on login, or during token refreshes.

Quick Start

import tesla_client

tesla_client.init(CLIENT_ID, CLIENT_SECRET)  # Get these values from

# Define an Account subclass of your own to manage OAuth credential storage
class MyTeslaAccount(tesla_client.Account):
    def get_credentials(self):
        return your_credentials_store.get()

    def save_credentials(self, creds):

account = MyTeslaAccount()

# Log in (and automatically save the OAuth credentials)
account.login('', 'password')

# Access a vehicle in this account
vehicle = account.get_vehicles()[0]

# Fetch some data from the vehicle

# Send a command to the vehicle

The Tesla API is not officially supported by Tesla, Inc. It may stop working at any time. For detailed documentation of API commands, see Thanks to Tim Dorr for his work in documenting the unofficial API.

Tesla, Inc. does not endorse or support this python library.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tesla_client-1.0.4.tar.gz (2.9 kB view hashes)

Uploaded source

Built Distribution

tesla_client-1.0.4-py3-none-any.whl (4.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page