Skip to main content

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

Metadata

Release files for update-netrc 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for update-netrc 0.2.0
File Size Uploaded Provenance
update_netrc-0.2.0.tar.gz 10.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for update-netrc 0.2.0
File Interpreter ABI Platform
update_netrc-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.6 kB

Release files / update_netrc-0.2.0.tar.gz

Download URL update_netrc-0.2.0.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e81eff3182c6fe5e344f8a1a50fe2e7176f366d25771cda42eeedb96adb3e2ef
BLAKE2b-256 checksum
How to use checksums
785e9eced2e18a9dbff9c970bde80a966eb80a6edf100dd7bbb8c0ac7445800a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2025.

Transparency log

Release files / update_netrc-0.2.0-py3-none-any.whl

Download URL update_netrc-0.2.0-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c2da452a2a6d4a814e72ffc69027fcba4fe921a5303cd623f8f3d483e8b183c
BLAKE2b-256 checksum
How to use checksums
28bd9effd374f6fdc0a798ac4f82e9f1cb6eabebe49307bf4d3066ab06b0ccbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2025.

Transparency log

Security for update-netrc 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for update_netrc-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page