Skip to main content

click-creds

pypi Build Status codecov CodeFactor Language grade: Python

Pluggable credentials storage and management for click CLI applications.

Uses ~/.netrc file method which is used by popular CLI applications like Heroku CLI, AWS CLIs, etc.

Installation

Requires python version >=3.6.

$ pip install click-creds

Quickstart

Here's an example cli.py file.

#!/usr/bin/env python3
import click
import click_creds

@click.group(context_settings=dict(help_option_names=["-h", "--help"]))
@click_creds.use_netrcstore(
    name="myawesomeapp",
    mapping={"login": "username", "password": "api_key", "account": "url"},
)
def cli():
    pass

# Register "config" group
cli.add_command(click_creds.config_group)

# Entrypoint
if __name__ == "__main__":
    cli()

Now, if we execute ./cli.py config,

$ ./cli.py config
Usage: cli.py config [OPTIONS] COMMAND [ARGS]...

  Set or view config variables

Options:
  -h, --help  Show this message and exit.

Commands:
  get  Echo config variables
  set  Update config variables

Documentation

Please see the example_project.

Changelog / Releases

All releases should be listed in the releases tab on GitHub.

See CHANGELOG for a more detailed listing.

License

This project is published with the BSD License. See https://choosealicense.com/licenses/bsd/ for more information about what this means.

Credits

Metadata

Release files for click-creds 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for click-creds 0.0.3
File Size Uploaded Provenance Actions
click-creds-0.0.3.tar.gz 6.6 kB Without provenance Details for click-creds-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for click-creds 0.0.3
File Interpreter ABI Platform Actions
click_creds-0.0.3-py3-none-any.whl Python 3 none any Details for click_creds-0.0.3-py3-none-any.whl

Total release size: 13.9 kB

Release files / click-creds-0.0.3.tar.gz

Download URL click-creds-0.0.3.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1ee3e53ef25e7a5f13ca76033d450c648772cf9a1f8ea958b8fdcdf0aa87adfa
BLAKE2b-256 checksum
How to use checksums
350cb3c6a69d717be53f98a064bdbdce3cf9c6da3d3c863889fecba4dc17f33b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

Release files / click_creds-0.0.3-py3-none-any.whl

Download URL click_creds-0.0.3-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea5e817e4f4cefc2b19910d9ff796f80ec2bbffa5f28ac7902c38a31d2490c36
BLAKE2b-256 checksum
How to use checksums
864e1c65303d474e6ad7a923a7ca44c1b02eb57a81ac61fb907e273dae135cc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

Security for click-creds 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page