Brought to you by Michael and Brian - take a Talk Python course or get Brian's pytest book

#232: PyPI in a box and a revolutionary keyboard

Published Wed, May 5, 2021, recorded Wed, May 5, 2021

Watch the live stream:

Watch this episode on YouTube
Play on YouTube
Watch the live stream replay

About the show

Sponsored by us! Support our work through:

Special guest: Annette Lewis

Brian #1: Sphinx Themes Gallery update

  • Curated and maintained by @pradyunsg and @shirou.
  • I actually don’t know what it looked like before, but this is great.
  • I’m working on my first real Sphinx project, so this is awesome to have.
  • Features:
    • Main image for each theme shows what theme looks like in wide, narrow, and phone layout
    • Demos (click on an image):
      • Main page that shows you
      • quick start: install and config theme name
      • Link to theme documentation
      • Example of Navigation
    • Kitchen sink
      • paragraph level markup
        • including inline, math, meta, blocks, code with sidebars, references, directives, footnotes, and more
        • API documentation example
        • essential if you are using this for documenting code
    • Lists and tables

Michael #2: Mongita - Like SQLite but for MongoDB

  • Mongita is a lightweight embedded document database that implements a commonly-used subset of the MongoDB/PyMongo interface.
  • Instead of being a server, Mongita is a self-contained Python library
  • Mongita can be configured to store its documents either on disk or in memory.
  • This is a great project to contribute to as a new open source person, details.
  • Uses:
    • Embedded database: Mongita is a good alternative to SQLite for embedded applications when a document database makes more sense than a relational one.
    • Unit testing: Mocking PyMongo/MongoDB is a pain. Worse, mocking can hide real bugs. By monkey-patching PyMongo with Mongita, unit tests can be more faithful while remaining isolated.
  • Limited dependencies: Mongita runs anywhere that Python runs. Currently the only dependencies are pymongo (for bson) and sortedcontainers (for faster indexes).

Annette #3: World Plone Day 2021 - Over 50 Videos from 16 Countries

  • World Plone Day was 24-hour online streaming event held on April 28th 2021.
    • Plone open-source Content Management system, written in Python and built on top of the Zope web framework
  • Plone community produced 56 videos totaling 22 hours of content.
  • More than 50 speakers from 16 countries, 11 languages.
  • All available on Youtube - World Plone Day 2021 playlist
  • Variety of content categories:
    • General Interest
    • Technical Talks
    • Case Studies
    • Plone 6
      • Plone 6 introduction
      • How does Plone 6 work under the hood?
      • Getting Started with Volto Customization

Brian #4: The social contract of open source : view every commit as a gift

  • Brett Cannon
  • Interesting thoughts on what “contract” and what relationship exists between maintainer and user.
  • Great analogy of a stack of USB drives with source code on front lawn with a “FREE” sign.
    • Come by and pick up the latest release whenever you want
    • No guarantee at all
    • Each new version is a gift that you can accept or not
    • Receiver of gift should NOT:
    • knock on front door and yell at developer
    • Leave an angry letter in the mailbox
    • Stand in middle of street in town yelling about how much they hate the software or how much of an idiot the developer is
  • Quote from Immanuel Kant: “Act in such a way that you treat humanity, whether in your own person or in the person of any other, never merely as a means to an end, but always at the same time as an end.”
  • Brett: “… when you treat a maintainer as a fellow human being who may be able to do you a favor of their own volition, then you end up in an appropriate relationship where you are not trying to use the maintainer for something specific.
  • Summary: “Every commit of open source code should be viewed as an independent gift from the maintainer that they happened to leave on their front yard for others to enjoy if they so desire; treating them as a means to and for their open source code is unethical.”

Michael #5: PyPI in a box

  • via Jared Chung
  • Connectivity is still a challenge in many countries, especially Africa
  • Vuyisile Ndlovu created PyPI in a Box. Post PyCon Africa, in the conference slack group, attendees shared the most common problems across the continent, and the state of internet connectivity was the overwhelming response.
  • Vuyisile also references putting “StackOverflow in a box” but the article doesn’t lay out how to do it.

Annette #6: Film simulations from scratch using Python

  • by Kevin Martin Jose
  • Implementing applying CLUTs (Color Look up table) to an image with Python
  • Opens the Image with PIL then converts it into numpy array
  • Iterates through all the pixels values and assigns it to LUT color cell
  • Returns the filtered Image from the array

Extras

Michael

Annette

Joke

A developer-focused keyboard (graphic)


Want to go deeper? Check our projects