Skip to content

April of 2021

Projects

DevOps

Continuous Integration

Flakehell

  • Correction: Update the git repository.

    The existent repository has been archived in favor of this one

  • New: Explain how to patch the extended_default_ignore error for versions > 3.9.0.

    Add to your your pyproject.toml:

    [tool.flakeheaven]
    extended_default_ignore=[]  # add this
    

Coding

Python

  • Improvement: Add aiomultiprocess to the list of libraries to test.

    aiomultiprocess: Presents a simple interface, while running a full AsyncIO event loop on each child process, enabling levels of concurrency never before seen in a Python application. Each child process can execute multiple coroutines at once, limited only by the workload and number of cores available.

  • New: Add interesting links on how to write good documentation.

    I would like to refactor divio's and Vue's guidelines and apply it to my projects.

  • Improvement: Add FastAPI docs as a model to study and follow.

  • New: Add apprise to the interesting libraries to explore.

    apprise: Allows you to send a notification to almost all of the most popular notification services available to us today such as: Linux, Telegram, Discord, Slack, Amazon SNS, Gotify, etc. Look at all the supported notifications (¬º-°)¬.

  • New: Add kivi and kivimd to the interesting libraries to explore.

    kivi is used to create android/Linux/iOS/Windows applications with python. Use it with kivimd to make it beautiful, check the examples and the docs.

Boto3

Type Hints

  • Improvement: Explain how to ignore a linter error and a type error.

    With # type: ignore # noqa: W0212

Logging

  • New: Explain how to log python program exceptions better than to a file.

    Using logging to write write exceptions and breadcrumbs to a file might not be the best solution because unless you look at it directly most errors will pass unnoticed.

    To actively monitor and react to code exceptions use an application monitoring platform like sentry.

    In the article I explain what are the advantages of using this solution and do a comparison between Sentry and GlitchTip.

DeepDiff

  • Improvement: Add warning that regular expressions are not yet supported.

    Until #239 is merged, the official library doesn't support searching for regular expressions. You can use my fork instead.

  • Improvement: Remove advice to use my fork instead.

    The original one has already merged my PR \\ ٩( ᐛ )و //. Beware though as the regexp are not enabled by default (against my will). You need to use the use_regexp=True as an argument to grep or DeepSearch.

FactoryBoy

Faker

FastAPI

Pytest

Python Snippets

  • New: Explain how to install dependencies from git repositories.

    With pip you can:

    pip install git+git://github.com/path/to/repository@master
    

    If you want to hard code it in your setup.py, you need to:

    install_requires = [
      'some-pkg @ git+ssh://git@github.com/someorgname/pkg-repo-name@v1.1#egg=some-pkg',
    ]
    
  • Correction: Explain how to create PyPI valid packages with direct dependencies.

    It looks like PyPI don't want pip to reach out to URLs outside their site when installing from PyPI. So you can't define the direct dependencies in the install_requires. Instead you need to install them in a PostInstall custom script. Ugly as hell.

  • Correction: Add warning about the method to use direct dependencies.

    Last time I used this solution, when I added the library on a setup.py the direct dependencies weren't installed :S

NetworkX

  • New: Introduce the python library.

    NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.

Pydantic

rich

  • New: Introduce the python cli builder library and it's progress bar.

    Rich is a Python library for rich text and beautiful formatting in the terminal.

    Check out the beautiful progress bar:

    pip install rich
    python -m rich.progress
    

Ruamel YAML

  • Improvement: Suggest to use ruyaml instead of ruamel.yaml.

    As it's maintained by the community and versioned with git.

sqlite3

TinyDB

SQLite

Operative Systems

Linux

Beets

  • Correction: Typo.

    There was a missing comma in the list.

  • New: Introduce Beets the music management library.

    Beets is a music management library used to get your music collection right once and for all. It catalogs your collection, automatically improving its metadata as it goes using the MusicBrainz database. Then it provides a set of tools for manipulating and accessing your music.

HAProxy

Hushboard

  • New: Introduce Husboard.

    Hushboard is an utility that mutes your microphone while you’re typing.

    (Thanks M0wer!)

ffmpeg

  • New: Introduce the program and multiple of it's uses.

    ffmpeg is a complete, cross-platform solution to record, convert and stream audio and video.

Mopidy

  • New: Introduce the music server.

    Mopidy is an extensible music server written in Python, that plays perfectly with beets and the MPD ecosystem.

    The awesome documentation, being Python based, the extension system, JSON-RPC, and JavaScript APIs make Mopidy a perfect base for your projects.

Arts

Writing

Grammar and Orthography

  • New: Explain when to write won't or wont.

    • Won't is the correct way to contract will not.
    • Wont is a synonym of "a habit". For example, "He went for a morning jog, as was his wont".

Other

  • Correction: Broken links.

    Removed the link to (everything_i_know.md) since it no longer exists. Updated some links that where broken due to a folder structure change.

  • New: Explain how to select a random choice from Enum objects.

    pydantic uses Enum objects to define the choices of fields, so we need them to create the factories of those objects.

  • New: Improve the periodic tasks and application metrics monitoring.

    Setup an healthchecks instance with the linuxserver image to monitor cronjobs.

    For the notifications either use the prometheus metrics or an apprise compatible system.