Cerberus v1.3.5 released

Thanks to funkyfuture’s tireless work, yesterday we released version 1.3.5 of Cerberus, the data validation package for Python. This release officially supports Python 3.10 and 3.11, fixes a few issues, and proudly displays a new documentation theme which I dig, and I hope you’ll do the same. As usual, see the changelog for details. Subscribe to the newsletter, the RSS feed, or follow me on Mastodon »

Events 0.5 released

Today I released Events 0.5. Thanks to Cailean Parker’s contribution, we added support for the __getitem__ dunder (aka Python magic method.) This allows the calling of events from strings, thus enabling dynamic events. For instance: events = Events(tuple(f"on_{i}" for i in range(5))) for i in range(5): events[f"on_{i}"](i) The C# language provides a handy way to declare, subscribe to and fire events. In C#, an event is a “slot” to which callback functions (event handlers) can be attached - a process referred to as subscribing to an event. »

Python `decimal.getcontext` does not work with bpython

I have been working on a side project for which I’m using bpython, a “fancy interface to the Python interpreter.” If you use the Python REPL often, you should check it out. It offers unique features like in-line syntax highlighting, readline-like autocomplete, a “rewind” function to pop the last line of code from memory, auto-indentation and more. Anyway, today I found a bug in bpython, and that’s that Python’s decimal.getcontext() does not work with it. »

Eve 2.1.0 has just been released

Today I released Eve v2.1, which comes with official Flask 2.2+ support and the ability to modify the pagination limit on a per-resource basis thanks to the new pagination_limit setting. You can find the release on PyPI, while the changelog is available here—special thanks to Pieter De Clercq and smeng9 for the help with this release. Subscribe to the newsletter, the RSS feed, or follow me on Mastodon »

The Origins of Python

Yesterday the creator of the Python language, Guido van Rossum, tweeted about The Origins of Python, an essay by his mentor, Lambert Meertens. “On Sunday, June 21, 1970, in an office building on Great Portland Street in London, a teletype sprang to life. Under the heading “HAPPY FAMILIES,” the machine rattled out a sequence of English sentences, such as “THE DOG SITS ON THE BABY” and “UNCLE TED PLAYS WITH SISTER. »

Eve 2.0.4 released

I just released Eve 2.0.4, the REST API framework for #python. It’s available on PyPI and includes a relevant security fix so you might want to update ASAP. Package info Docs Subscribe to the newsletter, the RSS feed, or follow @nicolaiarocci on Twitter »

Eve 2.0.2 released

Eve 2.0.2 was just released today. It fixes a problem introduced with v2.0 in which ETag generation failed if uuidRepresentation was not set in MONGO_OPTIONS. See issue #1486 for details. Many thanks @tgm for reporting and then contributing the fix. Subscribe to the newsletter, the RSS feed, or follow @nicolaiarocci on Twitter »

The Docker Event Monitor

I added a new tool to my amateurish DevOps toolbox. Developed in the open by Tom Williams, the Docker Event Monitor is a “tiny container that monitors the local Docker event system in real-time and sends notifications to various integrations for event types that match the configuration. For example, you can trigger an alert when a container is stopped, killed, runs out of memory or health status change.” At its core sits a simple python script that monitors the docker. »

Eve 2.0.1 released

Today I released Eve 2.0.1, which contains an essential fix if you’re using MONGO_URI to connect to your MongoDB instance. See the relevant ticket for details. I’ve also pinned Flask dependency to v2.1, as v2.2 brings some breaking changes that, you guessed it, break our CI runs. If you think you can help wiht that, please do so. The complete changelog is available here. Subscribe to the newsletter, the RSS feed, or follow @nicolaiarocci on Twitter »

"A project you maintain has been designated as critical"

Last week, I got a mail from PyPI, the Python package index. They informed me that one of my open source projects had been designated as ‘critical,’ and I was therefore required to enable two-factor authentication. If I didn’t oblige, I would soon lose the ability to add new releases or modify the project. The project in question was Cerberus. The ‘critical’ designation happens when a project has been in the top 1% of downloads over the prior six months. »

Eve 2.0 released

