Access data from the Evo Car Share api
Project description
Evocarshare-py
Evocarshare is a module for accessing the data api of the Evo CarShare service which streamlines token management, and queries.
Installing
pip install evocarshare
Supported Versions
- Python 3.11+
Usage
Fetch all vehicles with range of a location
import aiohttp
import os
from evocarshare import CredentialBundle, EvoApi
API_KEY = os.environ.get("EVOAPI_KEY")
CLIENT_ID = os.environ.get("EVOAPI_CLIENTID")
CLIENT_SECRET = os.environ.get("EVOAPI_CLIENTSECRET")
async with aiohttp.ClientSession() as client_session:
# Initialize Api
creds = CredentialBundle(API_KEY, CLIENT_ID, CLIENT_SECRET)
api = EvoApi(client_session, creds)
# Query Vehicles
steam_clock = GpsCoord(latitude=49.284407, longitude=-123.108876)
vehicles = await api.get_vehicles_within(meters=500, of=steam_clock)
for v in vehicles:
print(v)
Quick Start (Dev Containers)
This project supports containerized development via devcontainers. From Visual Studio Code select Devcontainers: Reopen in Container from the command palette
Quick Start (Poetry)
Install dependencies via poetry
poetry install --with dev
Install precommit hooks
poetry run pre-commit install --install-hooks
Run tests
.venv/bin/pytest
Thanks
This project makes heavy use of the reverse engineering work by @jeremy21212121 and @jack-madison.
evofinder.ca - Unoffical web interface for Evo
EvoAppScrape - Script to extract vehicle data to csv
Contributing
Contributions via PR are welcome.
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