Convenient Sequence/Iterable/Collection processing for python. Inspired by Clojure mapping and threading macros.
Project description
trent
Convenient Collection/Sequence/Iterable processing for python.
Inspired by Clojure mapping and threading macros.
Supprot full python12 (and later vesrsion) typing, unlike default map and filter functions.
Which allows for production-grade development.
Provides some work-around for python typing issues (like inability to filter out types from aggregate type).
Provides some auxiliary side funtions, like first, second, nth, getter etc.
Also, provide some additional usefull functionality, like group_by and partition_by (see more examples below)
What is it for
Writing functional, fully typehinted code in a style of Common Lisp / Clojure mappings, with convenience of Clojure funcall threading (->, ->>, as-> macroses), but with python native syntax (without trying to force-fit any other syntax in)
And more:
- Processing Iterables in a functional manner, with lazy evaluation (in most cases)
- Iterating, concating, grouping and collecting elements of given sequences quickly.
- Prototyping code in quick, readable and maintanable manner.
- Writing fully typehinted code (unlike default map/filter)
- Built-in assyncronous calls (mapping, filtering etc.)
- Reducing resulting iterables.
What is it NOT for
trent - is keps simple for a reason. Don't try to use it for more than it designed for.
- Not for high load / high performance Sequences processing (although - it supports parallel-map)
- Not for processing table-like data. Just use pandas/polars/pyspark for that.
trentis more suitable for processing each element individually
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trent-0.4.3.tar.gz.
File metadata
- Download URL: trent-0.4.3.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f68486a5558fdbc5b18929d134c7646ca44f74788cfe866defa5e5953353b2d
|
|
| MD5 |
ae39ea98af8b114eac06a2209a8d1684
|
|
| BLAKE2b-256 |
412ce8f901bebba68d635a049d5cc99f567bccac4e7fcb70fc71a54e93b8b145
|
File details
Details for the file trent-0.4.3-py3-none-any.whl.
File metadata
- Download URL: trent-0.4.3-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2296b7018994ba9019fb8fecbbbc4e73fc8a4307d9c4bb243ad14a63a82da03b
|
|
| MD5 |
3bf099ab105d148cbcb11fec2bce6885
|
|
| BLAKE2b-256 |
8dc715562f9d5fe082cb36067d6507129893cfd31e5c715ccb0e33b7f953b1a7
|