Skip to main content

nltsecret

Project description

nltsecret

nltsecret 是一个轻量级的 Python 密钥管理工具,用于安全地存储和访问敏感信息(如账号密码)。以下是它的主要功能和特点:

核心功能

  • 本地密钥存储:将敏感信息保存在本地,避免在代码中使用明文凭证
  • 结构化存储:使用多级路径(类似命名空间)组织密钥
  • 读写 API:提供简洁的读写接口
  • 快照功能:通过 nltsecret_snapshot 扩展包支持某些平台的快照功能

安装

pip install nltsecret

写入或者更新

from nltsecret import read_secret, write_secret

write_secret("your username", "wechat", "login", "username")
read_secret("wechat", "login", "username", value="your username")

读取

from nltsecret import read_secret

username = read_secret("wechat", "login", "username")
password = read_secret("wechat", "login", "password")

快照

快照功能需要单独安装

pip install nltsecret_snapshot

目前只支持保存 lanzou

保存

from nltsecret_snapshot import save_snapshot

bin_id = '**'
cipher_key = '******'
security_key = "******"
save_snapshot(bin_id, cipher_key, security_key)

读取

from nltsecret_snapshot import load_snapshot

bin_id = '**'
cipher_key = '******'
security_key = "******"
load_snapshot(bin_id, cipher_key, security_key)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nltsecret-1.4.81-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file nltsecret-1.4.81-py3-none-any.whl.

File metadata

  • Download URL: nltsecret-1.4.81-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nltsecret-1.4.81-py3-none-any.whl
Algorithm Hash digest
SHA256 c899ab2a9ec5c771488a29b84d663cf4e7d10020e0313c5418aa3fea9164dcc1
MD5 5fd4ce34624246d7889bc269b2c3cd02
BLAKE2b-256 4b8ae77d416aac594a909035743a503f244eec9c3043eef182b0f17b78695f9f

See more details on using hashes here.

Supported by

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