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.
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 https://pastebin.com/pS7Z6yyP # 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): your_credentials_store.save(creds) account = MyTeslaAccount() # Log in (and automatically save the OAuth credentials) account.login('mrsteven@gmail.com', 'password') # 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size tesla_client-1.0.4-py3-none-any.whl (4.2 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size tesla_client-1.0.4.tar.gz (2.9 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for tesla_client-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2261cdcd6b4f2f951818b2af2ab749a69007cfa34b81e38665761f32a6c4ac34 |
|
MD5 | 8139a2efbf743f04bce7c9ef8631f8af |
|
BLAKE2-256 | 1ffd72958dc669915b3485b3d1e51bd918a2855331078adc8c568fe519124273 |