Skip to main content

No project description provided

Project description

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.

Wheel Status Latest Version License Build Status Documentation Status

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

upref-1.0.14.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

upref-1.0.14-py2.py3-none-any.whl (158.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file upref-1.0.14.tar.gz.

File metadata

  • Download URL: upref-1.0.14.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for upref-1.0.14.tar.gz
Algorithm Hash digest
SHA256 a713a8567c592a5601f12ab739f3f85844fe88bcbf75eadb7dcdd85df56493fb
MD5 3cdbc33c7327d6d6e304600cae247547
BLAKE2b-256 fc39761e0f71e8e3c2e7900dfcf42f0b326cedd7191db09308bd361afde1478b

See more details on using hashes here.

File details

Details for the file upref-1.0.14-py2.py3-none-any.whl.

File metadata

  • Download URL: upref-1.0.14-py2.py3-none-any.whl
  • Upload date:
  • Size: 158.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for upref-1.0.14-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 75c57c196276adaba712c48470f7ec722039e1d01027f8361b5ae17a6d9165db
MD5 eef34c977b0c289e772c8272111becd4
BLAKE2b-256 cb22479d98be6880c8ca43ff28fedada6eeb5cd1aa1b02179a978347678c484e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page