Skip to main content

No project description provided

Project description

keepassxc-protocol

Interaction protocol for KeePassXC GUI

(Not tested with Linux, but might work.)

Examples

Get logins:

from keepassxc_protocol import Connection

con = Connection()
con.associate() # Associate request for current ACTIVE database

response = con.get_logins("https://example.test") # Get ALL data for example.test. CAN be specified without http\https.
entry = response.entries[0] # First ecntry for example.test.

print(entry.group) # Output: "group2"
print(entry.login) # Output: "example_test_login"
print(entry.password) # Output: "example_test_password"
print(entry.name) # Output: "example_test"
print(entry.uuid) # Output: "4cbbe6a7efeb46458c5501e7203209e5"
print(entry.totp) # Output: "579423"

print(response.model_dump_json(indent=2))
# Output:
# {
#   "count": 1,
#   "nonce": "/r+xzDXU77NPZxA1CvHv/XWGFx2sgqXa",
#   "success": "true",
#   "hash": "8f1b004cbd837de560b9257b61443f9ae21ee24f4561c87b8f2bb3a6fa7627e0",
#   "version": "2.7.10",
#   "entries": [
#     {
#       "group": "group2",
#       "login": "example_test_login",
#       "name": "example_test",
#       "password": "example_test_password",
#       "uuid": "4cbbe6a7efeb46458c5501e7203209e5",
#       "stringFields": [],
#       "totp": "579423"
#     }
#   ]
# }

Save associates

from keepassxc_protocol import Connection

con = Connection()
con.associate() # Associate request for current ACTIVE database

associates = con.dump_associate_json() # Get ALL associates as json string

with open("associates.json", "w") as f:
    f.write(associates)

Load associates

from keepassxc_protocol import Connection

con = Connection()

with open("associates.json", "r") as f:
    associates = f.read()

con.load_associates_json(associates) # Load associates from json string.
                                     # This REPLACES the current associates if they exist.

response = con.get_logins("https://example.test") # Get ALL data for example.test.

Features

Actions (link):

  • ✅associate
  • ✅change-public-keys
  • ❌create-new-group
  • ❌generate-password
  • ✅get-database-gropus
  • ✅get-databasehash
  • ✅get-logins
  • ❎get-totp (deprecated? totp is available in get-logins)
  • ❌lock-database
  • ❌request-autotype
  • ❌set-login
  • ✅test-associate
  • ❌passkey-get
  • ❌passkey-register

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

keepassxc_protocol-1.0.0.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

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

keepassxc_protocol-1.0.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file keepassxc_protocol-1.0.0.tar.gz.

File metadata

  • Download URL: keepassxc_protocol-1.0.0.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.13.7 Windows/11

File hashes

Hashes for keepassxc_protocol-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a416d69bcd04793d40f6e6120e7171e726b37c452f4a730d2d49a9b8f8ba5bc7
MD5 171eb59ccd1842604da6daa3a0cfac49
BLAKE2b-256 2ca3b1aa37ae7fbb66c811c36fb0e1aa63c134e262387869353e27091e9b17c6

See more details on using hashes here.

File details

Details for the file keepassxc_protocol-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for keepassxc_protocol-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 07e5a3761bbe17f519c1efa45f707685199b0a955a30fce14993af4e4528978b
MD5 2fdc364539345907ea25b60a6669706f
BLAKE2b-256 f22445b213fe2d930a4cf1e9e6593de0cd870d1b1038e21214808f86a14423b3

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