- Update dependency version for regex
- Fixed
iterating/flatten
to only flatten list, tuple, range, set, and frozenset
- Added WIP typing
- Added
iterating/uniq_by
to remove duplicates from an iterable while keeping the items' order with a user-supplied callable - Added
accessing/pick
to fetch key/value pairs with given keys from a dictionary - Added
accessing/values_at
to retrieves values from each given keys in dictionary - Updated
accessing/dig
to support sequences and their indices - Fixed
iterating/flat_map
to correctly load flatten method - Typed the methods listed above
- Updated dependencies
- Dropped support for Python 3.7
- Added python 3.12 in the CI tests
- Updated dependencies
- Updated dependencies
- Updated github actions
- Updated pypi upload
- Fix dependencies
- Updated dependencies
- Updated dependencies
- Added python 3.11 in the CI tests
- Fixed
accessing/dig
to handle cases where the value isNone
- Updated dependencies
- Updated
caching/cache
to accept a global ttl at init - Dropped support for Python 3.6
- Fixed github actions to use python version as strings instead of floats to handle python 3.10
- Added
EncryptedFile
to expose a mechanism to read and write encrypted contents to a file:- The contents can also be optionally serialized/deserialized
- Updated main python version to 3.10
- Fixed an error happening when trying to use
formatting/pluralize()
and/orformatting/singularize()
:- The locales where not packaged as there was no __init__.py file, leading to
i16g/Locale
not finding them
- The locales where not packaged as there was no __init__.py file, leading to
- Fixed
iterating/uniq()
by using therepr()
of each item to handle unhashable types - Fixed
iterating/flatten()
to handle strings - Updated dependencies
- Marked the project as "Production/Stable" on PyPI
- Switched pdoc3 for mkdocs
- Migrated from single and double quotes to double quotes only
- Added
iterating/flat_map()
, that applies a function to every item and nested item of the given iterable - Removed all "# coding: utf-8" headers, since they're actually useless
- Added the
accessing/
module, containing helpers to access values in maps and iterables:dig()
repeatedly access keys to find a nested value within a dict
- Added the
caching/
module, containing caching helpers:Cache
supports several cache stores: in-memory, disk, Redis, and Memcached@cached
caches a callable's return value based on its arguments
- Added the
debugging/
module:xp()
prints debug information about its given arguments@profiled
collects and dumps profiling stats over a callable's executioncaller()
allows a developer to print debug information about a callable's callerget_callable()
extracts a callable instance from a frameget_call_context()
finds and returning the code context around a call made in a frameget_frameinfo()
implements a fasterinspect.stack()[x]
- Added the
formatting/
module, a collection of helper functions:oxford_join()
joins strings in a human-readable waytransliterate()
represents unicode text in ASCII (using Unidecode)camelize()
transforms any case to camelCasepascalize()
transforms any case to PascalCasesnakeize()
transforms any case to snake_casekebabize()
transforms any case to kebab-caseparameterize()
formats a given string to be used in URLsordinalize()
represents numbers in their ordinal representationsadverbize()
represents numbers in their numeral adverb representationstruncate()
truncates long sentences at a given limit and append a suffix if neededsingularize()
returns the singular form of a given wordpluralize()
returns the plural form of a given word
- Added the
iterating/
module, containing several helpers for iterables:renumerate()
enumerates an iterable starting from its endchunks()
splits an iterable into smaller chunks, padding them if requestedpartition()
splits an iterable into the items that validated the given predicate and the othersuniq()
removes duplicates from an iterable while keeping the items' ordercompact()
removes None values from an iterableflatten()
unpacks nested iterable into the given iterable
- Added the
i16g/
module, to help with locale management:Locale
dynamically loads localization files from a package path
- Added the
importing/
module, a collection of helpers for dynamic importing:import_class_from_path()
fetches a class from a package path and returns itimport_module_from_path()
exposes the contents of a module as globals from a package path
- Added the
logging/
module, containing drop-in configurations, and custom handlers for logging:DEFAULT_CONSOLE_CONFIGURATION
prints logs to stderr with a sensible set of informationDJANGO_CONSOLE_CONFIGURATION
prints logs to stderr with the same formatting as Django's loggerFLASK_CONSOLE_CONFIGURATION
prints logs to stderr with the same formatting as Flask's loggerPYRAMID_CONSOLE_CONFIGURATION
prints logs to stderr with the same formatting as Pyramid's loggerRAILS_CONSOLE_CONFIGURATION
prints logs to stderr with the same formatting as Ruby-on-Rails' loggerAffixedStreamHandler
allows custom prefix/suffix to customize the way log records are emitted@muted
silences all (or selected) loggers during a callable's execution
- Added
Borg
that exposes a class useful to produce a singleton behaviour across multiple instances - Added
Sentinel
which exposes a class that can be used to implement the Sentinel design pattern - Added
Singleton
that exposes a metaclass useful to implement the Singleton design pattern - Added
@classproperty
that combines @classmethod and @property (with support for @attr.setter) - Added
@deprecated
to document deprecated callables with a explicit message - Added
@retryable
, retries failing executing of a callable - Added
@sampled
that implements sampling strategies to filter calls made to a callable - Added
@timed
which measures and prints the execution time of a callable - Added
@timeoutable
that stops the execution of a callable if its run time is too long