Skip to main content

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


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.1.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

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

sdk_api_adas-0.1.1-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file sdk_api_adas-0.1.1.tar.gz.

File metadata

  • Download URL: sdk_api_adas-0.1.1.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for sdk_api_adas-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8e8823f6343b04b374b2b9bd965b3cf5e891004fbde2145171557c546cacc0e4
MD5 7c321b4e2e8457862334af2b7661ea33
BLAKE2b-256 f508de418389c8619f9a2ed44009824f4853fc92a6083af4776e208d9513296b

See more details on using hashes here.

File details

Details for the file sdk_api_adas-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sdk_api_adas-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for sdk_api_adas-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5635b392fe156c4333cd290e269b644f8bbcf15aab1f558546bd6bc90fbdea56
MD5 85a5fd61057573a4edbc7bd94f5e31b4
BLAKE2b-256 3ecd135b21de51b5d36346ad24641ba05ff5c769cf1e7bd4aba9a38c5dee2195

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