tinynetrc
Read and write .netrc files.
What it is and what it does
tinynetrc wraps Python's standard library netrc module to read and write .netrc credential files with a simpler, dictionary-based interface. It addresses a standard library bug in .netrc formatting and adds write functionality that the standard module lacks. The package parses .netrc entries into dictionaries instead of tuples, making credential access more intuitive.
You use it to load your .netrc file, read or modify stored credentials for remote hosts, and save changes back to disk. It supports context manager usage for automatic saving. The package has no external dependencies and installs with low friction, but maintenance has been abandoned since mid-2022, so it will not receive updates for newer Python versions or bug fixes.
Use it for:
- Programmatically read stored credentials from ~/.netrc for API authentication in scripts.
- Modify or add credentials to .netrc and persist them without manual file editing.
- Manage multiple host credentials in a single Python session using dictionary access.
- Work around the standard library netrc formatting bug on older Python versions.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Read, parse, and write .netrc credential files with dictionary-style access, fixing standard library limitations and adding write support.
Yes, if you need to read or write .netrc files and are on a stable Python version (2.7, 3.5–3.7 as listed). No, if you require active maintenance or plan to upgrade to newer Python versions soon—the package is abandoned and will not receive updates. For modern Python, check whether the standard library bug is fixed in your version before choosing this package.
Install
tinynetrc on PyPI
pip
pip install tinynetrcuv
uv add tinynetrcpoetry
poetry add tinynetrcInstalling tinynetrc
Before you install
Low friction installation with no runtime dependencies. Maintenance is abandoned—last release was 2021-08-15 and last commit 2022-08-17—so expect no updates for bugs or Python version changes.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install tinynetrc
from tinynetrc import Netrc
netrc = Netrc() # parse ~/.netrc
password = netrc['api.heroku.com']['password']
netrc['api.heroku.com']['password'] = 'newpassword'
netrc.save()
Requires ~/.netrc file to exist; standard library netrc module is used under the hood.
Verify before relying
- Whether the package still works reliably on Python versions released after 2022-08-17.
- Current compatibility with modern Python 3.x versions beyond those listed in classifiers.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,825 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 282,657/month — #8,085 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: tinynetrc-1.3.1-py2.py3-none-any.whl
Keywords: netrc, posix
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
safe-netrcProvides a safer subclass of Python's standard…
copyleft · top 15,000 on PyPI
docker-pycredsProvides Python bindings to interact with…
permissive · top 5,000 on PyPI
git-credentialsWraps the `git credential` command to retrieve,…
permissive · top 15,000 on PyPI
credstashCredStash stores and retrieves secrets using…
permissive · top 15,000 on PyPI
authcaptureproxyIntercepts and logs authentication credentials…
permissive · top 15,000 on PyPI
uproot3Reads and writes ROOT files (the data format…
permissive · top 15,000 on PyPI
keyringKeyring provides safe password and credential…
permissive · top 1,000 on PyPI
environsenvirons parses environment variables into…
permissive · top 5,000 on PyPI
robocorp-vaultProvides read and write access to secrets…
permissive · top 15,000 on PyPI
intelhexRead, write, and manipulate Intel HEX files, a…
permissive · top 5,000 on PyPI