Skip to content

ApkPy 1.15.1

Released 2026-11-19. python -m pip install --upgrade apkpy==1.15.1.

A number is a condition and a dict keeps whole-number keys as numbers, as in Python. progress() is a bar with a value, and the launcher icon is the adaptive kind Android 8 and later expect. The Previewer works on Python 3.8 to 3.11 again. A signed release keeps every picture the app names in its data.

from apkpy_lib import *

home = Screen(id="home")
upload = progress(0, id="upload", screen=home)
out = label("", id="out", screen=home)
sent = 0


def send_more():
    global sent
    sent = sent + 25
    upload.set_value(sent)
    counts = {}
    for n in [1, 2, 1, 3, 1]:
        counts[n] = counts.get(n, 0) + 1
    odd = [n for n in range(10) if n % 2]
    out.set_value(str(counts) + " " + str(odd))


button("Send", command=send_more, screen=home)
run(start_screen=home)

On the phone, as in Python, the label reads {1: 3, 2: 1, 3: 1} [1, 3, 5, 7, 9].

Added

  • A number as a condition: if i % 2:, while n // 10:, x if n - 5 else y. 0 is false and every other number is true.
  • Whole-number keys come back as numbers: str(d), for k in d, for k, v in d.items(), sorted(d), max(d) and f"{d}" give 1, not '1'. A dict with a key that is not certainly a whole number still stops the build where its keys are read back, with the reason.
  • progress(value, max=100), a bar that fills, with set_value(v). It is drawn the way a chart is and takes color, track-color, height and border-radius; TalkBack reads the percentage. See a progress bar.
  • An adaptive launcher icon from the one PNG in apkpy.toml: a picture with a filled background fills the phone's icon shape in its own colour, and a transparent one sits in the middle, on icon_background (white by default). See build and release.
  • Pictures of the games and the Studio on the games page and in the README.

Fixed

  • A signed release lost the pictures an app names in its data, such as the cover in a row of a list: the release build's shrinker took them out. Every picture and sound the app brings is now kept. The showcase's signed Lumen and Afterglow had it; their downloads are rebuilt.
  • The Previewer on Python 3.8 to 3.11 stopped at a label with a gradient behind it.
  • Three things that went wrong without a word now stop the build with the line and what to write instead: a name the top of the file sets inside if, for or while that a function reads; x = storage.get("k") + "!" at the top of the file; and reading back the keys of a dict with tuples for keys.

Every change, with the details, is in the changelog.