ubelt
trio
ubelt | trio | |
---|---|---|
7 | 19 | |
712 | 5,917 | |
- | 1.3% | |
8.3 | 9.4 | |
7 days ago | 1 day ago | |
Python | Python | |
Apache License 2.0 | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ubelt
-
Python libs that I wish were part of the standard library
I can't give you a stdlib, but I can give you a package with a lot of the basic functionality but still small enough that it installs quickly and has negligable overhead. The ubelt library is a set of 100ish utility functions and classes. It's similar to boltons, but I suppose it reflects a different perspective on what's useful.
-
How do you feel about vendored packages?
Number 3 is the one I feel most conflicted about. Specifically, I tout my ubelt library as having 0 required dependencies. However, it vendors two libraries: progiter and orderedset. The first of which I also maintain and the second of which I don't maintain, but have contributed to. It feels odd to have a single dependency for a library that would otherwise have zero. But at the same time it feels odd to maintain that code myself. Also if I didn't vendor it, it would not be included in the documentation, so there is that. I've recently been thinking I should split ubelt up into many smaller packages and then use ubelt as a "hub" to include them all. However, that's a lot more work than just maintaining one (still quite small) package, and I think having everything broken up with incur a lot of overhead at pip install time, so I'm very conflicted on the whole subject.
- Useful helper libraries
-
Python projects with best practices on Github?
I'm fairly happy with my ubelt library.
-
[D] What is some cool python magic(s) that you've learned over the years?
The ubelt.util_platform module is a good example of including references to similar functionality.
-
[P] best-of-ml-python: A ranked list of awesome machine learning Python libraries
I also have a utility library ubelt with 552 stars and 6.9k downloads / month.
trio
-
trio VS awaits - a user suggested alternative
2 projects | 9 Dec 2023
-
In what ways are channels are better than the traditional await?
Incidentally, the alternative event loop implementation trio in python does not have "gather", you also need channels, and it's a deliberate design choice - there is some discussion about that in this ticket https://github.com/python-trio/trio/issues/2188
- Polyphony: Fine-Grained Concurrency for Ruby
-
This Week In Python
trio – a friendly Python library for async concurrency and I/O
-
Python projects with best practices on Github?
trio. the best code, the best documentation, awesome community.
- Trio: Structured Concurrency for Python
-
The Heisenbug lurking in your async code (Python)
I'll +1 the Trio shoutout [1], but it's worth emphasizing that the core concept of Trio (nurseries) now exists in the stdlib in the form of task groups [2]. The article mentions this very briefly, but it's easy to miss, and I wouldn't describe it as a solution to this bug, anyways. Rather, it's more of a different way of writing multitasking code, which happens to make this class of bug impossible.
[1] https://github.com/python-trio/trio
[2] https://docs.python.org/3/library/asyncio-task.html#task-gro...
-
The gotcha of unhandled promise rejections
It's similar to manual memory management.
Structured concurrency is one approach to solving this problem. In a structured concurrency a promise would not go out of scope unhandled. Not sure how you would add APIs for it though.
See Python's trio nurseries idea which uses a python context manager.
https://github.com/python-trio/trio
I'm working on a syntax for state machines and it could be used as a DSL for promises. It looks similar to a bash pipeline but it matches predicates similar to prolog.
In theory you could wire up a tree of structured concurrency with this DSL.
https://github.com/samsquire/ideas4#558-assign-location-mult...
-
Python Asyncio: The Complete Guide
Not complete - doesn't include Task Groups [1]
In fairness they were only included in asyncio as of Python 3.11, which was released a couple of weeks ago.
These were an idea originally from Trio [2] where they're called "nurseries" instead of "task groups". My view is that you're better off using Trio, or at least anyio [3] which gives a Trio-like interface to asyncio. One particularly nice thing about Trio (and anyio) is that there's no way to spawn background tasks except to use task groups i.e. there's no analogue of asyncio's create_task() function. That is good because it guarantees that no task is ever left accidentally running in the background and no exception left silently uncaught.
[1] https://docs.python.org/3/library/asyncio-task.html#task-gro...
[2] https://github.com/python-trio/trio
[3] https://anyio.readthedocs.io/en/latest/
- Anyone here able to help with a python issue?
What are some alternatives?
best-of-web-python - 🏆 A ranked list of awesome python libraries for web development. Updated weekly.
uvloop - Ultra fast asyncio event loop.
best-of-python-dev - 🏆 A ranked list of awesome python developer tools and libraries. Updated weekly.
curio - Good Curio!
best-of-jupyter - 🏆 A ranked list of awesome Jupyter Notebook, Hub and Lab projects (extensions, kernels, tools). Updated weekly.
asyncio
best-of-python - 🏆 A ranked list of awesome Python open-source libraries and tools. Updated weekly.
Twisted - Event-driven networking engine written in Python.
fastcore - Python supercharged for the fastai library
LDAP3 - a strictly RFC 4510 conforming LDAP V3 pure Python client. The same codebase works with Python 2. Python 3, PyPy and PyPy3
best-of-ml-python - 🏆 A ranked list of awesome machine learning Python libraries. Updated weekly.
DearPyGui - Dear PyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies