ez_credentials


Nameez_credentials JSON
Version 1.2.0 PyPI version JSON
download
home_pageNone
SummaryEasy credentials management using keyring
upload_time2024-08-31 08:23:59
maintainerNone
docs_urlNone
authorChristophe Druet
requires_python<3.13,>=3.10
licenseMIT
keywords credentials keyring
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ez_credentials",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.10",
    "maintainer_email": null,
    "keywords": "credentials, keyring",
    "author": "Christophe Druet",
    "author_email": "christophe.druet@entsoe.eu",
    "download_url": "https://files.pythonhosted.org/packages/39/e7/82ca7833b00b70311d4ba7264066b2682ad666ea066f295079732b9ba144/ez_credentials-1.2.0.tar.gz",
    "platform": null,
    "description": "# Easy credentials\n\nSimple set of classes to manage credentials (user/pwd, token...)\n\n## Installation\n\nClassic through pip or your favourite package manager:\n\n```shell\npip install ez-credentials\n```\n\n## Usage\n\nInstantiate a credential manager. The instance is callable and returns the credentials. You can also get the credentials as a dictionnary or as a tuple.\n\n```python\nfrom ez_credentials import CredentialManager\n\ncred = CredentialManager('test')\n\ncred()\n```\n\nYou'll be prompted for your credentials. They will be stored in your keyring. \n\n'test' is the name of the service. You can define several credential managers with different service names.\n\nOptionally, you cat set how long the credentials should be stored, i.e. how frequently the password is asked for.\nThis is defined in seconds, and default to 30 days.\n\n```python\nfrom time import sleep\nfrom ez_credentials import CredentialManager\n\ncred = CredentialManager('test', expires_in=1)\n\ncred()\nsleep(1)\ncred()\n```\n\nThere are other classes (TokenManager, TokenCredentialManager, WebServiceTokenManager and WebServiceTorkenManager; and some aliases).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Easy credentials management using keyring",
    "version": "1.2.0",
    "project_urls": null,
    "split_keywords": [
        "credentials",
        " keyring"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7e36abe9cba6e82fbaf90f91085226fa1fac3269e077170716416483474ea334",
                "md5": "38612dbb7c9ab4f1696b4ae6a962cd17",
                "sha256": "1bb8cc080ae081924c867ad28fa290a7b7ac6f1666b52223cd8d1c881c91b4c9"
            },
            "downloads": -1,
            "filename": "ez_credentials-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "38612dbb7c9ab4f1696b4ae6a962cd17",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.10",
            "size": 10396,
            "upload_time": "2024-08-31T08:23:58",
            "upload_time_iso_8601": "2024-08-31T08:23:58.105737Z",
            "url": "https://files.pythonhosted.org/packages/7e/36/abe9cba6e82fbaf90f91085226fa1fac3269e077170716416483474ea334/ez_credentials-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "39e782ca7833b00b70311d4ba7264066b2682ad666ea066f295079732b9ba144",
                "md5": "d0ed08ec70ebac4e5084b6c89e2a8165",
                "sha256": "8905f17ab2253d73e897b2b3b35b0edb10d45c14ab1f72f6f5391dd0f0e43174"
            },
            "downloads": -1,
            "filename": "ez_credentials-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d0ed08ec70ebac4e5084b6c89e2a8165",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.10",
            "size": 9598,
            "upload_time": "2024-08-31T08:23:59",
            "upload_time_iso_8601": "2024-08-31T08:23:59.421850Z",
            "url": "https://files.pythonhosted.org/packages/39/e7/82ca7833b00b70311d4ba7264066b2682ad666ea066f295079732b9ba144/ez_credentials-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-31 08:23:59",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "ez_credentials"
}
        
Elapsed time: 0.35691s