Metadata-Version: 2.4
Name: essentials
Version: 1.1.7
Summary: General purpose classes and functions
Project-URL: homepage, https://github.com/Neoteroi/essentials
Author-email: Roberto Prevato <roberto.prevato@gmail.com>
License: MIT License
        
        Copyright (c) 2019 Roberto Prevato
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: core,utilities
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Description-Content-Type: text/markdown

![Build](https://github.com/Neoteroi/essentials/workflows/Build/badge.svg)
[![pypi](https://img.shields.io/pypi/v/essentials.svg)](https://pypi.python.org/pypi/essentials)
[![versions](https://img.shields.io/pypi/pyversions/essentials.svg)](https://github.com/Neoteroi/essentials)
[![license](https://img.shields.io/github/license/Neoteroi/essentials.svg)](https://github.com/Neoteroi/essentials/blob/master/LICENSE)
[![codecov](https://codecov.io/gh/Neoteroi/essentials/branch/master/graph/badge.svg?token=sBKZG2D1bZ)](https://codecov.io/gh/Neoteroi/essentials)

# Essentials
Core classes and functions, reusable in any kind of Python application.

```bash
$ pip install essentials
```

**Features:**
* [exception classes to express common scenarios](https://github.com/Neoteroi/essentials/wiki/Common-exceptions)
* [friendly JSON encoder](https://github.com/Neoteroi/essentials/wiki/User-friendly-JSON-dumps), handling `datetime`, `date`, `time`, `UUID`, `bytes`, built-in enums, and instances of classes implementing a `dict()` method, like [pydantic BaseModel](https://pydantic-docs.helpmanual.io)
* utilities to work with `folders` and paths
* [`StopWatch` implementation](https://github.com/Neoteroi/essentials/wiki/StopWatch-implementation)
* [a base class to handle classes that can be instantiated from configuration dictionaries](https://github.com/Neoteroi/essentials/wiki/Registry)
* [common decorator to support retries](https://github.com/Neoteroi/essentials/wiki/Retry-decorator)
* [common decorator to support logging function calls](https://github.com/Neoteroi/essentials/wiki/Logs-decorator)
* [common decorator to control raised exceptions](https://github.com/Neoteroi/essentials/wiki/Exception-handle-decorator)
* [caching functions](https://github.com/Neoteroi/essentials/wiki/Caching)

## Documentation
Please refer to documentation in the project wiki: [https://github.com/Neoteroi/essentials/wiki](https://github.com/Neoteroi/essentials/wiki).

## Develop and run tests locally
```bash
pip install -r requirements.txt

# run tests using automatic discovery:
pytest

# with code coverage:
make testcov
```
