How puravparab/waymo-api works
Below are the key steps and guidelines tailored to this project:
Main Components
• Client/Demo Components: The “examples” directory contains demonstration scripts (e.g., examples/demo/main.py, examples/sf/main.py) that show how to run single/multiple trip queries.
• API Core: Within the “src/waymo_api” directory, you have several submodules:
◦ “core” (client.py, driver.py, exceptions.py, models.py) – this layer encapsulates the fundamental API logic and communication routines.
◦ “interactions” (actions.py, extractor.py) – handles higher-level actions, possibly for initiating rides and extracting data.
◦ “utils” (logger.py) – provides logging functionality.
• External Dependencies and Infrastructure:
◦ Android Virtual Device (AVD) – running the Waymo One app.
◦ Appium server – enables interaction with the running Android emulator.
◦ Android debug bridge (adb) – used to change the device’s location.
◦ Setup tools such as Android Studio and npm for Appium installation.
Relationships and Interactions
• The demo examples call the Python API (client) which in turn interacts with the “core” and “interactions” modules.
• The “core” modules (client and driver) communicate with the Android emulator via Appium/adb.
• The API’s log messages, errors, and behavior are managed through the “utils/logger”.
• External flow: the emulator (running Waymo One) is set up with location modifications via adb and is controlled by the Appium server.
• The entire interaction pipeline connects user input, API command processing, and external device control.
Architectural Patterns and Technologies
• There is a clear separation between the API logic and external integration components.
• The structure follows a modular design where each module (core, interactions, utils) encapsulates specific responsibilities.
• Technologies in use: Python 3.12, uv package manager, Appium (Node-based), Android Studio/emulator, and adb.
• To note the “setup” steps in the README, highlighting the importance of ordering (first starting the AVD, then Appium).