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 intelowl-click-creds 0.0.1

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

Source distribution (sdist)

Source distribution for intelowl-click-creds 0.0.1
File Size Uploaded
intelowl-click-creds-0.0.1.tar.gz 6.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for intelowl-click-creds 0.0.1
File Interpreter ABI Platform
intelowl_click_creds-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.1 kB

Release files / intelowl-click-creds-0.0.1.tar.gz

Download URL intelowl-click-creds-0.0.1.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ecbb0344c95f290b74fb0759ddc33fcc76f34c012d852e10a875cea093f6d6a1
BLAKE2b-256 checksum
How to use checksums
def259d0cd0ed33a9a5691c6d1ada33febf54a42a78a8700205b6049b49d0e93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.0

Release files / intelowl_click_creds-0.0.1-py3-none-any.whl

Download URL intelowl_click_creds-0.0.1-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ccfe41761d701175bddb5e35ff37fa6fa991a850e805fd5d49c16687e6df2b4e
BLAKE2b-256 checksum
How to use checksums
3e99d5c3ce10945fb528f508f18609d1a65665fbbfeb964cf331788b323395f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.0

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

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