luma.core


Nameluma.core JSON
Version 2.4.2 PyPI version JSON
download
home_pagehttps://github.com/rm-hull/luma.core
SummaryA component library to support SBC display drivers
upload_time2024-01-31 13:29:49
maintainer
docs_urlNone
authorRichard Hull
requires_python<4,>=3.7
licenseMIT
keywords raspberry orange banana pi rpi opi sbc oled lcd led display screen spi i2c ftdi usb
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            luma.core **|** 
`luma.docs <https://github.com/rm-hull/luma.docs>`__ **|** 
`luma.emulator <https://github.com/rm-hull/luma.emulator>`__ **|** 
`luma.examples <https://github.com/rm-hull/luma.examples>`__ **|** 
`luma.lcd <https://github.com/rm-hull/luma.lcd>`__ **|** 
`luma.led_matrix <https://github.com/rm-hull/luma.led_matrix>`__ **|** 
`luma.oled <https://github.com/rm-hull/luma.oled>`__ 

luma.core
=========

.. image:: https://github.com/rm-hull/luma.core/workflows/luma.core/badge.svg?branch=master
   :target: https://github.com/rm-hull/luma.core/actions?workflow=luma.core

.. image:: https://coveralls.io/repos/github/rm-hull/luma.core/badge.svg?branch=master
   :target: https://coveralls.io/github/rm-hull/luma.core?branch=master

.. image:: https://readthedocs.org/projects/luma-core/badge/?version=latest
   :target: https://luma-core.readthedocs.io/en/latest/

.. image:: https://img.shields.io/pypi/pyversions/luma.core.svg
   :target: https://pypi.python.org/project/luma.core

.. image:: https://img.shields.io/pypi/v/luma.core.svg
   :target: https://pypi.python.org/project/luma.core

.. image:: https://img.shields.io/pypi/dm/luma.core
   :target: https://pypi.python.org/project/luma.core

**luma.core** is a component library providing a `Pillow <https://pillow.readthedocs.io/>`_-compatible
drawing canvas for Python 3, and other functionality to support drawing primitives and
text-rendering capabilities for small displays on the Raspberry Pi and other
single board computers:

* scrolling/panning capability,
* terminal-style printing,
* state management,
* color/greyscale (where supported),
* dithering to monochrome,
* sprite animation,
* flexible framebuffering (depending on device capabilities)

Documentation
-------------

API documentation can be found at https://luma-core.readthedocs.io/en/latest/

Drivers
-------

Device drivers extend **luma.core** to provide the correct initialization
sequences for specific physical display devices/chipsets.

There are several drivers for different classes of device available:

* `luma.oled <https://github.com/rm-hull/luma.oled/>`_
* `luma.lcd <https://github.com/rm-hull/luma.lcd/>`_
* `luma.led_matrix <https://github.com/rm-hull/luma.led_matrix/>`_
* `luma.emulator <https://github.com/rm-hull/luma.emulator/>`_

Emulators
---------

There are emulators that run in real-time (with pygame) and others that can
take screenshots, or assemble animated GIFs, as per the examples below. Source
code for these are available in the `examples
<https://github.com/rm-hull/luma.examples/tree/master/examples>`_
directory of the ``luma.examples`` repository.

.. image:: https://raw.githubusercontent.com/rm-hull/luma.oled/master/doc/images/clock_anim.gif?raw=true
   :alt: clock

.. image:: https://raw.githubusercontent.com/rm-hull/luma.oled/master/doc/images/invaders_anim.gif?raw=true
   :alt: invaders

.. image:: https://raw.githubusercontent.com/rm-hull/luma.oled/master/doc/images/crawl_anim.gif?raw=true
   :alt: crawl

License
-------
The MIT License (MIT)

Copyright (c) 2017-2022 Richard Hull and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Contributing
------------

Pull requests (code changes / documentation / typos / feature requests / setup)
are gladly accepted. If you are intending to introduce some large-scale
changes, please get in touch first to make sure we're on the same page: try to
include a docstring for any new method or class, and keep method bodies small,
readable and PEP8-compliant. Add tests and strive to keep the code coverage
levels high.

GitHub
^^^^^^
The source code is available to clone at: https://github.com/rm-hull/luma.core

Contributors
^^^^^^^^^^^^
* Thijs Triemstra (@thijstriemstra)
* Christoph Handel (@fragfutter)
* @Boeeerb
* @xes
* Roger Dahl (@rogerdahl)
* Václav Šmilauer (@eudoxos)
* Claus Bjerre (@bjerrep)
* @bkntrx
* @7754359337
* @theraspydev
* @vortigont
* Maarten Los (@mlos)
* Jonathan Pereira (@jonathanrjpereira)
* Daniel Smullen (@drspangle)
* Hans Liss (@hansliss)
* Phil Howard (@gadgetoid)
* Manuel Baesler (@baslr)
* Dhrone (@dhrone)
* @jakiee3y
* Matthew Lovell (@mattblovell)
* Tiago F. Pimentel (@antropoiese)
* Maciej Sokolowski (@matemaciek)
* Jason Kingsbury (@relvacode)
* Jason Gaunt (@jasongaunt)

ChangeLog
---------

