Skip to main content

Tesla API Client

Project description

tesla_client

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

Quick Start

import tesla_client


# Define an Account subclass of your own to provide an access_token
class MyTeslaAccount(tesla_client.Account):
    def get_access_token(self) -> str:
        return your_oauth_solution.get_up_to_date_access_token()


account = MyTeslaAccount()

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

# Fetch some data from the vehicle
vehicle.data_request('drive_state')

# Send a command to the vehicle
vehicle.command('honk_horn')

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

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

Versions

3.1.0

  • Support Vehicle Command SDK

3.0.0

  • Use official Tesla Fleet API

2.0.0

  • Tesla removed support for grant_type=password. This version uses grant_type=authorization_code

1.0.0

  • grant_type=password

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-3.1.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

tesla_client-3.1.1-py3-none-any.whl (484.0 kB view details)

Uploaded Python 3

File details

Details for the file tesla_client-3.1.1.tar.gz.

File metadata

  • Download URL: tesla_client-3.1.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for tesla_client-3.1.1.tar.gz
Algorithm Hash digest
SHA256 2e7edff041308dd92a9711045c59727fdbf561f8bb03f96e121f5cb81eee63ae
MD5 42820c2afb66f828937544e14d4d2857
BLAKE2b-256 4132e68125512ba0bc6cecd67f9297edb4d529b5d81566c272ab3d9af83c82d0

See more details on using hashes here.

File details

Details for the file tesla_client-3.1.1-py3-none-any.whl.

File metadata

  • Download URL: tesla_client-3.1.1-py3-none-any.whl
  • Upload date:
  • Size: 484.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for tesla_client-3.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b630187888133c3cb9e089168274d80c996c293fbc04dc6b666a9e713ea5781b
MD5 09f370a3382e5f055cc8c994523af8f8
BLAKE2b-256 7801c2e2f1e2ce193ab69e14e5063a03c9fbcc927af2cbd46e16ae96fdaee02b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page