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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file password_state_client-1.0.0-py3-none-any.whl.
File metadata
- Download URL: password_state_client-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
990bc4572837a88937f3a87717453707323fdb13730d524d4fe322319cf841bc
|
|
| MD5 |
3b6801417ede7cf5637721a6ecc3d041
|
|
| BLAKE2b-256 |
c5e0358bb14a7fc6248c32986590c725121d97f72233f25ca5049f2c5ebe9849
|