Skip to main content

Easy credentials management using keyring

Project description

Easy credentials

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

Installation

Classic through pip or your favourite package manager:

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.

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.

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).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ez_credentials-1.2.2.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ez_credentials-1.2.2-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file ez_credentials-1.2.2.tar.gz.

File metadata

  • Download URL: ez_credentials-1.2.2.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Darwin/24.1.0

File hashes

Hashes for ez_credentials-1.2.2.tar.gz
Algorithm Hash digest
SHA256 97775a748e4f7097067482dc7db6ab1c70870373f53cf540c512a6133a1435b2
MD5 df142798de1d2af53677de6196310b9f
BLAKE2b-256 d52efb38113e51ad669bf0598de6e4d4410e8cefb48f2e770b0f758edf81e8c0

See more details on using hashes here.

File details

Details for the file ez_credentials-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: ez_credentials-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Darwin/24.1.0

File hashes

Hashes for ez_credentials-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 76a2e67d52252bc76c65ecf8583f86767e3b594f18f80cffd1254e6b644d5ae1
MD5 88eee09fa5612b334e3784447a359c33
BLAKE2b-256 5099422629309012fa75dab28018d41262aebf3ba75f461327ee08943e55be45

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page