Russell Keith-Magee - Build a Data Visualization App For Your Phone | PyData Global 2023

Learn how to build cross-platform data visualization mobile apps using Python, Beware tools & Toga. Covers native UI development, packaging & mobile deployment.

Key takeaways
  • Beware is a suite of open source tools for creating native user interfaces in Python across desktop, iOS, Android, web and console apps
  • Toga provides cross-platform GUI capabilities with native widgets and interfaces for each platform
  • Briefcase handles packaging Python applications into standalone bundles for distribution, managing dependencies and platform-specific requirements
  • Pure Python packages generally work without issues on mobile, but binary wheels/modules require special handling for iOS/Android platforms
  • Development workflow:
    • briefcase new to create project scaffolding
    • briefcase dev for rapid development iterations
    • briefcase create generates platform-specific project files
    • briefcase build compiles the application
    • briefcase run launches on device/simulator
  • Configuration managed through pyproject.toml with platform-specific overrides possible
  • Apps get native platform capabilities like accessibility, sensors, and UI components automatically
  • Binary dependencies like NumPy/Matplotlib work but require pre-built wheels for mobile platforms
  • Common mobile development challenges include:
    • Permission handling
    • Device sensor access
    • Binary module compatibility
    • App store deployment requirements
  • Active development continues on iOS/Android support with goals of official Python mobile platform support