Skip to main content

RideSafety Developer API SDK

Project description

RideSafety Python SDK

Install

pip install ridesafety-sdk

Build & publish

cd sdk/python
python3 -m pip install --upgrade build twine
python3 -m build
python3 -m twine upload dist/*

Usage

from ridesafety_sdk import RideSafetyClient

client = RideSafetyClient(
    api_key="YOUR_API_KEY",
    base_url="https://ridesafety.app",
)

recalls = client.get_recalls(vin="1HGBH41JXMN109186")

diagnostics = client.run_diagnostics(
    vin="1HGBH41JXMN109186",
    symptoms="Rough idle and engine misfire",
    dtc_codes=["P0300"],
)

safety = client.get_safety_ratings(make="Honda", model="Civic", year=2020)

Smoke test (all APIs)

cd sdk/python
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
python smoke_test.py

Edit smoke_test.py to set your API key. Diagnostics may require a paid plan and can return 402.

Auth modes

By default the SDK uses Authorization: Bearer <key>. To use x-api-key instead:

client = RideSafetyClient(api_key="KEY", auth_mode="x-api-key")

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

ridesafety_sdk-0.1.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

ridesafety_sdk-0.1.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file ridesafety_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: ridesafety_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for ridesafety_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 445a8c3c688ae8d2b2ae8167fd71ab428fabbe2f91ba2abc8072bf52a891df77
MD5 c86b4d37d38875bac026299a4d479316
BLAKE2b-256 261395644a7b3b4ffceed0c0be102576c260df469c4638d3bc039960297f6989

See more details on using hashes here.

File details

Details for the file ridesafety_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ridesafety_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for ridesafety_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eefea9892cea5680e99a0899d75cfbde33e90938b05a1f1d23fabee7aaed4511
MD5 d9dcafd47a324e651408f9e1e23dfd29
BLAKE2b-256 fc7cceda45d1a63bce7ab4ef7903697674d32822bff500cb01c7150f853b9ea3

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