读取gpg加密的yaml文件

gypp的Python项目详细描述


gypp为访问gpg加密的yaml文件中的条目提供了方便的方法。

yaml文件的结构如下:

# Comments start with a "#"
DESCRIPTION: |
  This is a human readable description of this file.

RECIPIENTS:
  - list of
  - recipients of
  - the encrypted file

some_key:
  user: name of account (required)
  password: the password or phrase (required)
  name: human readable name of entry (optional)
  note: |
    optional note. The pipe char indicates that
    line breaks will be preserved, but the
    preceding space on each line will not.
  other: Other properties may be added as needed.

another_key:
  user: some user
  password: password with a quote " in it
  name: another test entry
  note: |
    Same old stuff

安装

pip install -U gypp

使用

列出可用条目:

$ gypp my_passwords.gpg

Source: junk.txt
Description: This is a human readable description of this file.

Keys available:
  some_key          : human readable name of entry (optional)
  another_key       : another test entry

在命令行上显示特定条目:

$ gypp -s -k some_key my_passwords.gpg

user     : name of account (required)
password :
name     : human readable name of entry (optional)
note
  optional note. The pipe char indicates that
  line breaks will be preserved, but the
  preceding space on each line will not.

other    : Other properties may be added as needed.

在剪贴板上输入密码:

$ gypp -k some_key my_passwords.gpg

版本1.1中的新功能:gypp将从配置文件中读取源列表 默认情况下位于$HOME/.config/gypp/gypp.yaml。配置文件是一个yaml 文件结构如下:

sources:
  source_name_1: path/to/encrypted/file
  source_name_2: path/to/another/encryped/file

gypp然后可以使用sources下的键运行,以指定要读取的gpg文件。例如:

$ gypp source_name_2

开发

存储库:https://github.com/datadavev/gypp

开发安装:

$ git clone https://github.com/datadavev/gypp.git
$ cd gypp
$ pip install -U -e .

部署到pypi:

$ python setup.py sdist
$ twine upload dist/*

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
如何表示1。。Java中的n关系   java在安卓应用程序中添加polaris viewer   Java字符串::replaceAll仅替换第一个出现(可能不正确的正则表达式)   java Tomcat/JBoss部署后脚本   如何在Heroku Java应用程序中运行发出web请求的周期进程   java如何以纳秒为单位证明算法的时间   Solaris上的java自定义ListCellRenderer(使用jre5)   java试图为我的播放器类测试块实现播放器重力(RealtutsGml平台教程)   c#消耗一个。带有java的net web服务未显示预期结果   java在KOI8\R中检索html   基于java图形的搜索与基于随机的搜索   java如何检查安卓设备上的可用空间?在SD卡上?