skillfed

tinynetrc

Read and write .netrc files.

tinynetrc v1.3.1 282.7K downloads/30d#8,085 on PyPI15
Permissive license MIT Abandoned released

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 tinynetrc

uv

uv add tinynetrc

poetry

poetry add tinynetrc

Installing 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

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: Implementation :: CPython

Tags

netrc file parserread write netrccredential file management.netrc pythonposix netrc handlernetrc dictionary access
credentialsposix

More Utilities packages