Type-checked, dependency-free utility library for modern Python
Project description
Eos-core
Type-checked, dependency-free utility library for modern Python
Introduction
My voyage through the vast and fascinating universe of Python started back in 2004 - when Python 2.3 was still the latest, exciting release... 😊
Since then, both the language and its ecosystem have evolved a lot: in particular, I feel that type hints make Python even more robust, without sacrificing its charming syntax - just like another language I'm fond of: TypeScript.
Consequently, the Eos library is designed to provide a set of shared utilities and patterns emerged during the creation of my open source projects with modern, type-checked Python - and this core package only builds upon the standard library, with no additional runtime dependencies.
For further details, please refer to the sections below, to the documentation within each module, and even to the tests - whose coverage is more than 97%! ^__^
Installation
To install eos.core, just run:
pip install info.gianlucacosta.eos.core
or, if you prefer using Poetry:
poetry add info.gianlucacosta.eos.core
Then, you'll be able to access the info.gianlucacosta.eos.core package and its subpackages.
Highlights
eos.core provides a wide variety of patterns - including:
-
higher-order functional abstractions, such as functions returning adaptable queue writers and readers - whose timeouts vary according to the queue state
-
a disposable TemporaryPath - and a Uuid4TemporaryPath string subclass that perform advanced cleanup, no matter whether you create a file or a whole directory tree upon it
-
a BufferedDbSerializer - using advanced but simple decorators to serialize objects of different types via dedicated SQL statements, but actually writing to DB only when the internal buffer is full
-
an InThreadPool class having the same interface as Python's Pool - but running within the very same thread: definitely handful when debugging and testing
-
a CancelableThread and the related CancelableThreadHandle - enabling the client to send a cancelation request
-
an Atomic class, to read and update arbitrary values atomically
-
a functional module, with expressive type aliases for functions - with ideas borrowed from other languages such as C#, Java and Rust
...and more! ^__^ It's definitely not easy to mention everything in a README file, so please feel free to browse the modules and explore how they are used in the tests!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file info.gianlucacosta.eos.core-1.0.0.tar.gz
.
File metadata
- Download URL: info.gianlucacosta.eos.core-1.0.0.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.4 Linux/5.13.0-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b19503485674e4e400de1bbb4408d0e802538395d6d929a61d5b36bde93284c |
|
MD5 | b2f57e0e71a6ec0cc5427b62a6fee6dd |
|
BLAKE2b-256 | 1bab264dc1326ae93f319477f57d44c86dd3476e2a142aace52ac617984bfa33 |
File details
Details for the file info.gianlucacosta.eos.core-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: info.gianlucacosta.eos.core-1.0.0-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.4 Linux/5.13.0-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5302bddf62a3dc27b8fab52f3059b21c38abff03dd72c9084b3cfd2fc36e4a9 |
|
MD5 | 1b0ae7416a7bf61194db62815afa27df |
|
BLAKE2b-256 | ecb5e17315860792b5c16e7dd9f6cacd30bba60372e6c336fcbb074d0afd2a1e |