一个简单的命令行工具,用于更新netrc凭证
项目描述
update-netrc
一个简单的命令行工具,用于更新netrc凭证。
用法
$ update-netrc --help
usage: update-netrc [-h] [--netrc-path NETRC_PATH] {update} ...
Default .netrc path: /Users/martijn/.netrc
positional arguments:
{update}
options:
-h, --help show this help message and exit
--netrc-path NETRC_PATH
Specify an alternative location for the used netrc file
$ update-netrc update --help
usage: update-netrc update [-h] [--login LOGIN] [--account ACCOUNT] [--password PASSWORD] host
positional arguments:
host Selects the host (machine) you want to update
options:
-h, --help show this help message and exit
--login LOGIN Update the login of specified host
--account ACCOUNT Update the account of the specified host
--password PASSWORD Update the password of the specified host
示例
更新localhost
机器的密码
$ update-netrc update localhost --password my-secret-password
更新default
机器的登录名
$ update-netrc update default --login my-login
您还可以添加新条目,此时需要--login
和--password
$ update-netrc update my-new-host --login my-login --password my-password
安装
pip install update-netrc
开发环境设置
首先克隆此仓库
git clone https://github.com/maerteijn/update-netrc.git
安装Python项目
pyenv virtualenv update-netrc # or your alternative to create a venv
pyenv activate update-netrc
make install
代码检查
已安装并配置了black
、ruff
和mypy
make lint
格式化
black
和ruff
已配置
make format
测试
默认启用Pytest和覆盖率
make cov
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。
源分布
update-netrc-0.1.1.tar.gz (10.0 kB 查看哈希值)
构建版本
update_netrc-0.1.1-py3-none-any.whl (5.3 kB 查看哈希值)