SDK para interactuar con la API ADAS protegida por AWS IAM
Project description
SDK API ADAS
Este paquete es un SDK para interactuar con la API ADAS protegida por AWS IAM.
Instalación
pip install sdk-api-adas
Ejemplo de Uso
from sdk_api_adas.events import ApiEvents
from sdk_api_adas.utils.data_types import Parameters
from datetime import datetime, timedelta
if __name__ == "__main__":
try:
# Initialize the API client with your credentials
api_client = ApiEvents(
base_url="https://api.example.com/",
aws_region="us-last-1",
aws_access_key="your_access_key",
aws_secret_key="your_access_key",
aws_session_token="your_session_token", # Optional
)
# Define the parameters for the API request
parameters = Parameters(
start=datetime.now() - timedelta(days=30),
end=datetime.now(),
)
# Query: Get success events by state
events_by_state = api_client.get_success_events_by_state(parameters)
print("Events by state:", len(events_by_state))
# Query: Get success events by driver
parameters.driver_id = 123 # Set the driver ID
events_by_driver = api_client.get_success_events_by_driver(parameters)
print("Events by driver:", events_by_driver)
# Query: Get success events by type
parameters.event_type = "SPEEDING" # Set the event type
events_by_type = api_client.get_success_events_by_type(parameters)
print("Events by type:", events_by_type)
# Query: Get success events by bus
parameters.bus_plate = "ABC123" # Set the bus plate
events_by_bus = api_client.get_success_events_by_bus(parameters)
print("Events by bus:", events_by_bus)
except Exception as e:
print(f"An error occurred: {e}")
Licencia
MIT
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
sdk_api_adas-0.1.2.tar.gz
(18.7 kB
view details)
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 sdk_api_adas-0.1.2.tar.gz.
File metadata
- Download URL: sdk_api_adas-0.1.2.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
444928c7b00f06ee28ecedd173741186c495e869c2020dbcf36c34f0480f3437
|
|
| MD5 |
07ec73b8603e494936e2167afbaf5fa3
|
|
| BLAKE2b-256 |
6dcc8dae568e4e24e991fd522da3aac24e2725efefdf7e01fcb5128371cb7850
|
File details
Details for the file sdk_api_adas-0.1.2-py3-none-any.whl.
File metadata
- Download URL: sdk_api_adas-0.1.2-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4d6ff657065126b969f97e8ff178dab92cf2b52cba65648c139db62cb299bdf
|
|
| MD5 |
e30698d51c34089b29bd75c4b3acccf9
|
|
| BLAKE2b-256 |
5f5ebc5be0b3c435c3ca90bd22347fcf06c8320825f6f57e9d94f5ecc1dcee32
|