ez-credentials


Nameez-credentials JSON
Version 1.2.1 PyPI version JSON
download
home_pageNone
SummaryEasy credentials management using keyring
upload_time2024-11-18 23:16:50
maintainerChristophe Druet
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": "Christophe Druet",
    "docs_url": null,
    "requires_python": "<3.13,>=3.10",
    "maintainer_email": "christophe@stoachup.com",
    "keywords": "credentials, keyring",
    "author": "Christophe Druet",
    "author_email": "christophe@stoachup.com",
    "download_url": "https://files.pythonhosted.org/packages/5c/d4/2c895b753f7c83c6425fa1737f020fd101873490f613111dfcd588b6dcc8/ez_credentials-1.2.1.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\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Easy credentials management using keyring",
    "version": "1.2.1",
    "project_urls": null,
    "split_keywords": [
        "credentials",
        " keyring"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5cd42c895b753f7c83c6425fa1737f020fd101873490f613111dfcd588b6dcc8",
                "md5": "4afbabc18e9b8b2960e5379c24b5ddff",
                "sha256": "3e4214ee3f9e7879b7bc134c7f26bd92f69db29e38f311ee9c1811b4b939e555"
            },
            "downloads": -1,
            "filename": "ez_credentials-1.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4afbabc18e9b8b2960e5379c24b5ddff",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.10",
            "size": 10063,
            "upload_time": "2024-11-18T23:16:50",
            "upload_time_iso_8601": "2024-11-18T23:16:50.306456Z",
            "url": "https://files.pythonhosted.org/packages/5c/d4/2c895b753f7c83c6425fa1737f020fd101873490f613111dfcd588b6dcc8/ez_credentials-1.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-18 23:16:50",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "ez-credentials"
}
        
Elapsed time: 0.38172s