No project description provided
Project description
PrivatePrefs
Easily Keep API Keys out of GitHub
It's often tempting to hard code sensitive data like API Keys, passwords, email addresses, usernames, etc directly into python scripts, but if it's checked into Version Control and pushed to public repository on GitHub, GitLab or Bitbucket, then your sensitive personal data will be compromised.
If sensitive data does end up in a public Repository it can be a real pain to remove, because you have to delete the sensitive data, purge it from the history, have github purge their cache. After the that you will still need to change your password or API Keys 😱.
This could have been prevented by using PrivatePrefs 😎. It's works by requiring you to enter sensitive information into the command line, then retrieve it using python, hopefully eliminating the temptation to hard code it. See here for more info (LINK TO HOW IT WORKS)
Table of Contents
Installation
Use pip
to install
pip install privateprefs
Quick Start
Save string
run from command line
privateprefs save "my key" "abcd4321"
Load string
run in python
import privateprefs as prefs
prefs.load("my key")
CLI Demo
use command line interface insert and manage key-value pairs
save first key-value pair
privateprefs save "my key1" "value 1"
load key
privateprefs load "my key1"
returns loaded key='my key1' value='value 1'
save second key-value pair
privateprefs save "my key2" "value 2"
list all stored key value pars
privateprefs list
returns
stored (key : value)
-------------------------------------------------------------
my key1 : value 1
my key2 : value 2
-------------------------------------------------------------
delete a single key-value pair
privateprefs delete "my key2"
delete all key-value pairs
-- WARNING ALL SAVED DATA WILL BE PERMANENTLY DELETED --
privateprefs delete --all
License
privateprefs
is distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for privateprefs-0.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a751c030e74f9a1d1e7ad1b0e1b46e3ce3332412293a1aff03e3dbcde6d5e0e |
|
MD5 | e01207c02d8358d53db8d224634554be |
|
BLAKE2b-256 | f4b0527ece68fd2493cef092e0b94970bb22ccef032ea1696af23204d364523f |