Metadata-Version: 2.1
Name: ez_credentials
Version: 1.2.2
Summary: Easy credentials management using keyring
License: MIT
Keywords: credentials,keyring
Author: Christophe Druet
Author-email: christophe@stoachup.com
Maintainer: Christophe Druet
Maintainer-email: christophe@stoachup.com
Requires-Python: >=3.10,<3.13
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: keyring (>=25.2.1,<26.0.0)
Requires-Dist: loguru (>=0.7.2,<0.8.0)
Requires-Dist: pyjwt (>=2.8.0,<3.0.0)
Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
Requires-Dist: requests (>=2.32.3,<3.0.0)
Requires-Dist: validators (>=0.33.0,<0.34.0)
Requires-Dist: yarl (>=1.9.4,<2.0.0)
Description-Content-Type: text/markdown

# Easy credentials

Simple set of classes to manage credentials (user/pwd, token...)

## Installation

Classic through pip or your favourite package manager:

```shell
pip install ez-credentials
```

## Usage

Instantiate a credential manager. The instance is callable and returns the credentials. You can also get the credentials as a dictionnary or as a tuple.

```python
from ez_credentials import CredentialManager

cred = CredentialManager('test')

cred()
```

You'll be prompted for your credentials. They will be stored in your keyring. 

'test' is the name of the service. You can define several credential managers with different service names.

Optionally, you cat set how long the credentials should be stored, i.e. how frequently the password is asked for.
This is defined in seconds, and default to 30 days.

```python
from time import sleep
from ez_credentials import CredentialManager

cred = CredentialManager('test', expires_in=1)

cred()
sleep(1)
cred()
```

There are other classes (TokenManager, TokenCredentialManager, WebServiceTokenManager and WebServiceTorkenManager; and some aliases).

