Skip to main content

An unofficial Python wrapper for the LastPass CLI (lpass).

Project description

LastPass Vault Py

An unofficial, Pythonic wrapper for the LastPass CLI (lpass).

Disclaimer: This project is an unofficial, community-driven tool. It is not affiliated with, maintained, or endorsed by LastPass, LogMeIn, or GoTo Technologies. No claim is made to the LastPass name, brand, trademarks, or intellectual property.

Features

  • Secure authentication via the official lpass CLI
  • Full vault management — list, search, retrieve, add, edit, move, delete, and duplicate entries
  • Password generation via lpass generate
  • Vault backup and restore via CSV export/import
  • All sensitive values (passwords, CSV data) transmitted to lpass via stdin — never via command-line arguments
  • Sync control, background sync, and trust/plaintext-key login options
  • Robust error handling and mock-friendly design for testing

Prerequisites

The LastPass CLI must be installed:

  • Ubuntu/Debian: sudo apt install lastpass-cli
  • macOS: brew install lastpass-cli

Installation

pip install lastpass-vault-py

Quick Start

from lastpass_vault import LastPassVault

vault = LastPassVault()

if not vault.is_logged_in():
    vault.login("user@example.com")

items = vault.list_items()
for item in items:
    print(item['name'])

password = vault.get_password("My Site")

Contributing

See CONTRIBUTING.md for details.

License

The project code is licensed under the GNU General Public License v3 (GPLv3). See LICENSE for the full text.

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

lastpass_vault_py-0.3.0.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

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

lastpass_vault_py-0.3.0-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file lastpass_vault_py-0.3.0.tar.gz.

File metadata

  • Download URL: lastpass_vault_py-0.3.0.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for lastpass_vault_py-0.3.0.tar.gz
Algorithm Hash digest
SHA256 472fab2068b191532c6a6578d860b1dacd8795583d512a027a91716fa322ed53
MD5 4c301633be82c9aa4d5c8bdc29accb58
BLAKE2b-256 322ad99c0a136c83057d800788778b9810eccfe3e422022ebadbe7625aa8c2ab

See more details on using hashes here.

File details

Details for the file lastpass_vault_py-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lastpass_vault_py-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 700a09e4c0dce42c2abf37dd7efad2430cdc99cdcbc1e0d7bfc136b0b53a0cd9
MD5 3c3b2a1ffbdf6052089baf4d45b543f1
BLAKE2b-256 528b45521aebd0061260f2cd671b5b85cf72f109eec3f0e6ff3195335d5f9c79

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