https://github.com/iixixii/upref
Small library to collect and store user data (login, password)
https://github.com/iixixii/upref
python3 toolset wxapp
Last synced: 2 months ago
JSON representation
Small library to collect and store user data (login, password)
- Host: GitHub
- URL: https://github.com/iixixii/upref
- Owner: IIXIXII
- License: mit
- Created: 2019-06-05T12:32:57.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-20T12:50:13.000Z (over 4 years ago)
- Last Synced: 2024-10-18T13:16:30.050Z (about 1 year ago)
- Topics: python3, toolset, wxapp
- Language: Python
- Size: 370 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
upref 🐸
========
Upref is a small python module to grab and save some user data like login, password, url (mainly string data). After some projects, I want a simple method to find the right login and url from the user and save it in the personnal data of the user.
[](https://pypi.python.org/pypi/upref/)
[](https://pypi.python.org/pypi/upref/)
[](https://github.com/IIXIXII/upref/blob/master/LICENSE.md)
[](https://travis-ci.org/IIXIXII/upref)
[](https://upref.readthedocs.io/en/latest/?badge=latest)
Installation
------------
Installing upref with pip:
$ pip install upref
Basic Usage
------------
Here is the first example. The code fetch the URL from the user parameter
import upref
user_data = upref.get_pref(
{"url": {"label": "The application url"}},
"example01")
print("URL is {}".format(user_data['url']))
This code create a file in the user folder. And this file will be read again during the next run.
url:
label: The application url
value: http://www.test.org/
Code example
------------
import upref
data = upref.get_pref(
{
'login': {'label': "Your login"},
'passwd': {'label': "Your secret password",
'type': "Password"},
},
name="example02")
print("Your login is %s" % data['login'])
print("Your password (not so secret) is %s" % data['passwd'])
At the first execution, there is a window to grab the data. The second execution, there will be no windows, the data are only read from the file.
All data are saved in a yaml file at %APPDATA%/.upref/example02.conf or \~/.local/share/.upref/example02.conf.
login:
label: Your login
value: My login
passwd:
label: Your secret password
value: Password
Features
------------
- Read and save small amount of data (url, login, )
- Small gui to ask data from the user
- Text option is avaible
License
-------
The upref is licensed under the terms of the MIT license and is available for free.
MIT © Florent