Catalog PyPI
Back to packageRELEASE DETAILS

2.2.18

PyPI

adafruit-circuitpython-magtag

Helper library for the Adafruit MagTag

adafruiteinkesp32espressifhardwareiotmagtagmicropythoncircuitpython
Published23 Apr 2026
Direct dependencies6
Transitive dependenciesNot calculated

README

Version 2.2.18 documentation
Introduction
============

.. image:: https://readthedocs.org/projects/adafruit-circuitpython-magtag/badge/?version=latest
    :target: https://docs.circuitpython.org/projects/magtag/en/latest/
    :alt: Documentation Status

.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg
    :target: https://adafru.it/discord
    :alt: Discord

.. image:: https://github.com/adafruit/Adafruit_CircuitPython_MagTag/workflows/Build%20CI/badge.svg
    :target: https://github.com/adafruit/Adafruit_CircuitPython_MagTag/actions
    :alt: Build Status

.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
    :target: https://github.com/astral-sh/ruff
    :alt: Code Style: Ruff

Helper library for the Adafruit MagTag.


Dependencies
=============
This driver depends on:

* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
* `Adafruit PortalBase <https://github.com/adafruit/Adafruit_CircuitPython_PortalBase>`_

Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading
`the Adafruit library and driver bundle <https://circuitpython.org/libraries>`_.


Usage Example
=============

.. code:: python

    # SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
    #
    # SPDX-License-Identifier: Unlicense
    import time
    import terminalio
    from adafruit_magtag.magtag import MagTag

    magtag = MagTag()

    magtag.add_text(
        text_font=terminalio.FONT,
        text_position=(
            50,
            (magtag.graphics.display.height // 2) - 1,
        ),
        text_scale=3,
    )

    magtag.set_text("Hello World")

    buttons = magtag.peripherals.buttons
    button_colors = ((255, 0, 0), (255, 150, 0), (0, 255, 255), (180, 0, 255))
    button_tones = (1047, 1318, 1568, 2093)
    timestamp = time.monotonic()

    while True:
        for i, b in enumerate(buttons):
            if not b.value:
                print("Button %c pressed" % chr((ord("A") + i)))
                magtag.peripherals.neopixel_disable = False
                magtag.peripherals.neopixels.fill(button_colors[i])
                magtag.peripherals.play_tone(button_tones[i], 0.25)
                break
        else:
            magtag.peripherals.neopixel_disable = True
        time.sleep(0.01)


Documentation
=============

API documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/magtag/en/latest/>`_.

For information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.

Contributing
============

Contributions are welcome! Please read our `Code of Conduct
<https://github.com/adafruit/Adafruit_CircuitPython_MagTag/blob/master/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 6

Native requirements
6 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
Adafruit-Blinka-displayio
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "",
  "evaluation": "NOT_EVALUATED"
}
Adafruit-Blinka-displayioruntime
Adafruit-Blinka
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "",
  "evaluation": "NOT_EVALUATED"
}
Adafruit-Blinkaruntime
adafruit-circuitpython-requests
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "",
  "evaluation": "NOT_EVALUATED"
}
adafruit-circuitpython-requestsruntime
adafruit-circuitpython-neopixel
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "",
  "evaluation": "NOT_EVALUATED"
}
adafruit-circuitpython-neopixelruntime
adafruit-circuitpython-simpleio
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "",
  "evaluation": "NOT_EVALUATED"
}
adafruit-circuitpython-simpleioruntime
adafruit-circuitpython-portalbase
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "",
  "evaluation": "NOT_EVALUATED"
}
adafruit-circuitpython-portalbaseruntime

Distribution files

2 collected
adafruit_circuitpython_magtag-2.2.18-py3-none-any.whl

bdist_wheel · 10.54 KB · Python py3

Source file
adafruit_circuitpython_magtag-2.2.18.tar.gz

sdist · 26.39 KB · Python source

Source file

Repository

PENDING
adafruit/adafruit_circuitpython_magtag

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:53 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:92dabe869a743da8bc376558df3bf366e25d8d4c5c74417313798f5028ec7978

Other collected versions

View all collected versions →