CarConnectivity plugin providing a REST API
Project description
CarConnectivity Plugin for a REST API
CarConnectivity will become the successor of WeConnect-python in 2025 with similar functionality but support for other brands beyond Volkswagen!
CarConnectivity is a python API to connect to various car services. This plugin provides a REST API that allows other clients to interact with CarConnectivity's object tree.
Supported operations
- GET data from CarConnectivity's object tree
- PUT writable attributes (change values)
- POST commands with their arguments
Installation
pip install carconnectivity-plugin-restapi
Configuration
Add the plugin to your carconnectivity.json configuration file:
{
"carConnectivity": {
"connectors": [...],
"plugins": [
{
"type": "restapi",
"config": {
"host": "0.0.0.0",
"port": 40000,
"username": "admin",
"password": "secretpassword"
}
}
]
}
}
Multiple users
{
"carConnectivity": {
"plugins": [
{
"type": "restapi",
"config": {
"port": 40000,
"users": [
{"username": "user1", "password": "pass1"},
{"username": "user2", "password": "pass2"}
]
}
}
]
}
}
HTTPS
{
"carConnectivity": {
"plugins": [
{
"type": "restapi",
"config": {
"port": 40000,
"https": true,
"ssl_certificate_file": "/path/to/cert.pem",
"ssl_certificate_key_file": "/path/to/key.pem",
"username": "admin",
"password": "secret"
}
}
]
}
}
API Usage
All endpoints require HTTP Basic Authentication.
GET — retrieve data
GET http://localhost:40000/<path>
Returns the object or attribute at <path> in the CarConnectivity object tree as JSON.
An empty path (/) returns the entire tree.
Example:
curl -u admin:secret http://localhost:40000/garage/WVWZZZAUZLW123456/charging/connector/connection_state
PUT — set a writable attribute
PUT http://localhost:40000/<path>
Content-Type: application/json
{"value": <new_value>}
Example:
curl -u admin:secret -X PUT -H "Content-Type: application/json" \
-d '{"value": 80}' \
http://localhost:40000/garage/WVWZZZAUZLW123456/charging/settings/target_level
POST — execute a command
POST http://localhost:40000/<path>
Content-Type: application/json
{"value": <command_arguments>}
Example:
curl -u admin:secret -X POST -H "Content-Type: application/json" \
-d '{"value": "start"}' \
http://localhost:40000/garage/WVWZZZAUZLW123456/climatization/commands/start-stop
Configuration parameters
| Parameter | Description | Default |
|---|---|---|
host |
Host/IP to listen on | 0.0.0.0 |
port |
Port to listen on | 40000 |
username |
Single user username | — |
password |
Single user password | — |
users |
List of {username, password} objects |
— |
https |
Enable HTTPS | false |
ssl_certificate_file |
Path to SSL certificate file | — |
ssl_certificate_key_file |
Path to SSL private key file | — |
log_level |
Log level (DEBUG, INFO, WARNING, ERROR) |
ERROR |
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.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file carconnectivity_plugin_restapi-0.1a1.tar.gz.
File metadata
- Download URL: carconnectivity_plugin_restapi-0.1a1.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9be445f5d6774ba15a92539f5c6f46a50bc4e9c0c63264381d639bf67575d5b6
|
|
| MD5 |
c2ba2398171b0539eb73b399f1187f68
|
|
| BLAKE2b-256 |
59085686a6a5d3365aa6f73426c6b9dc1a2b58f95845409b68efa08acae1c1d0
|
Provenance
The following attestation bundles were made for carconnectivity_plugin_restapi-0.1a1.tar.gz:
Publisher:
build_and_publish.yml on tillsteinbach/CarConnectivity-plugin-restapi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
carconnectivity_plugin_restapi-0.1a1.tar.gz -
Subject digest:
9be445f5d6774ba15a92539f5c6f46a50bc4e9c0c63264381d639bf67575d5b6 - Sigstore transparency entry: 1154616851
- Sigstore integration time:
-
Permalink:
tillsteinbach/CarConnectivity-plugin-restapi@b35335e33693a9760648c2d3a34879dda37ccf45 -
Branch / Tag:
refs/tags/v0.1a1 - Owner: https://github.com/tillsteinbach
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_and_publish.yml@b35335e33693a9760648c2d3a34879dda37ccf45 -
Trigger Event:
push
-
Statement type:
File details
Details for the file carconnectivity_plugin_restapi-0.1a1-py3-none-any.whl.
File metadata
- Download URL: carconnectivity_plugin_restapi-0.1a1-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8552cc3e279c76d1bb3b4244962e5c12f86da2d89255ba7b50f91528de3d41a8
|
|
| MD5 |
ea3fa7693e55764ee0d4e55d10ba184b
|
|
| BLAKE2b-256 |
1eb2ba77fcad71a9d7482e077dbdad883a2730fac86e28fcad7420a2a2d1134b
|
Provenance
The following attestation bundles were made for carconnectivity_plugin_restapi-0.1a1-py3-none-any.whl:
Publisher:
build_and_publish.yml on tillsteinbach/CarConnectivity-plugin-restapi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
carconnectivity_plugin_restapi-0.1a1-py3-none-any.whl -
Subject digest:
8552cc3e279c76d1bb3b4244962e5c12f86da2d89255ba7b50f91528de3d41a8 - Sigstore transparency entry: 1154616852
- Sigstore integration time:
-
Permalink:
tillsteinbach/CarConnectivity-plugin-restapi@b35335e33693a9760648c2d3a34879dda37ccf45 -
Branch / Tag:
refs/tags/v0.1a1 - Owner: https://github.com/tillsteinbach
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_and_publish.yml@b35335e33693a9760648c2d3a34879dda37ccf45 -
Trigger Event:
push
-
Statement type: