pip install SmartCar
import smartcar
from smartcar.models import operations, shared
s = smartcar.Smartcar(
security=shared.Security(
bearer_auth="Bearer YOUR_BEARER_TOKEN_HERE",
),
vehicle_id="36ab27d0-fd9d-4455-823a-ce30af709ffc",
)
req = operations.GetLocationRequest()
res = s.vehicles.get_location(req)
if res.location is not None:
# handle response
list_compatibility
- Compatibility
get_battery_capacity
- EV Battery Capacityget_battery_level
- EV Battery Levelget_charging_status
- EV Charging Status
disconnect
- Revoke Accessget
- Vehicle Infoget_engine_oil
- Engine Oil Lifeget_fuel_tank
- Fuel Tank (US Only)get_location
- Locationget_odometer
- Odometerget_permissions
- Application Permissionsget_tire_pressure
- Tire pressurelist_vehicles
- All Vehicleslock_unlock
- Unlock Vehicle
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.
While we value open-source contributions to this SDK, this library is generated programmatically. Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release !