#80 Dan Bader drops by and we found 30 new Python projects

Python Bytes - A podcast by Michael Kennedy and Brian Okken - Luni

Categories:

Sponsored by DigitalOcean: pythonbytes.fm/digitalocean

Brian #1: Packaging Python Projects

  • Tutorial on the PyPA has been updated.
  • Includes README.md instead of REAMDE.rst
  • Initial example of setup.py no longer too minimal or too scary.
  • Discussion of using twine to upload to test.pypi.org/legacy before uploading to non-test pypi
  • Related project, flit

Dan #2: gidgethub — An async library for calling GitHub’s API

  • Talk to GitHub API to add/modify issues, pull-requests, comments, …
  • Also helpers to parse GitHub’s webhook events so you can write bots that react to new issues, comments, commits etc.
  • Used it in @Mariatta’s GitHub Bot tutorial:https://github.com/Mariatta/github-bot-tutorial
  • Cool architecture for a “modern” Python web API library (async, sansio, decorator based event callbacks)
    • supports different async backends: aiohttp, treq, Tornado
      • sans-I/O: “protocol implementations written in Python that perform no I/O (this means libraries that operate directly on text or bytes)”
      • Why? → “reusability. By implementing network protocols without any I/O and instead operating on bytes or text alone, libraries allow for reuse by other code regardless of their I/O decisions. In other words by leaving I/O out of the picture a network protocol library allows itself to be used by both synchronous and asynchronous I/O code”
  • (Biggest issue in that workshop was getting everyone upgraded to Python 3.6…but more on that later)

Michael #3: pystemd

  • Recall I recently build a Python-based systemd service for geo syncing my course materials
  • A thin Cython-based wrapper on top of libsystemd, focused on exposing the dbus API via sd-bus in an automated and easy to consume way.
  • By Alvaro Leiva, a production engineer at Facebook / Instagram
  • Presented at PyCon 2018
  • Systemd:
    • Manages your services and their lifetimes
    • e.g. I want my web app to start on boot but only after mongodb has started
  • pystemd lets you control and query these from a Python API

Brian #4: PyCharm 2018.2 EAP 1 includes improved pytest support

  • From Bruno Oliveira
    • “Oh my, full support for #pytest fixtures and parameterized tests coming in @pycharm 2018.2.“
  • “PyCharm 2018.2 supports using fixtures in Pytest. Using fixtures allows you to separate your setup code from the actual tests, making for more concise, and more readable tests. Additionally, there have been improvements to code navigation and refactoring Pytest tests, and to using parameterized tests.”
  • It’s hard for me to fully express how FREAKING EXCITED I am about this.
  • auto-complete now works with fixtures to test functions
  • goto declaration now works with fixtures to test functions
    • (not fixtures of fixtures, but they know about that already)
  • re-running a failed parametrization works (yay!)
  • re-running a single parametrization works (yay!)

Dan #5:

  • Why is installing Python 3.6 so hard? (Recent GitHub Bot workshop experience)
  • Sometimes hard to tell what’s easy/difficult for beginners
  • People hit crazy edge cases:
    • running Linux Subsystem for Windows (WSL) on Windows host, install Python into wrong environment
    • broken PPAs + bad StackOverflow advice → broken SSL and no pip on Ubuntu (deadsnakes PPA is the way to go)
    • People install multiple Python environments: Anaconda + python.org distribution
    • Hard to find instructions for compiling from source on Linux
  • Shameless plug: realpython.com/installing-python

Michael #6: 30 amazing Python projects (2018 edition)

  • Mybridge AI evaluates the quality by considering popularity, engagement and recency. To give you an idea about the quality, the average number of Github stars is 3,707.
  • No 30: PDFTabExtract: A set of tools for extracting tables from PDF files helping to do data mining on scanned documents.
  • No 28: Surprise v1.0: A Python scikit for building and analyzing recommender systems
  • No 27: Eel: A little Python library for making simple Electron-like HTML/JS GUI apps
  • No 25: Clairvoyant: A Python program that identifies and monitors historical cues for short term stock movement — Have you seen The Wall Street Code - VPRO documentary?
  • No 21: Fsociety: Hacking Tools Pack. A Penetration Testing Framework.
  • No 18: Maya: Datetime for Humans in Python
  • No 16: Better-exceptions: Pretty and useful exceptions in Python, automatically
  • No 13: Apistar: A fast and expressive API framework. For Python
  • No 8: MicroPython: A lean and efficient Python implementation for microcontrollers and constrained systems
  • No 6: spaCy (v2.0): Industrial-strength Natural Language Processing (NLP) with Python and Cython
  • No 2: Pytorch: Tensors and Dynamic neural networks in Python with strong GPU acceleration
  • No 1: Home-assistant (v0.6+): Open-source home automation platform running on Python 3

Our news

Visit the podcast's native language site