Package: inky
InkyPython library forInky pHAT,Inky wHATandInky Impressione-paper displays for Raspberry Pi.Inky pHATInky pHATis a 250x122 pixel e-paper display, available in red/black/white, yellow/black/white and black/white. It's great for nametags and displaying very low frequency information such as a daily calendar or weather overview.Inky wHATInky wHATis a 400x300 pixel e-paper display available in red/black/white, yellow/black/white and black/white. It's got tons of resolution for detailed daily to-do lists, multi-day weather forecasts, bus timetables and more.Inky ImpressionInky Impressionis our line of glorious 7 colour eInk displays, available in4"(640 x 400 pixel)5.7"(600 x 448 pixel) and7.3"(800 x 480 pixel) flavours. They're packed with strong colours and perfect for displaying striking graphics or lots of data.InstallationFirst, make sure you have I2C and SPI enabled insudo raspi-config.The Python pip package is named inky, on the Raspberry Pi install with:pip3 install inky[rpi,example-depends]This will install Inky along with dependencies for the Raspberry Pi, plus fonts used by the examples.If you want to simulate Inky on your desktop, use:pip3 install inkyYou may need to usesudo pip3orsudo pipdepending on your environment and Python version.UsageThe library should be run with Python 3.Auto SetupInky can try to automatically identify your board (from the information stored on its EEPROM) and set up accordingly. This is the easiest way to work with recent Inky displays.frominky.autoimportautodisplay=auto()You can then get the colour and resolution from the board:display.colourdisplay.resolutionManual SetupIf you have an older Inky without an EEPROM, you can specify the type manually. The Inky library contains modules for both the pHAT and wHAT, load the Inky pHAT one as follows:frominkyimportInkyPHATYou'll then need to pick your colour, one of 'red', 'yellow' or 'black' and instantiate the class:display=InkyPHAT('red')If you're using the wHAT you'll need to load the InkyWHAT class from the Inky library like so:frominkyimportInkyWHATdisplay=InkyWHAT('red')Once you've initialised Inky, there are only three methods you need to be concerned with:Set ImageSet a PIL image, numpy array or list to Inky's internal buffer. The image dimensions should match the dimensions of the pHAT or wHAT you're using.display.set_image(image)You should usePILto create an image.PILprovides anImageDrawmodule which allow you to draw text, lines and shapes over your image. See:https://pillow.readthedocs.io/en/stable/reference/ImageDraw.htmlSet BorderSet the border colour of you pHAT or wHAT.display.set_border(colour)colourshould be one ofinky.RED,inky.YELLOW,inky.WHITEorinky.BLACKwith available colours depending on your display type.Update The DisplayOnce you've prepared and set your image, and chosen a border colour, you can update your e-ink display with:display.show()MigratingIf you're migrating code from the oldinkyphatlibrary you'll find that much of the drawing and image manipulation functions have been removed from Inky. These functions were always supplied by PIL, and the recommended approach is to use PIL to create and prepare your image before setting it to Inky withset_image().1.5.0New: inky impression 7.3" support.BugFix: WIDTH / HEIGHT set on uc8159.1.4.0New: inky SSD1683 support for WHAT variant1.3.2BugFix: (ish) handle busy_wait failure cases for UC8159 (Inky Impression)1.3.1BugFix: unbreak UC81591.3.0New: inky UC8159 support for 4" 640x400 display variantBugFix: fix set_image so it doesn't break set_pixelNew: Added --simulate  to "auto()", so auto examples can simulate a chosen board1.2.2BugFix: Raise Impression/7Color/UC8159 busy wait timeout from 15s to 30s1.2.1BugFix: inky high-temp red fixEnhancement: SSD1608 (250x122) set_border support1.2.0New: inky impression set_border supportBugFix: inky impression orange colourBugFix: inky impression invalid arg bug for Python 2New: inky impression simulator1.1.1Enhancement: drive UC81559 CS with GPIO to avoid conflict with Grow workaroundAdd 7-colour/UC8159 specifics to EEPROMBugFix: define UC8159 colour and size constants in classBugFix: fix auto to grab args properly, support UC8159 and fallback gracefully1.1.0New: Support for UC8159-based 7-colour 600x448 displayEnhancement: auto now includes options for fallbackEnhancement: EEPROM can now give text string for display variant1.0.2Enhancement: Always install Pi dependencies1.0.1Enhancement: Tweak setup.py extras for easier dependency install1.0.0New: Support for SSD1608-based displaysNew: Mock Inky pHAT and wHAT displaysNew: Automatic Inky detection and class constructorEnhancement: Support for alternate i2c_bus when reading eepromEnhancement: Support for alternate spi_busEnhancement: Support for alternate GPIO driverEnhancement: Replaced sys.exit calls with ImportErrorEnhancement: Improved docstrings0.0.5Enhancement: Added support for red/b/w high-temp Inky wHAT0.0.4BugFix: Reverted normal red LUTs to correct values0.0.3Enhancement: Added support for display variant detectionEnhancement: Added DocStringsBugFix: Fixed set_border for all colours0.0.2BugFix: Yellow Inky pHAT now yellow instead of brown/blackEnhancement: Performance tweak for set_image0.0.1Initial Release