mirror of
				https://github.com/liberatedsystems/openCom-Companion.git
				synced 2025-07-08 05:07:21 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			430 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			430 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| try:
 | |
|     import keyring
 | |
| except Exception:
 | |
|     raise NotImplementedError()
 | |
| 
 | |
| from sbapp.plyer.facades import Keystore
 | |
| 
 | |
| 
 | |
| class WinKeystore(Keystore):
 | |
| 
 | |
|     def _set_key(self, servicename, key, value, **kwargs):
 | |
|         keyring.set_password(servicename, key, value)
 | |
| 
 | |
|     def _get_key(self, servicename, key, **kwargs):
 | |
|         return keyring.get_password(servicename, key)
 | |
| 
 | |
| 
 | |
| def instance():
 | |
|     return WinKeystore()
 |