exteraGram

Available Libraries

A list of pre-installed Python libraries available in the plugin environment.

The plugin environment comes with a specific version of Python and a set of pre-installed third-party libraries that you can use in your plugins without any extra setup.

Python Version

  • Python: 3.11

Pre-installed Pip Packages

You can directly import and use the following libraries in your plugin code:

  • beautifulsoup4: A library for pulling data out of HTML and XML files. Useful for web scraping.
  • debugpy: The official debugger for Python from Microsoft, enabling remote debugging capabilities (used by the Dev Server).
  • lxml: A powerful and Pythonic library for processing XML and HTML.
  • packaging: Core utilities for Python packages.
  • pillow: The friendly PIL fork (Python Imaging Library). Useful for image manipulation.
  • requests: A simple, yet elegant, HTTP library. Essential for making web requests.
  • PyYAML: A YAML parser and emitter for Python.

Example Usage

Because requests is on this list, you can use it directly in your plugin, as shown in the First Plugin tutorial:

import requests
from android_utils import log
 
def fetch_some_data():
    try:
        response = requests.get("https://api.example.com/data")
        response.raise_for_status() # Raises an HTTPError for bad responses
        return response.json()
    except requests.exceptions.RequestException as e:
        log(f"Failed to fetch data: {e}")
        return None

Using Other Libraries

If your plugin requires a library that is not on this list, you must either implement the needed functionality yourself or find an alternative available in Java. The plugin system does not support installing additional packages at runtime.

On this page