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 hashes)

Uploaded Python 3

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