{"library":"safe-netrc","title":"safe-netrc","description":"A drop-in replacement for Python's netrc module that safely parses .netrc files without leaking credentials. Provides the same API but with better error handling and support for permission checks. Current version: 1.0.1, released 2023-08. Monthly releases.","language":"python","status":"active","last_verified":"Mon Apr 27","install":{"commands":["pip install safe-netrc"],"cli":null},"imports":["from safe_netrc import netrc"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from safe_netrc import netrc\nimport os\n\nhost = 'example.com'\nlogin, _, password = netrc(os.path.expanduser('~/.netrc')).authenticators(host)\nprint(f'Login: {login}')","lang":"python","description":"Parse .netrc file and authenticate to a host. The file must have permissions 600 or less (owner-only read/write).","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}