It makes sense to put Credentials later.
This commit is contained in:
parent
80b823fe68
commit
be27d7839b
@ -133,41 +133,6 @@ from installation:
|
||||
If no arguments were provided, ``i3pystatus`` script works as an example of
|
||||
``Clock`` module.
|
||||
|
||||
.. _credentials:
|
||||
|
||||
Credentials
|
||||
-----------
|
||||
|
||||
Settings that require credentials can utilize the keyring module to
|
||||
keep sensitive information out of config files. To take advantage of
|
||||
this feature, simply use the ``i3pystatus-setting-util`` script
|
||||
installed along i3pystatus to set the credentials for a module. Once
|
||||
this is done you can add the module to your config without specifying
|
||||
the credentials, e.g.:
|
||||
|
||||
.. code:: python
|
||||
|
||||
# Use the default keyring to retrieve credentials.
|
||||
# To determine which backend is the default on your system, run
|
||||
# python -c 'import keyring; print(keyring.get_keyring())'
|
||||
status.register('github')
|
||||
|
||||
If you don't want to use the default you can set a specific keyring like so:
|
||||
|
||||
.. code:: python
|
||||
|
||||
# Requires the keyrings.alt package
|
||||
from keyrings.alt.file import PlaintextKeyring
|
||||
status.register('github', keyring_backend=PlaintextKeyring())
|
||||
|
||||
i3pystatus will locate and set the credentials during the module
|
||||
loading process. Currently supported credentials are "password",
|
||||
"email" and "username".
|
||||
|
||||
.. note:: Credential handling requires the PyPI package
|
||||
``keyring``. Many distributions have it pre-packaged available as
|
||||
``python-keyring``.
|
||||
|
||||
Formatting
|
||||
----------
|
||||
|
||||
@ -566,3 +531,38 @@ service that is not traditionally required for web browsing:
|
||||
|
||||
status = Status(check_internet=("github.com", 22))
|
||||
|
||||
.. _credentials:
|
||||
|
||||
Credentials
|
||||
-----------
|
||||
|
||||
Settings that require credentials can utilize the keyring module to
|
||||
keep sensitive information out of config files. To take advantage of
|
||||
this feature, simply use the ``i3pystatus-setting-util`` script
|
||||
installed along i3pystatus to set the credentials for a module. Once
|
||||
this is done you can add the module to your config without specifying
|
||||
the credentials, e.g.:
|
||||
|
||||
.. code:: python
|
||||
|
||||
# Use the default keyring to retrieve credentials.
|
||||
# To determine which backend is the default on your system, run
|
||||
# python -c 'import keyring; print(keyring.get_keyring())'
|
||||
status.register('github')
|
||||
|
||||
If you don't want to use the default you can set a specific keyring like so:
|
||||
|
||||
.. code:: python
|
||||
|
||||
# Requires the keyrings.alt package
|
||||
from keyrings.alt.file import PlaintextKeyring
|
||||
status.register('github', keyring_backend=PlaintextKeyring())
|
||||
|
||||
i3pystatus will locate and set the credentials during the module
|
||||
loading process. Currently supported credentials are "password",
|
||||
"email" and "username".
|
||||
|
||||
.. note:: Credential handling requires the PyPI package
|
||||
``keyring``. Many distributions have it pre-packaged available as
|
||||
``python-keyring``.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user