Readit News logoReadit News
pomponchik commented on Metacode: The new standard for machine-readable comments for Python   github.com/pomponchik/met... · Posted by u/pomponchik
pomponchik · 9 days ago
In the Python ecosystem, there are many tools dealing with source code: linters, test coverage collection systems, and many others. Many of them use special comments, and as a rule, the style of these comments is very similar.

But you know what? There is no single standard for such comments. Seriously.

The internal implementation of reading such comments is also different. Someone uses regular expressions, someone uses even more primitive string processing tools, and someone uses full-fledged parsers, including the Python parser or even written from scratch.

This is exactly the problem that this library solves. It describes a simple and intuitive standard for action comments, and also offers a ready-made parser that creators of other tools can use.

pomponchik commented on Skelet – Minimalist, Thread-Safe Config Library for Python   github.com/pomponchik/ske... · Posted by u/pomponchik
pomponchik · a month ago
Skelet is a new config storage/validation library for Python. The goal is to provide a minimal API for collecting settings in one place, while ensuring thread safety, transactionality, and type/value correctness. Configs can be loaded and validated from TOML, YAML, JSON, and environment variables.

Most libraries like pydantic-settings or dynaconf are great for model-based settings, but they aren’t thread-safe out of the box and don’t handle config mutation atomically. Skelet manages assignments under per-field mutexes (so you won’t see half-applied values or race conditions in concurrent apps), and it supports field-level docs, validation, secret fields (hiding any type), and hooks for value changes.

Meant for production scenarios where config safety matters (services, CLI tools, distributed systems), but also handy for scripts that need explicit config handling.

pomponchik commented on Superfunctions: A universal solution against sync/async fragmentation in Python   github.com/pomponchik/tra... · Posted by u/pomponchik
pomponchik · 5 months ago
Many old Python libraries got their mirrored async reflections after the popularization of asynchrony. As a result, the entire Python ecosystem was duplicated. Superfunctions are the first solution to this problem, which allows you to partially eliminate code duplication by giving the client the opportunity to choose (similar to how it is done in Zig) whether to use the regular or asynchronous version of the function.

Deleted Comment

pomponchik commented on The simplest package management for Python in runtime   github.com/pomponchik/ins... · Posted by u/pomponchik
pomponchik · 3 years ago
You can use 2 different versions of the same library in the same program. You can use incompatible libraries in the same project, as well as libraries with incompatible/conflicting dependencies. It's easy to share written scripts. The script file becomes self-sufficient - the user does not need to install the necessary libraries. The library does not leave behind "garbage". After the end of the program, no additional files remain in the system.

u/pomponchik

KarmaCake day22May 24, 2022View Original