12.17 netrc -- netrc file processing
Keywords: lib

# 12.17 `netrc` -- netrc file processing

New in version 1.5.2.

The `netrc` class parses and encapsulates the netrc file format used by the Unix ftp program and other FTP clients.

`netrc` ([file])
  A `netrc` instance or subclass instance encapsulates data from a netrc file. The initialization argument, if present, specifies the file to parse. If no argument is given, the file .netrc in the user's home directory will be read. Parse errors will raise `SyntaxError` with diagnostic information including the file name, line number, and terminating token.

Subsections

- 12.17.1 netrc Objects