Skip to content

Conversation

@subhobhai943
Copy link

@subhobhai943 subhobhai943 commented Oct 24, 2025

Summary

This PR adds comprehensive documentation for the PyAndroid library, a new Python library designed for Android application development. The PyAndroid library enables Python developers to create Android applications using familiar Python patterns and paradigms.

What's New

  • New Documentation: Added Doc/library/pyandroid.rst with complete API documentation
  • Mobile Development Support: Introduces Python-based Android development capabilities
  • Cross-Platform Development: Enables Python developers to target Android platforms

Library Features

The PyAndroid library (available at https://github.com/subhobhai943/pyandroid-dev) provides:

Core Components

  • AndroidApp: Main application lifecycle management
  • Activity: Individual screen/view management
  • Intent: Inter-component communication

UI Framework

  • Complete set of UI components (TextView, Button, EditText)
  • Layout system (LinearLayout, RelativeLayout)
  • Event handling and user interaction

Utility Classes

  • Logger: Enhanced logging for mobile applications
  • FileManager: File and storage management
  • NetworkManager: HTTP and networking utilities

Example Usage

from pyandroid import AndroidApp, Activity
from pyandroid.ui import LinearLayout, Widget

class MainActivity(Activity):
    def on_start(self):
        layout = LinearLayout("main_layout")
        
        text_view = Widget.create_text_view(
            "hello_text", 
            "Hello from PyAndroid!"
        )
        
        button = Widget.create_button(
            "click_btn", 
            "Click Me",
            on_click=lambda v: print("Button clicked!")
        )
        
        layout.add_view(text_view)
        layout.add_view(button)
        self.add_view("main_layout", layout)

app = AndroidApp("HelloApp", "com.example.hello")
app.register_activity("main", MainActivity)
app.start_activity("main")
app.run()

Documentation Structure

The documentation follows standard Python library documentation format:

  • Overview and installation instructions
  • Basic usage examples
  • Complete API reference for all classes and methods
  • Cross-references to related Python modules
  • Links to comprehensive examples

Impact

This addition would:

  1. Expand Python's Ecosystem: Bring mobile development capabilities to Python
  2. Lower Barrier to Entry: Enable Python developers to create Android apps without learning Java/Kotlin
  3. Documentation Standards: Follows existing CPython documentation patterns
  4. Community Growth: Potentially attract mobile developers to Python

Related Work

The PyAndroid library complements existing Python GUI frameworks:

  • tkinter: Desktop GUI applications
  • pygame: Game development
  • kivy: Cross-platform applications
  • pyandroid: Android-specific mobile development

Testing

The library has been tested with:

  • Python 3.7+ compatibility
  • Cross-platform development workflows
  • Complete example applications
  • Documentation generation

Future Roadmap

Planned features for the PyAndroid library:

  • WebView component integration
  • Database support (SQLite)
  • Push notification handling
  • Camera and media access
  • Sensor integration
  • Background service support

Note: This PR adds documentation for an external library. The actual PyAndroid library is maintained separately at https://github.com/subhobhai943/pyandroid-dev and can be installed via pip install pyandroid-dev.

The documentation addition would help Python developers discover and utilize mobile development capabilities within the Python ecosystem.


📚 Documentation preview 📚: https://cpython-previews--140528.org.readthedocs.build/

@python-cla-bot
Copy link

python-cla-bot bot commented Oct 24, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@StanFromIreland
Copy link
Member

Hello, we only provide documentation for standard library modules, not for third party ones. Also, please do not open a PR to add your module, see the devguide for more information about the difficult process of doing so: https://devguide.python.org/developer-workflow/stdlib/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants