Package: luma.core
luma.core|luma.docs|luma.emulator|luma.examples|luma.lcd|luma.led_matrix|luma.oledluma.coreluma.coreis a component library providing aPillow-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)DocumentationAPI documentation can be found athttps://luma-core.readthedocs.io/en/latest/DriversDevice drivers extendluma.coreto provide the correct initialization
sequences for specific physical display devices/chipsets.There are several drivers for different classes of device available:luma.oledluma.lcdluma.led_matrixluma.emulatorEmulatorsThere 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 theexamplesdirectory of theluma.examplesrepository.LicenseThe MIT License (MIT)Copyright (c) 2017-2022 Richard Hull and contributorsPermission 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.ContributingPull 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.GitHubThe source code is available to clone at:https://github.com/rm-hull/luma.coreContributorsThijs Triemstra (@thijstriemstra)Christoph Handel (@fragfutter)@Boeeerb@xesRoger Dahl (@rogerdahl)Václav Šmilauer (@eudoxos)Claus Bjerre (@bjerrep)@bkntrx@7754359337@theraspydev@vortigontMaarten Los (@mlos)Jonathan Pereira (@jonathanrjpereira)Daniel Smullen (@drspangle)Hans Liss (@hansliss)Phil Howard (@gadgetoid)Manuel Baesler (@baslr)Dhrone (@dhrone)@jakiee3yMatthew Lovell (@mattblovell)Tiago F. Pimentel (@antropoiese)Maciej Sokolowski (@matemaciek)Jason Kingsbury (@relvacode)Jason Gaunt (@jasongaunt)ChangeLogVersionDescriptionDate2.4.2Add support for spi-mode in cmdline2024/01/302.4.1Adjust type check2023/09/012.4.0Drop support for Python 3.6Switch to implicit namespace package configurationAdd support for variable-width GPIO ports on FT23xx chipsUse time.perf_counter_ns() to avoid loss of precisionRemove cmdline.make_serial (deprecated since 1.17.1)Pillow 9.2.0 or newer is required now2022/10/162.3.2Only import smbus2 if no bus is provided2021/09/252.3.1Add Github publish action2021/03/082.3.0Cleanup only GPIO pins used rather than all2021/03/082.2.0Linux framebuffer: Support BGR, RGBA & BGRA colorspace displays2020/12/112.1.0Linux framebuffer pseudo-device uses diff-to-previous algorithm2020/11/302.0.2Change order of namepaces cmdline, so SSD1306 is default2020/11/262.0.1Fix to allow cmdline args to dynamically create a full_frame()
instance2020/11/062.0.0Improved diff_to_previous framebuffer performanceAdd Linux framebuffer pseudo-deviceAllow a wider range of SPI bus speeds2020/11/021.17.3Drop support for Python 3.5, only 3.6 or newer is supported nowAdd missing cmdline interfaces: “noop” & “gpio_cs_spi”Legacy proportional font wrapper raises user-friendly error
message when character is not in the font table2020/10/241.17.2Remove SPI cs_high capability (causing SystemException in latest
version of spidev on 5.4 kernel line)2020/10/111.17.1Add cmdline opt: “pcf8574” and “bitbang_6800” interfaces2020/09/261.17.0Added –inverse option for ST7735 to cmdline optAllow SPI interface to define reset durationChange bitmap_font to be compatible with Pillow < 7.02020/09/251.16.2Added new parallel interface moduleRenamed parallel class to bitbang_6800; moved to parallel module2020/09/201.16.1Fix bug in bitmap_font: glyph_index now computed correctly2020/08/291.16.0Embedded font parallel device (for upcoming HD44780, Winstar
character devices)2020/08/271.15.0Parallel bus and I²C backpack support2020/08/101.14.1Pin spidev at v3.4 or lower; v3.5 seems to cause SystemException
running on latest linux kernelFix bug in snapshot: should always redraw on startup2020/07/261.14.0Drop support for Python 2.7, only 3.5 or newer is supported nowAdd support for SPI mode (clock polarity and phase)2020/04/071.13.0Add support for using any GPIO pin as a CS pin for SPI2020/01/121.12.0Rework namespace support for subprojects2019/06/151.11.0Support luma.lcd.aux (if present)2019/06/021.10.1Fix [Error 22] emitted from within I2C serial adapter when used
with SSD1327 device2019/05/251.10.0Allow viewport pseudo-display to dither when rendering to
device with lower-fidelity color mode2019/05/231.9.0Improve I2C render speed by not chunking into 32-byte blocksAdd support for bridging FTDI to I2C/SPI2019/05/101.8.3Improve command line help outputSplit API docs into separate pages2019/01/071.8.2Fix type hint for SPI’s cs_high parameter2018/11/051.8.1Mutable string now works over unicode (for both py2/3)2018/09/181.8.0Namespace packaging fixCorrect implementation of pkgutil style namespaceSupport for Python 3.7Docstring updates2018/09/041.7.2Fix upside-down SEG7_FONT2018/03/291.7.1Support unicode in terminal class2018/03/221.7.0Addpersistflag on device2018/03/211.6.0Add--spi-transfer-size=...flag in cmdline args2018/02/211.5.0Add SEG7_FONT: Compact 7x3 font for LED Matrix2018/02/061.4.0Add--spi-cs-high=...flag in cmdline args2018/01/291.3.0Add--gpio-mode=...flag in cmdline args2018/01/021.2.1Useextras_requireinsetup.pyfor Linux dependencies2017/11/261.2.0Addedget_library_version&get_library_for_display_type2017/11/231.1.1Version number available asluma.core.__version__now2017/11/231.1.0Added image composition classes2017/10/281.0.3Explicitly state ‘UTF-8’ encoding in setup when reading files2017/10/181.0.2Fix conditional install on wheel2017/09/151.0.1Don’t install RPi.GPIO & spidev if setup running on OSX2017/09/041.0.0Stable release (remove all deprecated methods & parameters)2017/07/290.9.5Remove assert interminalto allow extended characters to be
printed (note: this only works for Python3 presently)2017/07/060.9.4Addtolerantclass for legacy font handling non-ASCII charsAdd CP437 chars to fonts.py2017/07/010.9.3LCD_FONT: lowercase cyrillic chars added, minor corrections in
uppercase chars2017/06/250.9.2Addbackground=option toluma.core.render.canvasAdd TCA9548A I2C multiplex scanner (contrib)Display I2C address in hex when error occurs2017/06/190.9.1Add cmdline block orientation of 1802017/05/010.9.0Add word-wrap capability toluma.core.virtual.terminalBug fix toluma.core.virtual.terminalwhen scrolling2017/04/220.8.1Propagate segment_mapper through other virtual devices2017/04/140.8.0Migrate seven-segment wrapper fromluma.led_matrix2017/04/140.7.5Allow alternative RPi.GPIO implementations2017/04/090.7.4Reduce size of space character in legacy proportional font2017/04/090.7.3Cmdline args now supports backlight active high/low2017/04/070.7.2Add--h-offset=Nand--v-offset=Nparams to cmdline args2017/04/070.7.1Improve formatting in command line options2017/04/060.7.0Add software-based bitbang SPI implementationCmdline args parsingUse monotonic clock2017/03/270.6.2Move GPIO.setmode() to point when referencedUse regex prefix in ANSI color parser (fixes deprecation warning)2017/03/190.6.1Deprecate spi paramsFix resource leak in spritesheet2017/03/130.6.0Terminal supports ANSI Color escape codesCatch & rethrow IOErrors2017/03/130.5.4Rework decorators2017/03/080.5.3Catch & rethrow all RPi.GPIO RuntimeExceptions2017/03/080.5.2Raiseerror.UnsupportedPlatformif RPi.GPIO is not availableBug fix toluma.core.virtual.terminalto handle multiple \n2017/03/080.5.1Bug fix:legacy.show_messageregression2017/03/050.5.0BREAKING CHANGES:Reworkframework_regulatorclassDocumentation updates2017/03/050.4.4Bug fix:legacy.show_messageoff-by-one bug2017/03/020.4.3Restrict exported Python symbols fromluma.core.serial2017/03/020.4.2Optional alignment of framebuffer bounding_box to word-boundaries2017/02/280.4.1Refactor framebuffer interface2017/02/270.4.0Add spritesheet and framerate_regulator functionalityAdd full-frame and diff-to-previous framebuffer implementationsRemove unnecessary travis/tox dependencies2017/02/270.3.2Bug fix:legacy.show_messagewrong device heightAdd Cyrillic chars to legacy fontMake pytest-runner a conditional requirement2017/02/240.3.1Imported legacy font handling fromrm-hull/luma.led_matrix2017/02/190.2.0Fix bug in seven_segment transform (display correct char)Moved emulator code torm-hull/luma.emulatorgithub repo2017/02/170.1.15Require at least Pillow 4.0.0Configurabletransfer_sizeon SPI writesDocumentation updates2017/02/110.1.14Use a more flexible no-op implementationUse spidev’swritebytes()rather thanxfer2()Dont write GIF animation if nothing was displayedAttempt to optimize palette when saving GIF animations2017/02/030.1.13Fix bug in setup script2017/01/230.1.12Assert valid SPI bus speedDon’t report errors in shutdownDon’t package as zip-safeAdd 7-segment LED emulation transformer2017/01/210.1.11Rejig packaging to include emulator assets2017/01/200.1.3Reset SPI device on initializationAdd LED matrix emulation transformer2017/01/190.1.2Namespace packaging2017/01/100.1.0Split out core functionality fromrm-hull/ssd13062017/01/10