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

You can also add new entries, --login and --password are then required:

$ update-netrc update my-new-host --login my-login --password my-password

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 Distribution

update-netrc-0.1.1.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

update_netrc-0.1.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file update-netrc-0.1.1.tar.gz.

File metadata

  • Download URL: update-netrc-0.1.1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for update-netrc-0.1.1.tar.gz
Algorithm Hash digest
SHA256 885a77ddd8f341b887fa54a2b1e8d2b253f0c21f899431c365e21607e67ee49b
MD5 594549dc4db0f3688e72f51ed2948ca8
BLAKE2b-256 d8272e29be38472f9e0cde93e0501ff972dae9ccc5d20083691819777eb5b0d7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: update_netrc-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for update_netrc-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 24b4d084b8bc509f3ee006d8bd8a7a62565b60b42357af8ead572164fd277e47
MD5 e5c2f51cffb3e9c8e561a81471026775
BLAKE2b-256 42bf85d516ed8ab181d4a3b3d18b82032197877febce68ddc84ebaf2008d9800

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