#4: Python - aiomonitor, Frogmouth, EVA and AIOFile
Asyncio monitoring and debugging, Markdown browser in your Terminal, new AI-relational database and real AIO file operations
Welcome to Behind the Mutex! Our weekly newsletter summarizes notable activity in open-source, new and growing projects and releases.
In Case You Missed It
Explore the LangChain codebase with our latest review:
The previous issue of our weekly newsletter:
Learn about GitHub Copilot for CLI and its current limitations:
Open Source Landscape
Behind the Mutex picks a few categories and explores new and popular projects and features there.
Python
Having surpassed all other languages for last two years in the TIOBE index, Python is getting more and more popular, thanks to its multi-purpose capabilities, vast collection of high-quality packages and its great community. Thus, Behind the Mutex is set to be covering the Python ecosystem on a regular basis.
aiomonitor: https://github.com/aio-libs/aiomonitor
aiomonitor is a Python package that facilitates real-time monitoring and debugging of asyncio-driven applications. If installed and enabled in a codebase, the tool listens to a port and offers a remote command line interface into its process. Clients, such as telnet
or netcat
, can connect to the remote process and get real-time insights related to the state of asyncio within it. What’s included:
Tasks
tracking and managementList running and terminated Tasks
Cancel Tasks
Show Tasks’ stack frames and their task creation chains
Async REPL is available for deeper investigation and debug
aiomonitor-ng, an aiomonitor fork by Joongi Kim was recently merged back into its upstream, bringing some great new features into the project:
Revised TUI using prompt-toolkit and click
Multiple concurrent connections
Advanced Tasks tracking, covering Task creation and cancellation chains and termination history
Better Tasks filtering
For now all these new features are available via the main branch on GitHub and likely will soon be released to PyPI.
Frogmouth: https://github.com/Textualize/frogmouth
Have you ever looked for a Markdown browser for your Terminal? We at Behind the Mutex certainly have, unsuccessfully. Now with Frogmouth the situation has changed. The tool offers web-browser like functionality for viewing and navigating *.md
files, including history, bookmarks, table of contents and more. Here’s what comes bundled:
The local file browser for navigating to your
*.md
filesA CLI with commands to open
*.md
files hosted by GitHub, GitLab and BitBucketDark/light themes, and more
pipx is the recommended way to install Frogmouth and similar tools that you would like to be available globally in your shell, without installing packages and their dependencies into the global site-packages of your interpreter or manually managing a virtual environment per tool.
Frogmouth comes from the team who also brought us Rich and Textual, which are powerful tools for building CLI and TUI in Python, also featured in one of our previous issues of the weekly newsletter:
EVA: https://github.com/georgia-tech-db/eva
How about embedding deep learning models right into a relational database? EVA is a new project that aims to support AI-powered database applications that operate on both structured (tables) and unstructured data (videos, text, podcasts, PDFs, etc.) with deep learning models.
EVA offers an AI-oriented query language for analyzing unstructured data, and treats deep learning models as functions similar to traditional SQL functions like SUM()
. The database comes with a wide range of models for analyzing unstructured data, including models for image classification, object detection, OCR, text sentiment classification, face detection, etc, as well as many cost-effective optimizations inspired by other RDBMs. EVA also allows extending the range of available models by declaring user-defined functions.
AIOFile: https://github.com/mosquito/aiofile
AIOFile brings real asynchronous file operations to asyncio. To avoid blocking the event loop on various FS-related syscalls, such operations would typically be offloaded to dedicated threads where they can block the execution. aiofiles is a popular choice that wraps many such calls into an async interface. But AIOFile brings Linux-native AIO implementation based on libaio.
The library automatically selects the underlying implementation based on system compatibility, falling back to using threads.
AIOFile exposes async_open
as an entry point to its high-level API, returning binary and text file wrappers with a set of async methods, such as read
, write
, readline
.
For more sophisticated cases the library offers the AIOFile
class that allows more granular control, allowing manual offset management. An example might be multiple tasks concurrently writing to different positions within a single file.
If you have any feedback or would like to see certain open-sources projects highlighted in our upcoming summaries and reviews, please feel free to comment, send an email or DM the author on Twitter @dalazx.
Until next Tuesday,
Behind the Mutex.