deb-python-pygit2/docs/config.rst
Carlos Martín Nieto 4c4968a2fb Fix config documentation keyword
The keyword for linking to a mehtod is 'meth', not 'method'. Setting the
'currentmodule' allows us to link without the 'pygit2' prefix in the
link text.
2014-04-18 12:17:54 +02:00

1.1 KiB

Configuration files

pygit2.Repository.config

The Config type

pygit2.Config.get_system_config

pygit2.Config.get_global_config

pygit2.Config.add_file

pygit2.Config.get_multivar

pygit2.Config.set_multivar

Config.__iter__()

The Config class has an iterator which can be used to loop through all the entries in the configuration. Each element is a tuple containing the name and the value of each configuration variable. Be aware that this may return multiple versions of each entry if they are set multiple times in the configuration files.

pygit2

The Config Mapping interface.

When using the mapping interface, the value is returned as a string. In order to apply the git-config parsing rules, you can use Config.get_bool or Config.get_int.

pygit2.Config.get_bool

pygit2.Config.get_int