Imports metadata from 1Password vaults and allows for bulk manipulation of tags
Project description
python-one-password
Tag editor for 1Password
Gathers vault and credential JSON metadata from 1Password databases; enables bulk manipulation of tags
Getting Started
Before running these tools, you will need to install the 1Password CLI for your operating system.
1Password CLI <https://developer.1password.com/docs/cli/get-started/>
Installation
The python-one-password tool and its dependencies can be installed from PyPI using the standard Python PIP command:
% python3 -m pip install python_one_password
Interactive Help
The primary command and sub-commands have embedded help, which can be accessed as shown below:
% python-one-password --help % python-one-password credentials --help % python-one-password tags --help
Importing Credentials
The first step required to begin working with the 1Password database is to import credentials from one or more vault(s).
The first command that creates an interaction with the 1Password CLI tools is likely to generate an authentication prompt.
Note: supply your password and/or biometric data to unlock the 1Password database if/when prompted
You can then import credentials from one or more vaults, as shown below for a vault called “Testing”:
% python-one-password credentials fetch -n -i Testing Importing data from 1Password database... Total number of vaults: 20 Vaults imported into cache: 1 ########## Vault Summary ########## ID Name cnx76s6avkg3xikw6u5bf7jdki Testing Importing credential metadata from 1Password database... Credential data gathered for: 1 vault(s) Credential metadata records loaded: 5 Loaded cached JSON metadata: [5] records Review current credential state? (y/n): y ### Credentials: Current State ### yczzflaacyziwew2ahy24kqdxi Test4 gbikz2upboavuksupx65xb5fie Test5 fkn3cp42ouua47rqtnergchm6q Test3 rfoxd64sumvzbk2m7nkruyvr5e Test1 xiu64ukcwxtxfco7j2wjcf36eq Test2
Once a set of credentials have been loaded, you can review them with:
% python-one-password credentials show Loaded cached JSON metadata: [5] records ### Credentials: Current State ### gbikz2upboavuksupx65xb5fie [] Test5 fkn3cp42ouua47rqtnergchm6q ['c3po', 'luke', 'r2d2', 'chewbacca'] Test3 yczzflaacyziwew2ahy24kqdxi [] Test4 rfoxd64sumvzbk2m7nkruyvr5e ['c3po', 'luke', 'chewbacca'] Test1 xiu64ukcwxtxfco7j2wjcf36eq ['c3po', 'luke', 'r2d2', 'chewbacca'] Test2
You can subsequently refine your selection using match/reject search patterns:
% python-one-password credentials refine --reject chewbacca Loaded cached JSON metadata: [5] records Matching query: [3] chewbacca Subsequently rejected: 3/5 Credentials now selected: 2 Review current credential state? (y/n): y ### Credentials: Current State ### yczzflaacyziwew2ahy24kqdxi [] Test4 gbikz2upboavuksupx65xb5fie [] Test5 Update working credential set to selection? (y/n): y
When you have obtained a suitable set of credentials to work with, you can move on to tag manipulation.
Making Changes & Contributing
This project uses pre-commit, please make sure to install it before making any changes:
% pip install pre-commit % cd python-one-password % pre-commit install
It is a good idea to update the hooks to the latest version:
``% pre-commit autoupdate``
Don’t forget to tell your contributors to also install and use pre-commit.
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
Built Distribution
File details
Details for the file python_one_password-0.1.1.tar.gz
.
File metadata
- Download URL: python_one_password-0.1.1.tar.gz
- Upload date:
- Size: 38.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76c990eda4dc9fafae7851bf723b053e8ca04d363e81e480999a8d17a64bdf19 |
|
MD5 | 612b665facfc9784be2ba1371d22f0d5 |
|
BLAKE2b-256 | 8bff4f4a34bb60757494c6db800d9ac19cc31263ce43de5708b95a802c7edf2f |
File details
Details for the file python_one_password-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: python_one_password-0.1.1-py3-none-any.whl
- Upload date:
- Size: 22.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf00b16cd7cc36dfa38280c5b62962df4a4bf5e516457f80d043a79eca9bda58 |
|
MD5 | c4a5d1bb557fe39813ce8855b9ef3c59 |
|
BLAKE2b-256 | 7454d5b03c658cdabffecc3f358f8d6ca23026f37a775f97c5c36886c0606b6d |