12.18.1 netrc Objects

A netrc instance has the following methods:

Return a 3-tuple (login, account, password) of authenticators for host. If the netrc file did not contain an entry for the given host, return the tuple associated with the `default' entry. If neither matching host nor default entry is available, return None.

Dump the class data as a string in the format of a netrc file. (This discards comments and may reorder the entries.)

Instances of netrc have public instance variables:

Dictionary mapping host names to (login, account, password) tuples. The `default' entry, if any, is represented as a pseudo-host by that name.

Dictionary mapping macro names to string lists.
See About this document... for information on suggesting changes.