Skip to main content

Renault API

Project description

PyPI Python Version License

Read the documentation at https://renault-api.readthedocs.io/ Tests Codecov

pre-commit Ruff

Features

This Python package manages the communication with the private Renault API used by the official MyRenault application.

The client is able to read various vehicle attributes, such as:

  • mileage

  • GPS location

  • fuel autonomy (for fuel vehicles)

  • battery autonomy (for electric vehicles)

  • contracts associated to the vehicle (warranty and connected services)

For some vehicles, it is also possible to manage:

  • hvac/pre-conditionning of the vehicle

  • charge schedule

This package has been developed to be used with Home-Assistant, but it can be used in other contexts

Requirements

  • Python (>= 3.8)

API Usage

You can install Renault API via pip from PyPI:

$ pip install renault-api
import aiohttp
import asyncio

from renault_api.renault_client import RenaultClient

async def main():
   async with aiohttp.ClientSession() as websession:
      client = RenaultClient(websession=websession, locale="fr_FR")
      await client.session.login('email', 'password')
      print(f"Accounts: {await client.get_person()}") # List available accounts, make a note of kamereon account id

      account_id = "Your Kamereon account id"
      account = await client.get_api_account(account_id)
      print(f"Vehicles: {await account.get_vehicles()}") # List available vehicles, make a note of vehicle VIN

      vin = "Your vehicle VIN"
      vehicle = await account.get_api_vehicle(vin)
      print(f"Cockpit information: {await vehicle.get_cockpit()}")
      print(f"Battery status information: {await vehicle.get_battery_status()}")

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

CLI Usage

The renault-api is also available through a CLI, which requires additional dependencies. For the added dependencies, you can install Renault API via pip from PyPI:

$ pip install renault-api[cli]

Once installed, the following command prompts for credentials and settings, displays basic vehicle status information, and generates traces:

$ renault-api --log status
  • Credentials will automatically be stored in the user home directory (~/.credentials/renault-api.json)

  • Logs will automatically be generated in logs subfolder

Please see the Command-line Reference for full details.

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, Renault API is free and open source software.

Disclaimer

This project is not affiliated with, endorsed by, or connected to Renault. I accept no responsibility for any consequences, intended or accidental, as a as a result of interacting with Renault’s API using this project.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from @cjolowicz’s Hypermodern Python Cookiecutter template. This project was heavily based on @jamesremuscat’s PyZE python client for the Renault ZE API.

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

renault_api-0.2.8.tar.gz (36.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

renault_api-0.2.8-py3-none-any.whl (47.3 kB view details)

Uploaded Python 3

File details

Details for the file renault_api-0.2.8.tar.gz.

File metadata

  • Download URL: renault_api-0.2.8.tar.gz
  • Upload date:
  • Size: 36.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for renault_api-0.2.8.tar.gz
Algorithm Hash digest
SHA256 b00c9f37a98fdbc54ff2aa4750be6bef034d2b5b7e6b45fd7e59d2b7e39dd989
MD5 648319affb04b4e9c3bbd9dab056eda1
BLAKE2b-256 6bdaf3b1ae0099a79b31b38ea59de9870dc979d2b0941f221fd5c28c2025f17f

See more details on using hashes here.

File details

Details for the file renault_api-0.2.8-py3-none-any.whl.

File metadata

  • Download URL: renault_api-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 47.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for renault_api-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 32f6b1109b565b471f617a7e8b4ea55d315653f9c53643d8f0c4dadf9461c9bc
MD5 f423a12a89a2d2130405334ed4ccb21c
BLAKE2b-256 be51dc4c06f4cd25f5bbc81ba4dbda590e84fa067604cdc440d1e2d35e3c08cb

See more details on using hashes here.

Supported by

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