+------------+---------------------------------------------------------------------+------------+
| Version    | Description                                                         | Date       |
+============+=====================================================================+============+
| **2.4.2**  | * Add support for spi-mode in cmdline                               | 2024/01/30 |
+------------+---------------------------------------------------------------------+------------+
| **2.4.1**  | * Adjust type check                                                 | 2023/09/01 |
+------------+---------------------------------------------------------------------+------------+
| **2.4.0**  | * Drop support for Python 3.6                                       | 2022/10/16 |
|            | * Switch to implicit namespace package configuration                |            |
|            | * Add support for variable-width GPIO ports on FT23xx chips         |            |
|            | * Use time.perf_counter_ns() to avoid loss of precision             |            |
|            | * Remove cmdline.make_serial (deprecated since 1.17.1)              |            |
|            | * Pillow 9.2.0 or newer is required now                             |            |
+------------+---------------------------------------------------------------------+------------+
| **2.3.2**  | * Only import smbus2 if no bus is provided                          | 2021/09/25 |
+------------+---------------------------------------------------------------------+------------+
| **2.3.1**  | * Add Github publish action                                         | 2021/03/08 |
+------------+---------------------------------------------------------------------+------------+
| **2.3.0**  | * Cleanup only GPIO pins used rather than all                       | 2021/03/08 |
+------------+---------------------------------------------------------------------+------------+
| **2.2.0**  | * Linux framebuffer: Support BGR, RGBA & BGRA colorspace displays   | 2020/12/11 |
+------------+---------------------------------------------------------------------+------------+
| **2.1.0**  | * Linux framebuffer pseudo-device uses diff-to-previous algorithm   | 2020/11/30 |
+------------+---------------------------------------------------------------------+------------+
| **2.0.2**  | * Change order of namepaces cmdline, so SSD1306 is default          | 2020/11/26 |
+------------+---------------------------------------------------------------------+------------+
| **2.0.1**  | * Fix to allow cmdline args to dynamically create a full_frame()    | 2020/11/06 |
|            |   instance                                                          |            |
+------------+---------------------------------------------------------------------+------------+
| **2.0.0**  | * Improved diff_to_previous framebuffer performance                 | 2020/11/02 |
|            | * Add Linux framebuffer pseudo-device                               |            |
|            | * Allow a wider range of SPI bus speeds                             |            |
+------------+---------------------------------------------------------------------+------------+
| **1.17.3** | * Drop support for Python 3.5, only 3.6 or newer is supported now   | 2020/10/24 |
|            | * Add missing cmdline interfaces: "noop" & "gpio_cs_spi"            |            |
|            | * Legacy proportional font wrapper raises user-friendly error       |            |
|            |   message when character is not in the font table                   |            |
+------------+---------------------------------------------------------------------+------------+
| **1.17.2** | * Remove SPI cs_high capability (causing SystemException in latest  | 2020/10/11 |
|            |   version of spidev on 5.4 kernel line)                             |            |
+------------+---------------------------------------------------------------------+------------+
| **1.17.1** | * Add cmdline opt: "pcf8574" and "bitbang_6800" interfaces          | 2020/09/26 |
+------------+---------------------------------------------------------------------+------------+
| **1.17.0** | * Added --inverse option for ST7735 to cmdline opt                  | 2020/09/25 |
|            | * Allow SPI interface to define reset duration                      |            |
|            | * Change bitmap_font to be compatible with Pillow < 7.0             |            |
+------------+---------------------------------------------------------------------+------------+
| **1.16.2** | * Added new parallel interface module                               | 2020/09/20 |
|            | * Renamed parallel class to bitbang_6800; moved to parallel module  |            |
+------------+---------------------------------------------------------------------+------------+
| **1.16.1** | * Fix bug in bitmap_font: glyph_index now computed correctly        | 2020/08/29 |
+------------+---------------------------------------------------------------------+------------+
| **1.16.0** | * Embedded font parallel device (for upcoming HD44780, Winstar      | 2020/08/27 |
|            |   character devices)                                                |            |
+------------+---------------------------------------------------------------------+------------+
| **1.15.0** | * Parallel bus and I²C backpack support                             | 2020/08/10 |
+------------+---------------------------------------------------------------------+------------+
| **1.14.1** | * Pin spidev at v3.4 or lower; v3.5 seems to cause SystemException  | 2020/07/26 |
|            |   running on latest linux kernel                                    |            |
|            | * Fix bug in snapshot: should always redraw on startup              |            |
+------------+---------------------------------------------------------------------+------------+
| **1.14.0** | * Drop support for Python 2.7, only 3.5 or newer is supported now   | 2020/04/07 |
|            | * Add support for SPI mode (clock polarity and phase)               |            |
+------------+---------------------------------------------------------------------+------------+
| **1.13.0** | * Add support for using any GPIO pin as a CS pin for SPI            | 2020/01/12 |
+------------+---------------------------------------------------------------------+------------+
| **1.12.0** | * Rework namespace support for subprojects                          | 2019/06/15 |
+------------+---------------------------------------------------------------------+------------+
| **1.11.0** | * Support luma.lcd.aux (if present)                                 | 2019/06/02 |
+------------+---------------------------------------------------------------------+------------+
| **1.10.1** | * Fix [Error 22] emitted from within I2C serial adapter when used   | 2019/05/25 |
|            |   with SSD1327 device                                               |            |
+------------+---------------------------------------------------------------------+------------+
| **1.10.0** | * Allow viewport pseudo-display to dither when rendering to         | 2019/05/23 |
|            |   device with lower-fidelity color mode                             |            |
+------------+---------------------------------------------------------------------+------------+
| **1.9.0**  | * Improve I2C render speed by not chunking into 32-byte blocks      | 2019/05/10 |
|            | * Add support for bridging FTDI to I2C/SPI                          |            |
+------------+---------------------------------------------------------------------+------------+
| **1.8.3**  | * Improve command line help output                                  | 2019/01/07 |
|            | * Split API docs into separate pages                                |            |
+------------+---------------------------------------------------------------------+------------+
| **1.8.2**  | * Fix type hint for SPI's cs_high parameter                         | 2018/11/05 |
+------------+---------------------------------------------------------------------+------------+
| **1.8.1**  | * Mutable string now works over unicode (for both py2/3)            | 2018/09/18 |
+------------+---------------------------------------------------------------------+------------+
| **1.8.0**  | * Namespace packaging fix                                           | 2018/09/04 |
|            | * Correct implementation of pkgutil style namespace                 |            |
|            | * Support for Python 3.7                                            |            |
|            | * Docstring updates                                                 |            |
+------------+---------------------------------------------------------------------+------------+
| **1.7.2**  | * Fix upside-down SEG7_FONT                                         | 2018/03/29 |
+------------+---------------------------------------------------------------------+------------+
| **1.7.1**  | * Support unicode in terminal class                                 | 2018/03/22 |
+------------+---------------------------------------------------------------------+------------+
| **1.7.0**  | * Add ``persist`` flag on device                                    | 2018/03/21 |
+------------+---------------------------------------------------------------------+------------+
| **1.6.0**  | * Add ``--spi-transfer-size=...`` flag in cmdline args              | 2018/02/21 |
+------------+---------------------------------------------------------------------+------------+
| **1.5.0**  | * Add SEG7_FONT: Compact 7x3 font for LED Matrix                    | 2018/02/06 |
+------------+---------------------------------------------------------------------+------------+
| **1.4.0**  | * Add ``--spi-cs-high=...`` flag in cmdline args                    | 2018/01/29 |
+------------+---------------------------------------------------------------------+------------+
| **1.3.0**  | * Add ``--gpio-mode=...`` flag in cmdline args                      | 2018/01/02 |
+------------+---------------------------------------------------------------------+------------+
| **1.2.1**  | * Use ``extras_require`` in ``setup.py`` for Linux dependencies     | 2017/11/26 |
+------------+---------------------------------------------------------------------+------------+
| **1.2.0**  | * Added ``get_library_version`` & ``get_library_for_display_type``  | 2017/11/23 |
+------------+---------------------------------------------------------------------+------------+
| **1.1.1**  | * Version number available as ``luma.core.__version__`` now         | 2017/11/23 |
+------------+---------------------------------------------------------------------+------------+
| **1.1.0**  | * Added image composition classes                                   | 2017/10/28 |
+------------+---------------------------------------------------------------------+------------+
| **1.0.3**  | * Explicitly state 'UTF-8' encoding in setup when reading files     | 2017/10/18 |
+------------+---------------------------------------------------------------------+------------+
| **1.0.2**  | * Fix conditional install on wheel                                  | 2017/09/15 |
+------------+---------------------------------------------------------------------+------------+
| **1.0.1**  | * Don't install RPi.GPIO & spidev if setup running on OSX           | 2017/09/04 |
+------------+---------------------------------------------------------------------+------------+
| **1.0.0**  | * Stable release (remove all deprecated methods & parameters)       | 2017/07/29 |
+------------+---------------------------------------------------------------------+------------+
| **0.9.5**  | * Remove assert in ``terminal`` to allow extended characters to be  | 2017/07/06 |
|            |   printed (note: this only works for Python3 presently)             |            |
+------------+---------------------------------------------------------------------+------------+
| **0.9.4**  | * Add ``tolerant`` class for legacy font handling non-ASCII chars   | 2017/07/01 |
|            | * Add CP437 chars to fonts.py                                       |            |
+------------+---------------------------------------------------------------------+------------+
| **0.9.3**  | * LCD_FONT: lowercase cyrillic chars added, minor corrections in    | 2017/06/25 |
|            |   uppercase chars                                                   |            |
+------------+---------------------------------------------------------------------+------------+
| **0.9.2**  | * Add ``background=`` option to ``luma.core.render.canvas``         | 2017/06/19 |
|            | * Add TCA9548A I2C multiplex scanner (contrib)                      |            |
|            | * Display I2C address in hex when error occurs                      |            |
+------------+---------------------------------------------------------------------+------------+
| **0.9.1**  | * Add cmdline block orientation of 180                              | 2017/05/01 |
+------------+---------------------------------------------------------------------+------------+
| **0.9.0**  | * Add word-wrap capability to ``luma.core.virtual.terminal``        | 2017/04/22 |
|            | * Bug fix to ``luma.core.virtual.terminal`` when scrolling          |            |
+------------+---------------------------------------------------------------------+------------+
| **0.8.1**  | * Propagate segment_mapper through other virtual devices            | 2017/04/14 |
+------------+---------------------------------------------------------------------+------------+
| **0.8.0**  | * Migrate seven-segment wrapper from ``luma.led_matrix``            | 2017/04/14 |
+------------+---------------------------------------------------------------------+------------+
| **0.7.5**  | * Allow alternative RPi.GPIO implementations                        | 2017/04/09 |
+------------+---------------------------------------------------------------------+------------+
| **0.7.4**  | * Reduce size of space character in legacy proportional font        | 2017/04/09 |
+------------+---------------------------------------------------------------------+------------+
| **0.7.3**  | * Cmdline args now supports backlight active high/low               | 2017/04/07 |
+------------+---------------------------------------------------------------------+------------+
| **0.7.2**  | * Add ``--h-offset=N`` and ``--v-offset=N`` params to cmdline args  | 2017/04/07 |
+------------+---------------------------------------------------------------------+------------+
| **0.7.1**  | * Improve formatting in command line options                        | 2017/04/06 |
+------------+---------------------------------------------------------------------+------------+
| **0.7.0**  | * Add software-based bitbang SPI implementation                     | 2017/03/27 |
|            | * Cmdline args parsing                                              |            |
|            | * Use monotonic clock                                               |            |
+------------+---------------------------------------------------------------------+------------+
| **0.6.2**  | * Move GPIO.setmode() to point when referenced                      | 2017/03/19 |
|            | * Use regex prefix in ANSI color parser (fixes deprecation warning) |            |
+------------+---------------------------------------------------------------------+------------+
| **0.6.1**  | * Deprecate spi params                                              | 2017/03/13 |
|            | * Fix resource leak in spritesheet                                  |            |
+------------+---------------------------------------------------------------------+------------+
| **0.6.0**  | * Terminal supports ANSI Color escape codes                         | 2017/03/13 |
|            | * Catch & rethrow IOErrors                                          |            |
+------------+---------------------------------------------------------------------+------------+
| **0.5.4**  | * Rework decorators                                                 | 2017/03/08 |
+------------+---------------------------------------------------------------------+------------+
| **0.5.3**  | * Catch & rethrow all RPi.GPIO RuntimeExceptions                    | 2017/03/08 |
+------------+---------------------------------------------------------------------+------------+
| **0.5.2**  | * Raise ``error.UnsupportedPlatform`` if RPi.GPIO is not available  | 2017/03/08 |
|            | * Bug fix to ``luma.core.virtual.terminal`` to handle multiple \\n  |            |
+------------+---------------------------------------------------------------------+------------+
| **0.5.1**  | * Bug fix: ``legacy.show_message`` regression                       | 2017/03/05 |
+------------+---------------------------------------------------------------------+------------+
| **0.5.0**  | * **BREAKING CHANGES:** Rework ``framework_regulator`` class        | 2017/03/05 |
|            | * Documentation updates                                             |            |
+------------+---------------------------------------------------------------------+------------+
| **0.4.4**  | * Bug fix: ``legacy.show_message`` off-by-one bug                   | 2017/03/02 |
+------------+---------------------------------------------------------------------+------------+
| **0.4.3**  | * Restrict exported Python symbols from ``luma.core.serial``        | 2017/03/02 |
+------------+---------------------------------------------------------------------+------------+
| **0.4.2**  | * Optional alignment of framebuffer bounding_box to word-boundaries | 2017/02/28 |
+------------+---------------------------------------------------------------------+------------+
| **0.4.1**  | * Refactor framebuffer interface                                    | 2017/02/27 |
+------------+---------------------------------------------------------------------+------------+
| **0.4.0**  | * Add spritesheet and framerate_regulator functionality             | 2017/02/27 |
|            | * Add full-frame and diff-to-previous framebuffer implementations   |            |
|            | * Remove unnecessary travis/tox dependencies                        |            |
+------------+---------------------------------------------------------------------+------------+
| **0.3.2**  | * Bug fix: ``legacy.show_message`` wrong device height              | 2017/02/24 |
|            | * Add Cyrillic chars to legacy font                                 |            |
|            | * Make pytest-runner a conditional requirement                      |            |
+------------+---------------------------------------------------------------------+------------+
| **0.3.1**  | * Imported legacy font handling from ``rm-hull/luma.led_matrix``    | 2017/02/19 |
+------------+---------------------------------------------------------------------+------------+
| **0.2.0**  | * Fix bug in seven_segment transform (display correct char)         | 2017/02/17 |
|            | * Moved emulator code to ``rm-hull/luma.emulator`` github repo      |            |
+------------+---------------------------------------------------------------------+------------+
| **0.1.15** | * Require at least Pillow 4.0.0                                     | 2017/02/11 |
|            | * Configurable ``transfer_size`` on SPI writes                      |            |
|            | * Documentation updates                                             |            |
+------------+---------------------------------------------------------------------+------------+
| **0.1.14** | * Use a more flexible no-op implementation                          | 2017/02/03 |
|            | * Use spidev's ``writebytes()`` rather than ``xfer2()``             |            |
|            | * Dont write GIF animation if nothing was displayed                 |            |
|            | * Attempt to optimize palette when saving GIF animations            |            |
+------------+---------------------------------------------------------------------+------------+
| **0.1.13** | * Fix bug in setup script                                           | 2017/01/23 |
+------------+---------------------------------------------------------------------+------------+
| **0.1.12** | * Assert valid SPI bus speed                                        | 2017/01/21 |
|            | * Don't report errors in shutdown                                   |            |
|            | * Don't package as zip-safe                                         |            |
|            | * Add 7-segment LED emulation transformer                           |            |
+------------+---------------------------------------------------------------------+------------+
| **0.1.11** | * Rejig packaging to include emulator assets                        | 2017/01/20 |
+------------+---------------------------------------------------------------------+------------+
| **0.1.3**  | * Reset SPI device on initialization                                | 2017/01/19 |
|            | * Add LED matrix emulation transformer                              |            |
+------------+---------------------------------------------------------------------+------------+
| **0.1.2**  | * Namespace packaging                                               | 2017/01/10 |
+------------+---------------------------------------------------------------------+------------+
| **0.1.0**  | * Split out core functionality from ``rm-hull/ssd1306``             | 2017/01/10 |
+------------+---------------------------------------------------------------------+------------+

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/rm-hull/luma.core",
    "name": "luma.core",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "<4,>=3.7",
    "maintainer_email": "",
    "keywords": "raspberry,orange,banana,pi,rpi,opi,sbc,oled,lcd,led,display,screen,spi,i2c,ftdi,usb",
    "author": "Richard Hull",
    "author_email": "richard.hull@destructuring-bind.org",
    "download_url": "https://files.pythonhosted.org/packages/64/fe/026b50adfedf0d6bef583f8b005ad7e75b6501c973fad77a871d020fb63f/luma.core-2.4.2.tar.gz",
    "platform": null,
    "description": "luma.core **|** \n`luma.docs <https://github.com/rm-hull/luma.docs>`__ **|** \n`luma.emulator <https://github.com/rm-hull/luma.emulator>`__ **|** \n`luma.examples <https://github.com/rm-hull/luma.examples>`__ **|** \n`luma.lcd <https://github.com/rm-hull/luma.lcd>`__ **|** \n`luma.led_matrix <https://github.com/rm-hull/luma.led_matrix>`__ **|** \n`luma.oled <https://github.com/rm-hull/luma.oled>`__ \n\nluma.core\n=========\n\n.. image:: https://github.com/rm-hull/luma.core/workflows/luma.core/badge.svg?branch=master\n   :target: https://github.com/rm-hull/luma.core/actions?workflow=luma.core\n\n.. image:: https://coveralls.io/repos/github/rm-hull/luma.core/badge.svg?branch=master\n   :target: https://coveralls.io/github/rm-hull/luma.core?branch=master\n\n.. image:: https://readthedocs.org/projects/luma-core/badge/?version=latest\n   :target: https://luma-core.readthedocs.io/en/latest/\n\n.. image:: https://img.shields.io/pypi/pyversions/luma.core.svg\n   :target: https://pypi.python.org/project/luma.core\n\n.. image:: https://img.shields.io/pypi/v/luma.core.svg\n   :target: https://pypi.python.org/project/luma.core\n\n.. image:: https://img.shields.io/pypi/dm/luma.core\n   :target: https://pypi.python.org/project/luma.core\n\n**luma.core** is a component library providing a `Pillow <https://pillow.readthedocs.io/>`_-compatible\ndrawing canvas for Python 3, and other functionality to support drawing primitives and\ntext-rendering capabilities for small displays on the Raspberry Pi and other\nsingle board computers:\n\n* scrolling/panning capability,\n* terminal-style printing,\n* state management,\n* color/greyscale (where supported),\n* dithering to monochrome,\n* sprite animation,\n* flexible framebuffering (depending on device capabilities)\n\nDocumentation\n-------------\n\nAPI documentation can be found at https://luma-core.readthedocs.io/en/latest/\n\nDrivers\n-------\n\nDevice drivers extend **luma.core** to provide the correct initialization\nsequences for specific physical display devices/chipsets.\n\nThere are several drivers for different classes of device available:\n\n* `luma.oled <https://github.com/rm-hull/luma.oled/>`_\n* `luma.lcd <https://github.com/rm-hull/luma.lcd/>`_\n* `luma.led_matrix <https://github.com/rm-hull/luma.led_matrix/>`_\n* `luma.emulator <https://github.com/rm-hull/luma.emulator/>`_\n\nEmulators\n---------\n\nThere are emulators that run in real-time (with pygame) and others that can\ntake screenshots, or assemble animated GIFs, as per the examples below. Source\ncode for these are available in the `examples\n<https://github.com/rm-hull/luma.examples/tree/master/examples>`_\ndirectory of the ``luma.examples`` repository.\n\n.. image:: https://raw.githubusercontent.com/rm-hull/luma.oled/master/doc/images/clock_anim.gif?raw=true\n   :alt: clock\n\n.. image:: https://raw.githubusercontent.com/rm-hull/luma.oled/master/doc/images/invaders_anim.gif?raw=true\n   :alt: invaders\n\n.. image:: https://raw.githubusercontent.com/rm-hull/luma.oled/master/doc/images/crawl_anim.gif?raw=true\n   :alt: crawl\n\nLicense\n-------\nThe MIT License (MIT)\n\nCopyright (c) 2017-2022 Richard Hull and contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nContributing\n------------\n\nPull requests (code changes / documentation / typos / feature requests / setup)\nare gladly accepted. If you are intending to introduce some large-scale\nchanges, please get in touch first to make sure we're on the same page: try to\ninclude a docstring for any new method or class, and keep method bodies small,\nreadable and PEP8-compliant. Add tests and strive to keep the code coverage\nlevels high.\n\nGitHub\n^^^^^^\nThe source code is available to clone at: https://github.com/rm-hull/luma.core\n\nContributors\n^^^^^^^^^^^^\n* Thijs Triemstra (@thijstriemstra)\n* Christoph Handel (@fragfutter)\n* @Boeeerb\n* @xes\n* Roger Dahl (@rogerdahl)\n* V\u00e1clav \u0160milauer (@eudoxos)\n* Claus Bjerre (@bjerrep)\n* @bkntrx\n* @7754359337\n* @theraspydev\n* @vortigont\n* Maarten Los (@mlos)\n* Jonathan Pereira (@jonathanrjpereira)\n* Daniel Smullen (@drspangle)\n* Hans Liss (@hansliss)\n* Phil Howard (@gadgetoid)\n* Manuel Baesler (@baslr)\n* Dhrone (@dhrone)\n* @jakiee3y\n* Matthew Lovell (@mattblovell)\n* Tiago F. Pimentel (@antropoiese)\n* Maciej Sokolowski (@matemaciek)\n* Jason Kingsbury (@relvacode)\n* Jason Gaunt (@jasongaunt)\n\nChangeLog\n---------\n\n+------------+---------------------------------------------------------------------+------------+\n| Version    | Description                                                         | Date       |\n+============+=====================================================================+============+\n| **2.4.2**  | * Add support for spi-mode in cmdline                               | 2024/01/30 |\n+------------+---------------------------------------------------------------------+------------+\n| **2.4.1**  | * Adjust type check                                                 | 2023/09/01 |\n+------------+---------------------------------------------------------------------+------------+\n| **2.4.0**  | * Drop support for Python 3.6                                       | 2022/10/16 |\n|            | * Switch to implicit namespace package configuration                |            |\n|            | * Add support for variable-width GPIO ports on FT23xx chips         |            |\n|            | * Use time.perf_counter_ns() to avoid loss of precision             |            |\n|            | * Remove cmdline.make_serial (deprecated since 1.17.1)              |            |\n|            | * Pillow 9.2.0 or newer is required now                             |            |\n+------------+---------------------------------------------------------------------+------------+\n| **2.3.2**  | * Only import smbus2 if no bus is provided                          | 2021/09/25 |\n+------------+---------------------------------------------------------------------+------------+\n| **2.3.1**  | * Add Github publish action                                         | 2021/03/08 |\n+------------+---------------------------------------------------------------------+------------+\n| **2.3.0**  | * Cleanup only GPIO pins used rather than all                       | 2021/03/08 |\n+------------+---------------------------------------------------------------------+------------+\n| **2.2.0**  | * Linux framebuffer: Support BGR, RGBA & BGRA colorspace displays   | 2020/12/11 |\n+------------+---------------------------------------------------------------------+------------+\n| **2.1.0**  | * Linux framebuffer pseudo-device uses diff-to-previous algorithm   | 2020/11/30 |\n+------------+---------------------------------------------------------------------+------------+\n| **2.0.2**  | * Change order of namepaces cmdline, so SSD1306 is default          | 2020/11/26 |\n+------------+---------------------------------------------------------------------+------------+\n| **2.0.1**  | * Fix to allow cmdline args to dynamically create a full_frame()    | 2020/11/06 |\n|            |   instance                                                          |            |\n+------------+---------------------------------------------------------------------+------------+\n| **2.0.0**  | * Improved diff_to_previous framebuffer performance                 | 2020/11/02 |\n|            | * Add Linux framebuffer pseudo-device                               |            |\n|            | * Allow a wider range of SPI bus speeds                             |            |\n+------------+---------------------------------------------------------------------+------------+\n| **1.17.3** | * Drop support for Python 3.5, only 3.6 or newer is supported now   | 2020/10/24 |\n|            | * Add missing cmdline interfaces: \"noop\" & \"gpio_cs_spi\"            |            |\n|            | * Legacy proportional font wrapper raises user-friendly error       |            |\n|            |   message when character is not in the font table                   |            |\n+------------+---------------------------------------------------------------------+------------+\n| **1.17.2** | * Remove SPI cs_high capability (causing SystemException in latest  | 2020/10/11 |\n|            |   version of spidev on 5.4 kernel line)                             |            |\n+------------+---------------------------------------------------------------------+------------+\n| **1.17.1** | * Add cmdline opt: \"pcf8574\" and \"bitbang_6800\" interfaces          | 2020/09/26 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.17.0** | * Added --inverse option for ST7735 to cmdline opt                  | 2020/09/25 |\n|            | * Allow SPI interface to define reset duration                      |            |\n|            | * Change bitmap_font to be compatible with Pillow < 7.0             |            |\n+------------+---------------------------------------------------------------------+------------+\n| **1.16.2** | * Added new parallel interface module                               | 2020/09/20 |\n|            | * Renamed parallel class to bitbang_6800; moved to parallel module  |            |\n+------------+---------------------------------------------------------------------+------------+\n| **1.16.1** | * Fix bug in bitmap_font: glyph_index now computed correctly        | 2020/08/29 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.16.0** | * Embedded font parallel device (for upcoming HD44780, Winstar      | 2020/08/27 |\n|            |   character devices)                                                |            |\n+------------+---------------------------------------------------------------------+------------+\n| **1.15.0** | * Parallel bus and I\u00b2C backpack support                             | 2020/08/10 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.14.1** | * Pin spidev at v3.4 or lower; v3.5 seems to cause SystemException  | 2020/07/26 |\n|            |   running on latest linux kernel                                    |            |\n|            | * Fix bug in snapshot: should always redraw on startup              |            |\n+------------+---------------------------------------------------------------------+------------+\n| **1.14.0** | * Drop support for Python 2.7, only 3.5 or newer is supported now   | 2020/04/07 |\n|            | * Add support for SPI mode (clock polarity and phase)               |            |\n+------------+---------------------------------------------------------------------+------------+\n| **1.13.0** | * Add support for using any GPIO pin as a CS pin for SPI            | 2020/01/12 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.12.0** | * Rework namespace support for subprojects                          | 2019/06/15 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.11.0** | * Support luma.lcd.aux (if present)                                 | 2019/06/02 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.10.1** | * Fix [Error 22] emitted from within I2C serial adapter when used   | 2019/05/25 |\n|            |   with SSD1327 device                                               |            |\n+------------+---------------------------------------------------------------------+------------+\n| **1.10.0** | * Allow viewport pseudo-display to dither when rendering to         | 2019/05/23 |\n|            |   device with lower-fidelity color mode                             |            |\n+------------+---------------------------------------------------------------------+------------+\n| **1.9.0**  | * Improve I2C render speed by not chunking into 32-byte blocks      | 2019/05/10 |\n|            | * Add support for bridging FTDI to I2C/SPI                          |            |\n+------------+---------------------------------------------------------------------+------------+\n| **1.8.3**  | * Improve command line help output                                  | 2019/01/07 |\n|            | * Split API docs into separate pages                                |            |\n+------------+---------------------------------------------------------------------+------------+\n| **1.8.2**  | * Fix type hint for SPI's cs_high parameter                         | 2018/11/05 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.8.1**  | * Mutable string now works over unicode (for both py2/3)            | 2018/09/18 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.8.0**  | * Namespace packaging fix                                           | 2018/09/04 |\n|            | * Correct implementation of pkgutil style namespace                 |            |\n|            | * Support for Python 3.7                                            |            |\n|            | * Docstring updates                                                 |            |\n+------------+---------------------------------------------------------------------+------------+\n| **1.7.2**  | * Fix upside-down SEG7_FONT                                         | 2018/03/29 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.7.1**  | * Support unicode in terminal class                                 | 2018/03/22 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.7.0**  | * Add ``persist`` flag on device                                    | 2018/03/21 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.6.0**  | * Add ``--spi-transfer-size=...`` flag in cmdline args              | 2018/02/21 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.5.0**  | * Add SEG7_FONT: Compact 7x3 font for LED Matrix                    | 2018/02/06 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.4.0**  | * Add ``--spi-cs-high=...`` flag in cmdline args                    | 2018/01/29 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.3.0**  | * Add ``--gpio-mode=...`` flag in cmdline args                      | 2018/01/02 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.2.1**  | * Use ``extras_require`` in ``setup.py`` for Linux dependencies     | 2017/11/26 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.2.0**  | * Added ``get_library_version`` & ``get_library_for_display_type``  | 2017/11/23 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.1.1**  | * Version number available as ``luma.core.__version__`` now         | 2017/11/23 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.1.0**  | * Added image composition classes                                   | 2017/10/28 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.0.3**  | * Explicitly state 'UTF-8' encoding in setup when reading files     | 2017/10/18 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.0.2**  | * Fix conditional install on wheel                                  | 2017/09/15 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.0.1**  | * Don't install RPi.GPIO & spidev if setup running on OSX           | 2017/09/04 |\n+------------+---------------------------------------------------------------------+------------+\n| **1.0.0**  | * Stable release (remove all deprecated methods & parameters)       | 2017/07/29 |\n+------------+---------------------------------------------------------------------+------------+\n| **0.9.5**  | * Remove assert in ``terminal`` to allow extended characters to be  | 2017/07/06 |\n|            |   printed (note: this only works for Python3 presently)             |            |\n+------------+---------------------------------------------------------------------+------------+\n| **0.9.4**  | * Add ``tolerant`` class for legacy font handling non-ASCII chars   | 2017/07/01 |\n|            | * Add CP437 chars to fonts.py                                       |            |\n+------------+---------------------------------------------------------------------+------------+\n| **0.9.3**  | * LCD_FONT: lowercase cyrillic chars added, minor corrections in    | 2017/06/25 |\n|            |   uppercase chars                                                   |            |\n+------------+---------------------------------------------------------------------+------------+\n| **0.9.2**  | * Add ``background=`` option to ``luma.core.render.canvas``         | 2017/06/19 |\n|            | * Add TCA9548A I2C multiplex scanner (contrib)                      |            |\n|            | * Display I2C address in hex when error occurs                      |            |\n+------------+---------------------------------------------------------------------+------------+\n| **0.9.1**  | * Add cmdline block orientation of 180                              | 2017/05/01 |\n+------------+---------------------------------------------------------------------+------------+\n| **0.9.0**  | * Add word-wrap capability to ``luma.core.virtual.terminal``        | 2017/04/22 |\n|            | * Bug fix to ``luma.core.virtual.terminal`` when scrolling          |            |\n+------------+---------------------------------------------------------------------+------------+\n| **0.8.1**  | * Propagate segment_mapper through other virtual devices            | 2017/04/14 |\n+------------+---------------------------------------------------------------------+------------+\n| **0.8.0**  | * Migrate seven-segment wrapper from ``luma.led_matrix``            | 2017/04/14 |\n+------------+---------------------------------------------------------------------+------------+\n| **0.7.5**  | * Allow alternative RPi.GPIO implementations                        | 2017/04/09 |\n+------------+---------------------------------------------------------------------+------------+\n| **0.7.4**  | * Reduce size of space character in legacy proportional font        | 2017/04/09 |\n+------------+---------------------------------------------------------------------+------------+\n| **0.7.3**  | * Cmdline args now supports backlight active high/low               | 2017/04/07 |\n+------------+---------------------------------------------------------------------+------------+\n| **0.7.2**  | * Add ``--h-offset=N`` and ``--v-offset=N`` params to cmdline args  | 2017/04/07 |\n+------------+---------------------------------------------------------------------+------------+\n| **0.7.1**  | * Improve formatting in command line options                        | 2017/04/06 |\n+------------+---------------------------------------------------------------------+------------+\n| **0.7.0**  | * Add software-based bitbang SPI implementation                     | 2017/03/27 |\n|            | * Cmdline args parsing                                              |            |\n|            | * Use monotonic clock                                               |            |\n+------------+---------------------------------------------------------------------+------------+\n| **0.6.2**  | * Move GPIO.setmode() to point when referenced                      | 2017/03/19 |\n|            | * Use regex prefix in ANSI color parser (fixes deprecation warning) |            |\n+------------+---------------------------------------------------------------------+------------+\n| **0.6.1**  | * Deprecate spi params                                              | 2017/03/13 |\n|            | * Fix resource leak in spritesheet                                  |            |\n+------------+---------------------------------------------------------------------+------------+\n| **0.6.0**  | * Terminal supports ANSI Color escape codes                         | 2017/03/13 |\n|            | * Catch & rethrow IOErrors                                          |            |\n+------------+---------------------------------------------------------------------+------------+\n| **0.5.4**  | * Rework decorators                                                 | 2017/03/08 |\n+------------+---------------------------------------------------------------------+------------+\n| **0.5.3**  | * Catch & rethrow all RPi.GPIO RuntimeExceptions                    | 2017/03/08 |\n+------------+---------------------------------------------------------------------+------------+\n| **0.5.2**  | * Raise ``error.UnsupportedPlatform`` if RPi.GPIO is not available  | 2017/03/08 |\n|            | * Bug fix to ``luma.core.virtual.terminal`` to handle multiple \\\\n  |            |\n+------------+---------------------------------------------------------------------+------------+\n| **0.5.1**  | * Bug fix: ``legacy.show_message`` regression                       | 2017/03/05 |\n+------------+---------------------------------------------------------------------+------------+\n| **0.5.0**  | * **BREAKING CHANGES:** Rework ``framework_regulator`` class        | 2017/03/05 |\n|            | * Documentation updates                                             |            |\n+------------+---------------------------------------------------------------------+------------+\n| **0.4.4**  | * Bug fix: ``legacy.show_message`` off-by-one bug                   | 2017/03/02 |\n+------------+---------------------------------------------------------------------+------------+\n| **0.4.3**  | * Restrict exported Python symbols from ``luma.core.serial``        | 2017/03/02 |\n+------------+---------------------------------------------------------------------+------------+\n| **0.4.2**  | * Optional alignment of framebuffer bounding_box to word-boundaries | 2017/02/28 |\n+------------+---------------------------------------------------------------------+------------+\n| **0.4.1**  | * Refactor framebuffer interface                                    | 2017/02/27 |\n+------------+---------------------------------------------------------------------+------------+\n| **0.4.0**  | * Add spritesheet and framerate_regulator functionality             | 2017/02/27 |\n|            | * Add full-frame and diff-to-previous framebuffer implementations   |            |\n|            | * Remove unnecessary travis/tox dependencies                        |            |\n+------------+---------------------------------------------------------------------+------------+\n| **0.3.2**  | * Bug fix: ``legacy.show_message`` wrong device height              | 2017/02/24 |\n|            | * Add Cyrillic chars to legacy font                                 |            |\n|            | * Make pytest-runner a conditional requirement                      |            |\n+------------+---------------------------------------------------------------------+------------+\n| **0.3.1**  | * Imported legacy font handling from ``rm-hull/luma.led_matrix``    | 2017/02/19 |\n+------------+---------------------------------------------------------------------+------------+\n| **0.2.0**  | * Fix bug in seven_segment transform (display correct char)         | 2017/02/17 |\n|            | * Moved emulator code to ``rm-hull/luma.emulator`` github repo      |            |\n+------------+---------------------------------------------------------------------+------------+\n| **0.1.15** | * Require at least Pillow 4.0.0                                     | 2017/02/11 |\n|            | * Configurable ``transfer_size`` on SPI writes                      |            |\n|            | * Documentation updates                                             |            |\n+------------+---------------------------------------------------------------------+------------+\n| **0.1.14** | * Use a more flexible no-op implementation                          | 2017/02/03 |\n|            | * Use spidev's ``writebytes()`` rather than ``xfer2()``             |            |\n|            | * Dont write GIF animation if nothing was displayed                 |            |\n|            | * Attempt to optimize palette when saving GIF animations            |            |\n+------------+---------------------------------------------------------------------+------------+\n| **0.1.13** | * Fix bug in setup script                                           | 2017/01/23 |\n+------------+---------------------------------------------------------------------+------------+\n| **0.1.12** | * Assert valid SPI bus speed                                        | 2017/01/21 |\n|            | * Don't report errors in shutdown                                   |            |\n|            | * Don't package as zip-safe                                         |            |\n|            | * Add 7-segment LED emulation transformer                           |            |\n+------------+---------------------------------------------------------------------+------------+\n| **0.1.11** | * Rejig packaging to include emulator assets                        | 2017/01/20 |\n+------------+---------------------------------------------------------------------+------------+\n| **0.1.3**  | * Reset SPI device on initialization                                | 2017/01/19 |\n|            | * Add LED matrix emulation transformer                              |            |\n+------------+---------------------------------------------------------------------+------------+\n| **0.1.2**  | * Namespace packaging                                               | 2017/01/10 |\n+------------+---------------------------------------------------------------------+------------+\n| **0.1.0**  | * Split out core functionality from ``rm-hull/ssd1306``             | 2017/01/10 |\n+------------+---------------------------------------------------------------------+------------+\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A component library to support SBC display drivers",
    "version": "2.4.2",
    "project_urls": {
        "Homepage": "https://github.com/rm-hull/luma.core"
    },
    "split_keywords": [
        "raspberry",
        "orange",
        "banana",
        "pi",
        "rpi",
        "opi",
        "sbc",
        "oled",
        "lcd",
        "led",
        "display",
        "screen",
        "spi",
        "i2c",
        "ftdi",
        "usb"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6ed0f4022b3f17dec1bee5920526b4f2b7850ac2b70cc3420231bd498a828c6b",
                "md5": "086c21f280cfeae38f9cd5ea2c643f35",
                "sha256": "5eccbbdfde4b8cd9113d1bd355be6a29041c0b2e7f56e1873a4eed356e9fc582"
            },
            "downloads": -1,
            "filename": "luma.core-2.4.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "086c21f280cfeae38f9cd5ea2c643f35",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": "<4,>=3.7",
            "size": 70907,
            "upload_time": "2024-01-31T13:29:46",
            "upload_time_iso_8601": "2024-01-31T13:29:46.616051Z",
            "url": "https://files.pythonhosted.org/packages/6e/d0/f4022b3f17dec1bee5920526b4f2b7850ac2b70cc3420231bd498a828c6b/luma.core-2.4.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "64fe026b50adfedf0d6bef583f8b005ad7e75b6501c973fad77a871d020fb63f",
                "md5": "6e15a3fc0140a6119968629b19f1eb1f",
                "sha256": "963c264164d4374f549d57db09599e0ca458cea1bd05e16939897619be4e6dbd"
            },
            "downloads": -1,
            "filename": "luma.core-2.4.2.tar.gz",
            "has_sig": false,
            "md5_digest": "6e15a3fc0140a6119968629b19f1eb1f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.7",
            "size": 102578,
            "upload_time": "2024-01-31T13:29:49",
            "upload_time_iso_8601": "2024-01-31T13:29:49.113053Z",
            "url": "https://files.pythonhosted.org/packages/64/fe/026b50adfedf0d6bef583f8b005ad7e75b6501c973fad77a871d020fb63f/luma.core-2.4.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-31 13:29:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "rm-hull",
    "github_project": "luma.core",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "luma.core"
}
        
Elapsed time: 0.17293s