Skip to main content

Tesla API

This is a package for connecting to the Tesla API.

Usage for a vehicle

import asyncio
from tesla_api import TeslaApiClient

async def main():
    client = TeslaApiClient('your@email.com', 'yourPassword')

    vehicles = await client.list_vehicles()

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

asyncio.run(main())

Usage for Powerwall 2

import asyncio
from tesla_api import TeslaApiClient

async def main():
    client = TeslaApiClient('your@email.com', 'yourPassword')

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

asyncio.run(main())

Metadata

Release files for tesla-api 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tesla-api 2.0.1
File Size Uploaded Provenance Actions
tesla_api-2.0.1.tar.gz 4.9 kB Without provenance Details for tesla_api-2.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tesla-api 2.0.1
File Interpreter ABI Platform Actions
tesla_api-2.0.1-py3-none-any.whl Python 3 none any Details for tesla_api-2.0.1-py3-none-any.whl

Total release size: 12.2 kB

Release files / tesla_api-2.0.1.tar.gz

Download URL tesla_api-2.0.1.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ab6bf5092d762851f68b158a3dc573a4134c772d1d0c102b9733f371f7c865ff
BLAKE2b-256 checksum
How to use checksums
c4cf065209a4e7b2013c2e8471e38b4a150310e4c16baa7104cfcd5ac0ab3a46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5

Release files / tesla_api-2.0.1-py3-none-any.whl

Download URL tesla_api-2.0.1-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c77e0a08244c89f5c75c1b7b591350db56d29d5243d9bd2933c37fe141e3202a
BLAKE2b-256 checksum
How to use checksums
440417eb10fd318182f6602bb3daecde61ca9e6f28b5fff728968193f98c89f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5

Security for tesla-api 2.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page