{"id":17945196,"url":"https://github.com/eshaan7/click-creds","last_synced_at":"2025-03-24T18:32:47.836Z","repository":{"id":47085512,"uuid":"323906242","full_name":"eshaan7/click-creds","owner":"eshaan7","description":"Pluggable credentials storage and management for click CLI apps","archived":false,"fork":false,"pushed_at":"2023-10-03T13:05:56.000Z","size":36,"stargazers_count":4,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T04:12:57.710Z","etag":null,"topics":["auth","cli","cli-configuration","click","credential-manager","credential-storage","credentials","creds","heroku-cli","netrc","netrc-creds","python","python-authentication","python-cli","python-click"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/click-creds/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eshaan7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-23T13:14:03.000Z","updated_at":"2023-05-27T08:54:49.000Z","dependencies_parsed_at":"2024-06-21T19:15:02.457Z","dependency_job_id":null,"html_url":"https://github.com/eshaan7/click-creds","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.0625,"last_synced_commit":"9dd18fcdd674deb59b1cb8af4e4d822f7cb50614"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshaan7%2Fclick-creds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshaan7%2Fclick-creds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshaan7%2Fclick-creds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshaan7%2Fclick-creds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eshaan7","download_url":"https://codeload.github.com/eshaan7/click-creds/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245328451,"owners_count":20597424,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auth","cli","cli-configuration","click","credential-manager","credential-storage","credentials","creds","heroku-cli","netrc","netrc-creds","python","python-authentication","python-cli","python-click"],"created_at":"2024-10-29T06:24:32.226Z","updated_at":"2025-03-24T18:32:47.518Z","avatar_url":"https://github.com/eshaan7.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# click-creds\n\n[![pypi](https://img.shields.io/pypi/v/click-creds)](https://pypi.org/project/click-creds/)\n[![Build Status](https://github.com/Eshaan7/click-creds/workflows/Linter%20\u0026%20Tests/badge.svg?branch=main)](https://github.com/Eshaan7/click-creds/actions?query=workflow%3A%22Linter+%26+Tests%22)\n[![codecov](https://codecov.io/gh/Eshaan7/click-creds/branch/main/graph/badge.svg?token=AeUhwwnaRW)](https://codecov.io/gh/Eshaan7/click-creds)\n[![CodeFactor](https://www.codefactor.io/repository/github/eshaan7/click-creds/badge)](https://www.codefactor.io/repository/github/eshaan7/click-creds)\n\u003ca href=\"https://lgtm.com/projects/g/Eshaan7/click-creds/context:python\"\u003e\n  \u003cimg alt=\"Language grade: Python\" src=\"https://img.shields.io/lgtm/grade/python/g/Eshaan7/click-creds.svg?logo=lgtm\u0026logoWidth=18\"/\u003e\n\u003c/a\u003e\n\n\nPluggable credentials storage and management for [click](https://github.com/pallets/click/) CLI applications.\n\nUses [`~/.netrc` file method](https://www.mkssoftware.com/docs/man4/netrc.4.asp) which is used by popular CLI applications like [Heroku CLI](https://devcenter.heroku.com/articles/authentication#netrc-file-format), AWS CLIs, etc.\n\n## Installation\n\nRequires python version `\u003e=3.6`.\n\n```bash\n$ pip install click-creds\n```\n\n## Quickstart\n\nHere's an example `cli.py` file.\n\n```python\n#!/usr/bin/env python3\nimport click\nimport click_creds\n\n@click.group(context_settings=dict(help_option_names=[\"-h\", \"--help\"]))\n@click_creds.use_netrcstore(\n    name=\"myawesomeapp\",\n    mapping={\"login\": \"username\", \"password\": \"api_key\", \"account\": \"url\"},\n)\ndef cli():\n    pass\n\n# Register \"config\" group\ncli.add_command(click_creds.config_group)\n\n# Entrypoint\nif __name__ == \"__main__\":\n    cli()\n```\n\nNow, if we execute `./cli.py config`,\n\n```bash\n$ ./cli.py config\nUsage: cli.py config [OPTIONS] COMMAND [ARGS]...\n\n  Set or view config variables\n\nOptions:\n  -h, --help  Show this message and exit.\n\nCommands:\n  get  Echo config variables\n  set  Update config variables\n```\n\n## Documentation\n\nPlease see the [`example_project`](https://github.com/Eshaan7/click-creds/tree/main/example_project).\n\n\n## Changelog / Releases\n\nAll releases should be listed in the [releases tab on GitHub](https://github.com/Eshaan7/click-creds/releases).\n\nSee [CHANGELOG](https://github.com/Eshaan7/click-creds/blob/main/.github/CHANGELOG.md) for a more detailed listing.\n\n## License\n\nThis project is published with the [BSD License](LICENSE). See [https://choosealicense.com/licenses/bsd/](https://choosealicense.com/licenses/BSD/) for more information about what this means.\n\n## Credits\n\n- [tinynetrc](https://github.com/sloria/tinynetrc)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feshaan7%2Fclick-creds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feshaan7%2Fclick-creds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feshaan7%2Fclick-creds/lists"}