It’s been a long time coming, but I’m glad to announce that Eve 2 has finally been released today. This release drops support for Python 2, Python 3.5 and Python 3.6 hence the major version bump. Other than that, expect some fixes, a new uuidRepresentation setting for MONGO_OPTIONS, and an alignment to the latest Werkzeug/PyMongo idiosyncrasies. The full changelog is available on the project website. The Eve project has been out for ten years. »

Eve-Swagger v0.2 released

I just released Eve-Swagger v0.2 on PyPI. Eve-Swagger is a Swagger/OpenAPI extension for Eve powered RESTful APIs. This maintenance release addresses a few issues and adds support for eve-auth-jwt. Many thanks to Roberto Romero for his contributions to this release. Subscribe to the newsletter, the RSS feed, or follow @nicolaiarocci on Twitter »

Work in progress on Eve 2.0

I’ve been back at the forge working on Eve 2.0. Version 2 will support Python 3.7+ and drop Python 2.7, 3.5 and 3.6. It will bring support for PyMongo 4+ as well, along with several other minor fixes and improvements (changelog). It would be nice if you guys and gals, users of Eve, would give it a spin before the release. I know. I recently stated that Eve was in maintenance mode. »

Is Eve still maintained?

Tonight someone opened a ticket on the Eve repository. I jotted down a quick reply and was about to hit the Comment button when I thought a more articulated reply was in order. I also want it published on my website. So the question is: Is Eve still maintained? My reply goes like this: Hello, yes, Eve is in ‘maintenance mode’, as I call it. I don’t actively develop new features anymore. »

My DotNetPodcast interview

Today I was interviewed by Mauro Servienti on the DotNetPodcast. The theme was my experience as an open-source maintainer on both the Python and C# stacks. We also discussed the ongoing evolution of the dotNET ecosystem, touching on a few tangent topics. The recording is in Italian and is available below here. Listen to “Python, Eve, open source e fattura elettronica. Con Nicola Iarocci” on Spreaker. Subscribe to the newsletter, the RSS feed, or follow @nicolaiarocci on Twitter »

Flask 2.0

Flask 2.0 has just been released. Along with it come many other major satellite releases: Werkzeug 2.0, Jinja 3.0, Click 8.0, ItsDangerous 2.0, and MarkupSafe 2.0. Across all projects, Python 3.6+ is now required, and comprehensive type annotations are supported. At a glance, I’d say that the biggest news is async views in Flask 2. Work has also been done around Werkzeug Request and Response classes to allow for better sync and async in the future (it’s not a public API yet. »

New Eve-Swagger and Flask-Sentinel releases

It’s maintenance day in my little Python world. I just released new versions of two small but apparently quite popular packages: eve-swagger, the OpenAPI/Swager extensions for Eve-powered APIs, hits v0.1.4. It’s just a single fix for API breakage introduced with the previous release; details available here. Thanks to Asger Gitz-Johansen for the help with this release. Flask-Sentinel, an Oauth2 Provider for Flask, hits v0.0.8. This also is a small release that fixes 500 errors if you were using unpinned versions of redis. »

Musings on Python's Pattern Matching

Pattern Matching is coming to Python, and I am not sure I like it. Don’t get me wrong, I love pattern matching. I use it all the time in F#. I am sure that once it lands in the language, it will be wildly adopted. So what’s the problem with Python’s pattern matching? The community, some core developers included, has expressed several concerns. The Python Steering Council has acknowledged them and is willing to look into improvements should they be proposed. »

When Homebrew breaks your Python virtual environment

Ever had your old, trusty Python virtual environment fail on you? I sure did. Sometimes, when I activate or switch between virtual environments, I get the following error: $ workon eve dyld: Library not loaded: @executable_path/../.Python I never really took the time to look into it. When this happens, because I am in a rush (and because I am a lazy old fart), I shrug it off, recreate the virtual environment on the spot, and get back to work. »

Python Workload now officially supported in Visual Studio 2017

Visual Studio 2017 just received an update (version 15.2). Among other nice things, this update brings full support for Python back into the official release of VS2017. As you might recall (see my old whiny post), previously Python was only available with Visual Studio 2017 Preview (a separate install). I just upgraded my copy of Visual Studio, added the Python Development Workload to it via the VS Installer, and finally (and very happily) uninstalled the whole Visual Studio Preview thingie. »