Skip to main content

A simple command line utility to update netrc credentials

Project description

update-netrc

CI MIT License PyPI version Python 3.8 Python 3.9 Python 3.10 Python 3.11 Python 3.12 Ruff Code style: black Checked with mypy No Dependencies

A simple command line utility to update netrc credentials.

Usage

$  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

Examples

To update the password of the localhost machine:

$ update-netrc update localhost --password my-secret-password

To update the login of the default machine

$ update-netrc update default --login my-login

Installation

pip install update-netrc

Development setup

First clone this repository

git clone https://github.com/maerteijn/update-netrc.git

Install the python project

pyenv virtualenv update-netrc  # or your alternative to create a venv
pyenv activate update-netrc
make install

Linting

black, ruff and mypy are installed and configured

make lint

Formatting

black and ruff are configured

make format

Test

Pytest with coverage is default enabled

make cov

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

update_netrc-0.1.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file update_netrc-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for update_netrc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3182ddf795e53d30d8a95920b7393d13a7a9d3aefd8d59dc9ac0db3e2d6f2a73
MD5 8a4275364da0d778dd791bce8699861a
BLAKE2b-256 8def77c53f9733227145a1d7b142d2f203bb7e487280d932e0e2ace25309f1b5

See more details on using hashes here.

Supported by

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