Skip to main content

API client for Tesla

Project description

Tesla API

This is a package for connecting to the Tesla API.

Usage for a vehicle

from tesla_api import TeslaApiClient

client = TeslaApiClient('your@email.com', 'yourPassword')

vehicles = client.list_vehicles()

for v in vehicles:
    print(v.vin)
    v.controls.flash_lights()

Usage for Powerwall 2

from tesla_api import TeslaApiClient

client = TeslaApiClient('your@email.com', 'yourPassword')

energy_sites = client.list_energy_sites()
print("Number of energy sites = %d" % (len(energy_sites)))
assert(len(energy_sites)==1)
reserve = energy_sites[0].get_backup_reserve_percent()
print("Backup reserve percent = %d" % (reserve))
print("Increment backup reserve percent")
energy_sites[0].set_backup_reserve_percent(reserve+1)

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_api-1.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

tesla_api-1.1.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file tesla_api-1.1.0.tar.gz.

File metadata

  • Download URL: tesla_api-1.1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.5.7

File hashes

Hashes for tesla_api-1.1.0.tar.gz
Algorithm Hash digest
SHA256 a57f7252da3b67c7a4e586a29ca17084c0976674b5fc72824e9023b1b9028555
MD5 0b8c193238a4986ef8f85e894a1933b9
BLAKE2b-256 dbddfc78c5271aee62179a98f508375375e851ce461de0894b7ec434cbd3a2ad

See more details on using hashes here.

File details

Details for the file tesla_api-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: tesla_api-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.5.7

File hashes

Hashes for tesla_api-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f0e6f3df4b39db1d4627c2b6a929ceb2d9010f71a1c65122690fe217b5599c2
MD5 4db1f09c487659a17235d29ba75611d9
BLAKE2b-256 38eb1f0dcafba06c9db89a2ecf0739c976ab5a384038caa78361be3cf2128926

See more details on using hashes here.

Supported by

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