Name | carson JSON |
Version |
1.2.4
JSON |
| download |
home_page | |
Summary | Version=1.2.4+eb347f3 Description=An asyncio package to interact with the Tesla JSON web service. |
upload_time | 2023-09-21 20:29:46 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.8 |
license | MIT |
keywords |
tesla
asyncio
json
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# carson
[![Latest Version][pypi-image]][pypi-url]
* [Overview](#overview)
* [Installation](#installation)
* [Authentication](#authentication)
* [States And Commands](#states-and-commands)
* [Examples](#examples)
* [Streaming](#examples)
## Overview
`carson` is a simple Python interface for Tesla's unofficial JSON API and includes some utilities to work with data it
generates. Lots of work to discover and document the API was done by Tim Dorr and dozens of contributors to his
[tesla-api](https://github.com/timdorr/tesla-api) project as well as Mark Seminatore and
[TeslaJS](https://github.com/mseminatore/TeslaJS). So, thanks to them for the head start.
Among the goals for this project is to have an [`asyncio`](https://docs.python.org/3/library/asyncio.html) based
library. As a result, Python 2 is not supported. In fact, it seems like it has been a decade since the *provisional*
tag was removed from the `asyncio` library because it has evolved so much. There are many guides, articles, and posts
based on early features of `asyncio`. The best way to stay up to date is by starting with Python's standard library
documentation for [`asyncio`](https://docs.python.org/3/library/asyncio.html).
### Dependencies
There is one dependency for basic usage — [`aiohttp`](https://docs.aiohttp.org/).
## Installation
As with most python projects, you should create an isolated python environment. The following
example will use Python's `venv` module. But you can use any virtual environment manager you wish
(e.g. pipenv, poetry, virtualenv, conda).
### Windows
```
python3.exe -m venv .venv
.venv\Scripts\activate
python -m pip install "carson[jwt]"
carson --version
carson/1.2.1+0d5c31d
```
### Linux/Mac
```
python3 -m venv .venv
source .venv/bin/activate
python -m pip install "carson[jwt]"
carson --version
carson/1.2.1+0d5c31d
```
For command line usage, `carson` can be invoked either as a Python module `python -m carson` or as a
script (simply named `carson`) which gets created during installation. Both invoke the same entry
point essentially making the following two statements the same.
```
python -m carson --version
```
is equivalent to
```
carson --version
```
## Authentication
This project is *BYOT* (bring your own token) only. OAuth and authentication flows are _**not**_
goals of this project. There are many apps and utilities that provide this if you need help
creating access and/or refresh tokens to use Tesla's API.
At a minimum, an **access token** is required. This can be set with the environment variable named
`CARSON_ACCESS_TOKEN` or passed to the `carson.Session` constructor. Values passed as arguments
take priority over environment variables.
If you want `carson` to refresh expired access tokens, you will also need to supply a valid
**refresh token** that matches the supplied **access token**. Likewise, this can be set as an
environment variable `CARSON_REFRESH_TOKEN` or passed to the `carson.Session` constructor.
You can register a callable (e.g. function, lambda, callable object, etc.) to be invoked when tokens
have refreshed. This _callable_ should take one positional argument which will be a `dict` and
contain the tokens that have updated.
See [`docs/examples.md`](docs/examples.md) for more examples.
## States And Commands
With its most basic usage, you can use `carson` to get the current state of car with the following:
```python
>>>import asyncio
>>>from carson import Session
>>>async def main():
... async with Session() as session:
... car = await session.vehicle
... print(f'{car.name} is {car.state!r}')
>>>asyncio.run(main())
Dark Nebula is 'asleep'
```
From the command line, you can invoke `carson --list` to get a list of vehicles associated with the
access token you are using:
```
$ carson --list
Car #1 Vehicle('Dark Nebula' state='asleep' id=1234567890123456)
Car #2 Vehicle('photon' state='online' id=1234567890123456)
```
If you have more than one vehicle and want to specify which car to show, you can pass `--name` to disambiguate which car
you want to show.
```
carson --name photon
Vehicle('photon' state='online' miles=52,809 software='2023.7.30' battery_level=72)
```
To get a sense of what is happening, you can increase verbosity and see the requests being made.
```
carson -v --name photon
2023-08-31 11:54:44,615 D carson Req 1 GET /api/1/vehicles HTTP/1.1 200 OK
2023-08-31 11:54:44,929 D carson Req 2 GET /api/1/vehicles/1234567890123456/vehicle_data HTTP/1.1 200 OK
2023-08-31 11:54:44,929 I carson Vehicle('photon' state='online' miles=52,809 software='2023.7.30' battery_level=72)
```
Further increasing the verbosity will produce more detailed output.
```
$ carson -vv --name photon
2023-08-31 11:56:52,296 D carson Req 1 status=200 dur=0:00:00.131960
2023-08-31 11:56:52,297 D carson GET https://owner-api.teslamotors.com/api/1/vehicles
2023-08-31 11:56:52,297 D carson < Host: owner-api.teslamotors.com
2023-08-31 11:56:52,297 D carson < User-Agent: carson/1.2.1+0d5c31d
2023-08-31 11:56:52,297 D carson < Accept: application/json
2023-08-31 11:56:52,297 D carson < Authorization: Bearer e***ng
2023-08-31 11:56:52,297 D carson < Accept-Encoding: gzip, deflate
2023-08-31 11:56:52,297 D carson
2023-08-31 11:56:52,297 D carson HTTP 200 OK HttpVersion(major=1, minor=1)
2023-08-31 11:56:52,297 D carson > x-xss-protection: 1; mode=block
2023-08-31 11:56:52,298 D carson > Content-Type: application/json; charset=utf-8
2023-08-31 11:56:52,298 D carson > Vary: Accept
2023-08-31 11:56:52,298 D carson > Content-Length: 416
2023-08-31 11:56:52,298 D carson > x-envoy-upstream-service-time: 97
2023-08-31 11:56:52,298 D carson > x-envoy-upstream-cluster: owner-api
2023-08-31 11:56:52,298 D carson > x-frame-options: DENY
2023-08-31 11:56:52,298 D carson > x-content-type-options: nosniff
2023-08-31 11:56:52,298 D carson > strict-transport-security: max-age=31536000; includeSubDomains
2023-08-31 11:56:52,298 D carson > Cache-Control: no-cache, no-store, private, s-max-age=0
2023-08-31 11:56:52,298 D carson > Date: Thu, 31 Aug 2023 16:56:52 GMT
2023-08-31 11:56:52,298 D carson > Server: envoy
2023-08-31 11:56:52,298 D carson
2023-08-31 11:56:52,298 D carson response={'count': 1, 'response': [{'id': 1234567890123456, 've...
2023-08-31 11:56:52,299 D carson
2023-08-31 11:56:52,600 D carson Req 2 status=200 dur=0:00:00.300726
2023-08-31 11:56:52,600 D carson GET https://owner-api.teslamotors.com/api/1/vehicles/1234567890123456/vehicle_data
2023-08-31 11:56:52,600 D carson < Host: owner-api.teslamotors.com
2023-08-31 11:56:52,600 D carson < User-Agent: carson/1.2.1+0d5c31d
2023-08-31 11:56:52,600 D carson < Accept: application/json
2023-08-31 11:56:52,600 D carson < Authorization: Bearer e***ng
2023-08-31 11:56:52,600 D carson < Accept-Encoding: gzip, deflate
2023-08-31 11:56:52,600 D carson
2023-08-31 11:56:52,600 D carson HTTP 200 OK HttpVersion(major=1, minor=1)
2023-08-31 11:56:52,600 D carson > x-xss-protection: 1; mode=block
2023-08-31 11:56:52,600 D carson > Content-Type: application/json; charset=utf-8
2023-08-31 11:56:52,600 D carson > Vary: Accept
2023-08-31 11:56:52,601 D carson > Content-Length: 7047
2023-08-31 11:56:52,601 D carson > x-envoy-upstream-service-time: 298
2023-08-31 11:56:52,601 D carson > x-envoy-upstream-cluster: owner-api-vehicle-data
2023-08-31 11:56:52,601 D carson > x-frame-options: DENY
2023-08-31 11:56:52,601 D carson > x-content-type-options: nosniff
2023-08-31 11:56:52,601 D carson > strict-transport-security: max-age=31536000; includeSubDomains
2023-08-31 11:56:52,601 D carson > Cache-Control: no-cache, no-store, private, s-max-age=0
2023-08-31 11:56:52,601 D carson > Date: Thu, 31 Aug 2023 16:56:52 GMT
2023-08-31 11:56:52,601 D carson > Server: envoy
2023-08-31 11:56:52,601 D carson
2023-08-31 11:56:52,601 D carson response={'response': {'id': 1234567890123456, 'user_id': 123456...
2023-08-31 11:56:52,602 D carson
2023-08-31 11:56:52,602 I carson Vehicle('photon' state='online' miles=52,809 software='2023.7.30' battery_level=72)
```
From this point, you can imagine any kind of state query or command supported by Tesla's API can be queried or invoked.
```
carson --command wake_up
carson --command door_lock
```
> Note: In the case of waking up a car, the command line `carson --command wake_up` is effectively
> the same as as the short hand `carson --wake-up` command.
## Pythonic Features
Python is a fantastic language. One of my favorite features is its ability to customize attribute access. That ability
allows a *Vehicle* class instance to basically act like a chameleon. As Tesla changes its data structure and command
interface for its cars, it's pretty easy for a Python class to essentially keep itself up to date.
### Recursive Dot-Notation
Consider this JSON response from Tesla when getting making a call to `vehicle_data`:
```json
{
"response": {
"id": 98765432109876543,
"vehicle_id": 1234567890,
"display_name": "Dark Nebula",
"state": "online",
...
"vehicle_state": {
"api_version": 7,
...
"sentry_mode": false,
"sentry_mode_available": true,
"smart_summon_available": true,
"software_update": {
"download_perc": 0.85279,
"expected_duration_sec": 2700,
"install_perc": 0,
...
```
With `carson`, after you make the call to get the vehicle data, you can access the JSON response that is returned, or
simply reference its associated JSON path on the instance of `Vehicle` using standard Python dot-notation like this:
```python
car = await my_session.vehicles('Dark Nebula')
json_response = await car.vehicle_data()
# I have options here. I can access the JSON data as a normal Python `dict`
perc = json_response['vehicle_state']['software_update']['download_perc']
# Or as a Python attribute
perc = car.vehicle_state.software_update.download_perc
if 0 < perc < 1:
print(f'Downloading: {perc:.2%} complete.')
else:
print('Download complete' if perc == 1 else 'N/A')
```
### Endpoint Commands As `await`able Attributes
Similarly, commands can that are mapped to an endpoint accessed via Python's class instance attribute mechanism will
return an `await`able coroutine. For example, the `Vehicle` class in `carson` does not have an attribute named
`start_charge`. The endpoints mapping, however, does map `START_CHARGE` to a POST request to the URI
`api/1/vehicles/{vehicle_id}/command/charge_start`. This makes it possible to start charging your Tesla with either
this code:
```python
car = await my_session.vehicles('Dark Nebula')
await car.start_charge()
```
or this command
```
> carson -v --command start_charge
2020-01-01 11:51:44,349 D carson Req# 1: Method=GET url='https://owner-api.teslamotors.com/api/1/vehicles' status=200 duration=0:00:02.460019
2020-01-01 11:51:44,350 I carson Vehicle('Dark Nebula' state='online')
2020-01-01 11:51:44,350 I carson Performing 'start_charge'...
2020-01-01 11:51:44,753 D carson Req# 2: Method=POST url='https://owner-api.teslamotors.com/api/1/vehicles/1234567890123456/command/charge_start' status=200 duration=0:00:00.403062
2020-01-01 11:51:44,754 I carson Result=
{'carsonRequest': {'method': 'POST',
'url': 'https://owner-api.teslamotors.com/api/1/vehicles/1234567890123456/command/charge_start'},
'carsonTimestamp': '2020-01-01T17:51:44.350726',
'error': None,
'error_description': '',
'response': {'reason': 'complete', 'result': True},
'status': 200}
```
## Examples
See the `docs` directory for more examples and advanced usage:
* [`docs/examples.md`](docs/examples.md)
* [`docs/streaming.md`](docs/streaming.md)
[pypi-image]: https://img.shields.io/pypi/v/carson.svg
[pypi-url]: https://pypi.org/project/carson/
Raw data
{
"_id": null,
"home_page": "",
"name": "carson",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "tesla,asyncio,json",
"author": "",
"author_email": "Michael Loyd <michael@loyd.org>",
"download_url": "",
"platform": null,
"description": "\n# carson\n\n[![Latest Version][pypi-image]][pypi-url]\n\n* [Overview](#overview)\n* [Installation](#installation)\n* [Authentication](#authentication)\n* [States And Commands](#states-and-commands)\n* [Examples](#examples)\n* [Streaming](#examples)\n\n## Overview\n\n`carson` is a simple Python interface for Tesla's unofficial JSON API and includes some utilities to work with data it\ngenerates. Lots of work to discover and document the API was done by Tim Dorr and dozens of contributors to his\n[tesla-api](https://github.com/timdorr/tesla-api) project as well as Mark Seminatore and\n[TeslaJS](https://github.com/mseminatore/TeslaJS). So, thanks to them for the head start.\n\nAmong the goals for this project is to have an [`asyncio`](https://docs.python.org/3/library/asyncio.html) based\nlibrary. As a result, Python 2 is not supported. In fact, it seems like it has been a decade since the *provisional*\ntag was removed from the `asyncio` library because it has evolved so much. There are many guides, articles, and posts\nbased on early features of `asyncio`. The best way to stay up to date is by starting with Python's standard library\ndocumentation for [`asyncio`](https://docs.python.org/3/library/asyncio.html).\n\n### Dependencies\n\nThere is one dependency for basic usage — [`aiohttp`](https://docs.aiohttp.org/).\n\n## Installation\n\nAs with most python projects, you should create an isolated python environment. The following\nexample will use Python's `venv` module. But you can use any virtual environment manager you wish\n(e.g. pipenv, poetry, virtualenv, conda).\n\n### Windows\n\n```\npython3.exe -m venv .venv\n.venv\\Scripts\\activate\npython -m pip install \"carson[jwt]\"\ncarson --version\ncarson/1.2.1+0d5c31d\n```\n\n### Linux/Mac\n\n```\npython3 -m venv .venv\nsource .venv/bin/activate\npython -m pip install \"carson[jwt]\"\ncarson --version\ncarson/1.2.1+0d5c31d\n```\n\nFor command line usage, `carson` can be invoked either as a Python module `python -m carson` or as a\nscript (simply named `carson`) which gets created during installation. Both invoke the same entry\npoint essentially making the following two statements the same.\n\n```\npython -m carson --version\n```\n\nis equivalent to\n\n```\ncarson --version\n```\n\n## Authentication\n\nThis project is *BYOT* (bring your own token) only. OAuth and authentication flows are _**not**_\ngoals of this project. There are many apps and utilities that provide this if you need help\ncreating access and/or refresh tokens to use Tesla's API.\n\nAt a minimum, an **access token** is required. This can be set with the environment variable named\n`CARSON_ACCESS_TOKEN` or passed to the `carson.Session` constructor. Values passed as arguments\ntake priority over environment variables.\n\nIf you want `carson` to refresh expired access tokens, you will also need to supply a valid\n**refresh token** that matches the supplied **access token**. Likewise, this can be set as an\nenvironment variable `CARSON_REFRESH_TOKEN` or passed to the `carson.Session` constructor.\n\nYou can register a callable (e.g. function, lambda, callable object, etc.) to be invoked when tokens\nhave refreshed. This _callable_ should take one positional argument which will be a `dict` and\ncontain the tokens that have updated.\n\nSee [`docs/examples.md`](docs/examples.md) for more examples.\n\n## States And Commands\n\nWith its most basic usage, you can use `carson` to get the current state of car with the following:\n\n```python\n>>>import asyncio\n>>>from carson import Session\n>>>async def main():\n... async with Session() as session:\n... car = await session.vehicle\n... print(f'{car.name} is {car.state!r}')\n\n>>>asyncio.run(main())\nDark Nebula is 'asleep'\n```\n\nFrom the command line, you can invoke `carson --list` to get a list of vehicles associated with the\naccess token you are using:\n\n```\n$ carson --list\nCar #1 Vehicle('Dark Nebula' state='asleep' id=1234567890123456)\nCar #2 Vehicle('photon' state='online' id=1234567890123456)\n```\n\nIf you have more than one vehicle and want to specify which car to show, you can pass `--name` to disambiguate which car\nyou want to show.\n\n```\ncarson --name photon\nVehicle('photon' state='online' miles=52,809 software='2023.7.30' battery_level=72)\n```\n\nTo get a sense of what is happening, you can increase verbosity and see the requests being made.\n\n```\ncarson -v --name photon\n2023-08-31 11:54:44,615 D carson Req 1 GET /api/1/vehicles HTTP/1.1 200 OK\n2023-08-31 11:54:44,929 D carson Req 2 GET /api/1/vehicles/1234567890123456/vehicle_data HTTP/1.1 200 OK\n2023-08-31 11:54:44,929 I carson Vehicle('photon' state='online' miles=52,809 software='2023.7.30' battery_level=72)\n```\n\nFurther increasing the verbosity will produce more detailed output.\n\n```\n$ carson -vv --name photon\n2023-08-31 11:56:52,296 D carson Req 1 status=200 dur=0:00:00.131960\n2023-08-31 11:56:52,297 D carson GET https://owner-api.teslamotors.com/api/1/vehicles\n2023-08-31 11:56:52,297 D carson < Host: owner-api.teslamotors.com\n2023-08-31 11:56:52,297 D carson < User-Agent: carson/1.2.1+0d5c31d\n2023-08-31 11:56:52,297 D carson < Accept: application/json\n2023-08-31 11:56:52,297 D carson < Authorization: Bearer e***ng\n2023-08-31 11:56:52,297 D carson < Accept-Encoding: gzip, deflate\n2023-08-31 11:56:52,297 D carson\n2023-08-31 11:56:52,297 D carson HTTP 200 OK HttpVersion(major=1, minor=1)\n2023-08-31 11:56:52,297 D carson > x-xss-protection: 1; mode=block\n2023-08-31 11:56:52,298 D carson > Content-Type: application/json; charset=utf-8\n2023-08-31 11:56:52,298 D carson > Vary: Accept\n2023-08-31 11:56:52,298 D carson > Content-Length: 416\n2023-08-31 11:56:52,298 D carson > x-envoy-upstream-service-time: 97\n2023-08-31 11:56:52,298 D carson > x-envoy-upstream-cluster: owner-api\n2023-08-31 11:56:52,298 D carson > x-frame-options: DENY\n2023-08-31 11:56:52,298 D carson > x-content-type-options: nosniff\n2023-08-31 11:56:52,298 D carson > strict-transport-security: max-age=31536000; includeSubDomains\n2023-08-31 11:56:52,298 D carson > Cache-Control: no-cache, no-store, private, s-max-age=0\n2023-08-31 11:56:52,298 D carson > Date: Thu, 31 Aug 2023 16:56:52 GMT\n2023-08-31 11:56:52,298 D carson > Server: envoy\n2023-08-31 11:56:52,298 D carson\n2023-08-31 11:56:52,298 D carson response={'count': 1, 'response': [{'id': 1234567890123456, 've...\n2023-08-31 11:56:52,299 D carson\n2023-08-31 11:56:52,600 D carson Req 2 status=200 dur=0:00:00.300726\n2023-08-31 11:56:52,600 D carson GET https://owner-api.teslamotors.com/api/1/vehicles/1234567890123456/vehicle_data\n2023-08-31 11:56:52,600 D carson < Host: owner-api.teslamotors.com\n2023-08-31 11:56:52,600 D carson < User-Agent: carson/1.2.1+0d5c31d\n2023-08-31 11:56:52,600 D carson < Accept: application/json\n2023-08-31 11:56:52,600 D carson < Authorization: Bearer e***ng\n2023-08-31 11:56:52,600 D carson < Accept-Encoding: gzip, deflate\n2023-08-31 11:56:52,600 D carson\n2023-08-31 11:56:52,600 D carson HTTP 200 OK HttpVersion(major=1, minor=1)\n2023-08-31 11:56:52,600 D carson > x-xss-protection: 1; mode=block\n2023-08-31 11:56:52,600 D carson > Content-Type: application/json; charset=utf-8\n2023-08-31 11:56:52,600 D carson > Vary: Accept\n2023-08-31 11:56:52,601 D carson > Content-Length: 7047\n2023-08-31 11:56:52,601 D carson > x-envoy-upstream-service-time: 298\n2023-08-31 11:56:52,601 D carson > x-envoy-upstream-cluster: owner-api-vehicle-data\n2023-08-31 11:56:52,601 D carson > x-frame-options: DENY\n2023-08-31 11:56:52,601 D carson > x-content-type-options: nosniff\n2023-08-31 11:56:52,601 D carson > strict-transport-security: max-age=31536000; includeSubDomains\n2023-08-31 11:56:52,601 D carson > Cache-Control: no-cache, no-store, private, s-max-age=0\n2023-08-31 11:56:52,601 D carson > Date: Thu, 31 Aug 2023 16:56:52 GMT\n2023-08-31 11:56:52,601 D carson > Server: envoy\n2023-08-31 11:56:52,601 D carson\n2023-08-31 11:56:52,601 D carson response={'response': {'id': 1234567890123456, 'user_id': 123456...\n2023-08-31 11:56:52,602 D carson\n2023-08-31 11:56:52,602 I carson Vehicle('photon' state='online' miles=52,809 software='2023.7.30' battery_level=72)\n```\n\nFrom this point, you can imagine any kind of state query or command supported by Tesla's API can be queried or invoked.\n\n```\ncarson --command wake_up\ncarson --command door_lock\n```\n\n> Note: In the case of waking up a car, the command line `carson --command wake_up` is effectively\n> the same as as the short hand `carson --wake-up` command.\n\n## Pythonic Features\n\nPython is a fantastic language. One of my favorite features is its ability to customize attribute access. That ability\nallows a *Vehicle* class instance to basically act like a chameleon. As Tesla changes its data structure and command\ninterface for its cars, it's pretty easy for a Python class to essentially keep itself up to date.\n\n### Recursive Dot-Notation\n\nConsider this JSON response from Tesla when getting making a call to `vehicle_data`:\n\n```json\n{\n \"response\": {\n \"id\": 98765432109876543,\n \"vehicle_id\": 1234567890,\n \"display_name\": \"Dark Nebula\",\n \"state\": \"online\",\n ...\n \"vehicle_state\": {\n \"api_version\": 7,\n ...\n \"sentry_mode\": false,\n \"sentry_mode_available\": true,\n \"smart_summon_available\": true,\n \"software_update\": {\n \"download_perc\": 0.85279,\n \"expected_duration_sec\": 2700,\n \"install_perc\": 0,\n ...\n```\n\nWith `carson`, after you make the call to get the vehicle data, you can access the JSON response that is returned, or\nsimply reference its associated JSON path on the instance of `Vehicle` using standard Python dot-notation like this:\n\n```python\ncar = await my_session.vehicles('Dark Nebula')\njson_response = await car.vehicle_data()\n\n# I have options here. I can access the JSON data as a normal Python `dict`\nperc = json_response['vehicle_state']['software_update']['download_perc']\n\n# Or as a Python attribute\nperc = car.vehicle_state.software_update.download_perc\n\nif 0 < perc < 1:\n print(f'Downloading: {perc:.2%} complete.')\nelse:\n print('Download complete' if perc == 1 else 'N/A')\n```\n\n### Endpoint Commands As `await`able Attributes\n\nSimilarly, commands can that are mapped to an endpoint accessed via Python's class instance attribute mechanism will\nreturn an `await`able coroutine. For example, the `Vehicle` class in `carson` does not have an attribute named\n`start_charge`. The endpoints mapping, however, does map `START_CHARGE` to a POST request to the URI\n`api/1/vehicles/{vehicle_id}/command/charge_start`. This makes it possible to start charging your Tesla with either\nthis code:\n\n```python\ncar = await my_session.vehicles('Dark Nebula')\nawait car.start_charge()\n```\n\nor this command\n\n```\n> carson -v --command start_charge\n2020-01-01 11:51:44,349 D carson Req# 1: Method=GET url='https://owner-api.teslamotors.com/api/1/vehicles' status=200 duration=0:00:02.460019\n2020-01-01 11:51:44,350 I carson Vehicle('Dark Nebula' state='online')\n2020-01-01 11:51:44,350 I carson Performing 'start_charge'...\n2020-01-01 11:51:44,753 D carson Req# 2: Method=POST url='https://owner-api.teslamotors.com/api/1/vehicles/1234567890123456/command/charge_start' status=200 duration=0:00:00.403062\n2020-01-01 11:51:44,754 I carson Result=\n{'carsonRequest': {'method': 'POST',\n 'url': 'https://owner-api.teslamotors.com/api/1/vehicles/1234567890123456/command/charge_start'},\n 'carsonTimestamp': '2020-01-01T17:51:44.350726',\n 'error': None,\n 'error_description': '',\n 'response': {'reason': 'complete', 'result': True},\n 'status': 200}\n```\n\n## Examples\n\nSee the `docs` directory for more examples and advanced usage:\n\n* [`docs/examples.md`](docs/examples.md)\n* [`docs/streaming.md`](docs/streaming.md)\n\n[pypi-image]: https://img.shields.io/pypi/v/carson.svg\n[pypi-url]: https://pypi.org/project/carson/\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Version=1.2.4+eb347f3 Description=An asyncio package to interact with the Tesla JSON web service.",
"version": "1.2.4",
"project_urls": {
"url": "https://github.com/mloyd/carson"
},
"split_keywords": [
"tesla",
"asyncio",
"json"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bb42068296f25658ece2c2b571689cc3c22bae8afddd7a82caed147446367d73",
"md5": "3c1c54c7ade1fcf42c6d1990e4eabefa",
"sha256": "aa8c4aad7707482e3559a88f5129d46e8d017320d69106b80781dfc20a3fa305"
},
"downloads": -1,
"filename": "carson-1.2.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3c1c54c7ade1fcf42c6d1990e4eabefa",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 33417,
"upload_time": "2023-09-21T20:29:46",
"upload_time_iso_8601": "2023-09-21T20:29:46.133700Z",
"url": "https://files.pythonhosted.org/packages/bb/42/068296f25658ece2c2b571689cc3c22bae8afddd7a82caed147446367d73/carson-1.2.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-21 20:29:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mloyd",
"github_project": "carson",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "carson"
}