How to use the keyring.core.load_keyring function in keyring

To help you get started, we’ve selected a few keyring examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github typeworld / typeworld / Lib / typeworld / client / __init__.py View on Github external
keyring.core.set_keyring(
                    keyring.core.load_keyring("keyring.backends.OS_X.Keyring")
                )
                return keyring

            elif WIN:

                if "TRAVIS" in os.environ:
                    keyring = dummyKeyRing
                    return keyring

                import keyring  # nocoverage (Fails on Travis CI)

                keyring.core.set_keyring(
                    keyring.core.load_keyring(
                        "keyring.backends.Windows.WinVaultKeyring"
                    )
                )  # nocoverage (Fails on Travis CI)
                return keyring  # nocoverage (Fails on Travis CI)

            elif LINUX:

                try:
                    import keyring

                    keyring.core.set_keyring(
                        keyring.core.load_keyring(
                            "keyring.backends.kwallet.DBusKeyring"
                        )
                    )
                except Exception:
github typeworld / typeworld / Lib / typeworld / client / __init__.py View on Github external
def keyring(self):
		try:

			if MAC:

				import keyring
				keyring.core.set_keyring(keyring.core.load_keyring('keyring.backends.OS_X.Keyring'))
				return keyring

			elif WIN:

				if 'TRAVIS' in os.environ:
					keyring = dummyKeyRing
					return keyring

				import keyring #nocoverage (Fails on Travis CI)
				keyring.core.set_keyring(keyring.core.load_keyring('keyring.backends.Windows.WinVaultKeyring')) #nocoverage (Fails on Travis CI)
				return keyring #nocoverage (Fails on Travis CI)

			elif LINUX:

				try:
					import keyring
github openstack / python-openstackclient / openstackclient / common / openstackkeyring.py View on Github external
def os_keyring():
    """Initialize the openstack keyring."""
    ring = 'openstackclient.common.openstackkeyring.OpenStackKeyring'
    return keyring.core.load_keyring(None, ring)
github typeworld / typeworld / Lib / typeworld / client / __init__.py View on Github external
try:

			if MAC:

				import keyring
				keyring.core.set_keyring(keyring.core.load_keyring('keyring.backends.OS_X.Keyring'))
				return keyring

			elif WIN:

				if 'TRAVIS' in os.environ:
					keyring = dummyKeyRing
					return keyring

				import keyring #nocoverage (Fails on Travis CI)
				keyring.core.set_keyring(keyring.core.load_keyring('keyring.backends.Windows.WinVaultKeyring')) #nocoverage (Fails on Travis CI)
				return keyring #nocoverage (Fails on Travis CI)

			elif LINUX:

				try:
					import keyring
					keyring.core.set_keyring(keyring.core.load_keyring('keyring.backends.kwallet.DBusKeyring'))
				except:
					keyring = dummyKeyRing

				return keyring
		except Exception as e: self.handleTraceback(sourceMethod = getattr(self, sys._getframe().f_code.co_name), e = e)
github openSUSE / osc / osc / credentials.py View on Github external
def _load_backend(self):
        keyring_backend = keyring.core.load_keyring(self._backend_cls_name)
        keyring.set_keyring(keyring_backend)
github typeworld / typeworld / Lib / typeworld / client / __init__.py View on Github external
def keyring(self):
        try:

            if MAC:

                import keyring

                keyring.core.set_keyring(
                    keyring.core.load_keyring("keyring.backends.OS_X.Keyring")
                )
                return keyring

            elif WIN:

                if "TRAVIS" in os.environ:
                    keyring = dummyKeyRing
                    return keyring

                import keyring  # nocoverage (Fails on Travis CI)

                keyring.core.set_keyring(
                    keyring.core.load_keyring(
                        "keyring.backends.Windows.WinVaultKeyring"
                    )
                )  # nocoverage (Fails on Travis CI)