Skip to main content

A simple command line utility to update netrc credentials

Project description

update-netrc

A simple command line utility to update netrc credentials.

CI MIT License PyPI version Python 3.9 Python 3.10 Python 3.11 Python 3.12 Python 3.13 Ruff Checked with mypy No Dependencies

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

ruff and mypy are installed and configured

make lint

Formatting

ruff is 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.2.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

update_netrc-0.2.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file update_netrc-0.2.0.tar.gz.

File metadata

  • Download URL: update_netrc-0.2.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for update_netrc-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e81eff3182c6fe5e344f8a1a50fe2e7176f366d25771cda42eeedb96adb3e2ef
MD5 25082307fda434617c88c833b8047195
BLAKE2b-256 785e9eced2e18a9dbff9c970bde80a966eb80a6edf100dd7bbb8c0ac7445800a

See more details on using hashes here.

Provenance

The following attestation bundles were made for update_netrc-0.2.0.tar.gz:

Publisher: publish-pypi.yaml on maerteijn/update-netrc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: update_netrc-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for update_netrc-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c2da452a2a6d4a814e72ffc69027fcba4fe921a5303cd623f8f3d483e8b183c
MD5 1743304d81380206720e15c35b0409c9
BLAKE2b-256 28bd9effd374f6fdc0a798ac4f82e9f1cb6eabebe49307bf4d3066ab06b0ccbc

See more details on using hashes here.

Provenance

The following attestation bundles were made for update_netrc-0.2.0-py3-none-any.whl:

Publisher: publish-pypi.yaml on maerteijn/update-netrc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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