- Added:
logging.ColoredFormatter
,logging.ColoredLogger
: Generates colored logs. - Added:
text.slugify
: Generate slug from string. - Changed:
functional.classproperty
: Descriptor to change the getter on a classproperty.
- Added:
jsonlines.dump_fork
: Incrementally dumps different groups of elements into the indicatedjsonlines
file. - Added: tests to
json.idump_fork
- Added:
json.idump_fork
: Incrementally dumps different groups of elements into the indicated JSON file. *** Useful to reduce memory consumption ***
- Added:
dictionary.tree
- Added: new tests to
logging
iterator
- Added: new tests to
jsonlines
- Added:
jsonlines module:
Useful functions for working withjsonlines
andndjson
: dumper, dumps, dump, dump_into, load, load_from. TODO: stream compressors:gzip
bzip2
supporting
- Improved:
json.dump_from_csv
reduce memory consumption, now usesidump_into
- Added:
json.idump_lines
- Added:
json.idump_into
- Added:
file.get_valid_filename
- Added:
iterator.partition
- Added:
iterator.normalize_newlines
- Changed: Rename
iterator.has_only_one
toiterator.only_one
- Fixed:
logging.timed_block
docstring - Added:
text.get_random_secret
,text.get_random_string
- Added:
functional.identity
Identity function, as defined in https://en.wikipedia.org/wiki/Identity_function. - Added:
text.multireplacer
Returns a multiple replacement function. - Added:
iterator.ipush
Iterator class supporting append and prepend. - Added:
dates.IsoWeekDay
,dates.WeekDay
enums.
- Fixed
text.multireplace
- Added:
functional.caller
,functional.suppress
- Changed: Moved
retry.retry_if_errors
,retry.retry_if_none
tofunctional.retry_if_errors
,functional.retry_if_none
- Changed:
retry.retry_if_errors
. Usedfunctools.wraps
to apply update_wrapper. - Changed:
file.decompress
. Addedsize
arg. - Changed: Purpose of n arg of
algorithm.fibonacci
. - Changed:
json.dump_into
,json.dump_into_zip
,json.dump_from_csv
. Pass**kwargs
to json.dump/s
- Added:
iterator.mul
,iterator.truediv
,iterator.sub
- Added:
functional.set_attributes
- Added:
json.JSONEncoder
. Handles additional types compared tojson.JSONEncoder
- Changed:
dictionary.DigestGetter
. Now does not support enums and uses the newpymince.json.JSONEncoder
.
- Fixed: README
- Fixed:
dictionary.find_leaf_value
. Infinite recursion for args:key="a", dictionary={"a": "b", "b": "a"}
- Added: New tests. Better coverage
- Added:
text.are_anagram
,text.fullstr.are_anagram
- Added:
unctional.once
- Added:
iterator.centroid
- Added: Upgrade ruff and fix new warnings
- Changed: Remove fn useless
iterator.contains
. Improve performance of otheriterator.py
functions.
- Added: Apply the black code formatter.
- Added: Apply ruff badge to README.
- Added: Install pre-commit. Run black, ruff, flake8 on pre-commit.
- Added: Apply pre-commit badge to README.
- Added:
text.multireplace
- Added:
algorithm.sieve_of_eratosthenes
. Primes less than n. - Added:
functional.pipe
. Pipe function - Improved: iterator:
splitter
,uniques
,uniquer
,consume
,all_equals
,all_identical
,all_equal
,has_only_one
- Added: Changelog
- Added:
json.dump_from_csv
- Added:
text.is_roman
,text.fullstr('').is_roman
- Fixed: ruff warnings