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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for password_state_client-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 990bc4572837a88937f3a87717453707323fdb13730d524d4fe322319cf841bc |
|
MD5 | 3b6801417ede7cf5637721a6ecc3d041 |
|
BLAKE2b-256 | c5e0358bb14a7fc6248c32986590c725121d97f72233f25ca5049f2c5ebe9849 |