A package to retrieve passwords from the Passwordstate API
Project description
passwords package
A package to interface with the Passwordstate API to retrieve passwords.
Setup
Install dependencies in requirements.txt
Initialize an object with the api base url and the api key:
- api_base_url (str): the base url of the Passwordstate api
- api_key (str): the api secret key
api_base_url = "https://passwords.mydomain.com"
api_key = "123mykey789"
pw_lookup = passwords.PasswordstateLookup(
api_base_url,
api_key
)
Usage
Use the object's methods to find passwords. eg:
pw_lookup.get_pw_by_title(5678, "my_password_title")
# returns the password with the given title in the given password list, as a string
or
pw_lookup.get_pw(1234)
# returns the password with id 1234 as a string
or
pw_lookup.get_pw_list(5678)
# returns a list of dictionaries including passwords for the password list with id 5678
Retrieve the username and password for a given account by its ID or title:
pw_lookup.get_login_by_title(5678, "my_password_title")
# returns a dictionary with the username and password for the account with the given title in the given password list
or
pw_lookup.get_login(1234)
# returns a dictionary with the username and password for the account with id 1234
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
Close
Hashes for password-state-client-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11178d32087e8adb52aca2960de4714cdc87513ccd762209bc0f21cfb893e5f0 |
|
MD5 | e3a873cb84b22900ba17598d107849b7 |
|
BLAKE2b-256 | 7a0c9bd03394a3ad9e1f8baee21bf20e7fc82194218cf003b3fc3f0363bde385 |