1Password Connect SDK for Python
Access your 1Password items in your Python applications through your self-hosted 1Password Connect server.
The 1Password Connect SDK provides access to 1Password via 1Password Connect hosted in your infrastructure. The library is intended to be used by Python applications to simplify accessing items in 1Password vaults.
This project is licensed under MIT. Use of the 1Password APIs and services accessed through these tools is governed by the 1Password API Terms of Service.
🪄 See it in action
Check the Python Connect SDK Example to see an example of item manipulation using the SDK that you can execute on your machine.
✨ Get started
-
Install the 1Password Connect Python SDK:
pip install onepasswordconnectsdk
-
Export the
OP_CONNECT_HOSTandOP_CONNECT_TOKENenvironment variables:export OP_CONNECT_HOST=<your-connect-host> && \ export OP_CONNECT_TOKEN=<your-connect-token>
2.1 If you need a higher timeout on the client requests you can export
OP_CONNECT_CLIENT_REQ_TIMEOUTenvironment variable:# set the timeout to 90 seconds export OP_CONNECT_CLIENT_REQ_TIMEOUT=90
-
Use the SDK:
-
Read a secret:
from onepasswordconnectsdk.client import ( Client, new_client_from_environment, ) connect_client: Client = new_client_from_environment() client.get_item("{item_id}", "{vault_id}")
-
Write a secret:
from onepasswordconnectsdk.client import ( Client, new_client_from_environment, } from onepasswordconnectsdk.models import ( Item, ItemVault, Field ) connect_client: Client = new_client_from_environment() # Example item creation. Create an item with your desired arguments. item = Item( vault=ItemVault(id=op_vault), id="custom_id", title="newtitle", category="LOGIN", tags=["1password-connect"], fields=[Field(value="new_user", purpose="USERNAME")], ) new_item = connect_client.create_item(op_vault, item)
-
For more examples of how to use the SDK, check out USAGE.md.
💙 Community & Support
- File an issue for bugs and feature requests.
- Join the Developer Slack workspace.
- Subscribe to the Developer Newsletter.
🔐 Security
1Password requests you practice responsible disclosure if you discover a vulnerability.
Please file requests by sending an email to bugbounty@agilebits.com.
Metadata
Release files for onepasswordconnectsdk 2.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| onepasswordconnectsdk-2.1.1.tar.gz | 18.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| onepasswordconnectsdk-2.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.8 kB
Release files / onepasswordconnectsdk-2.1.1.tar.gz
| Download URL | onepasswordconnectsdk-2.1.1.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
40e533921e5805e46fd790765d9a262ff18a6922b0dd6eb05a9e6556c0a55874
|
|
BLAKE2b-256 checksum How to use checksums |
8dd6b09cc05a1100242e901879c661a38f34e05a4578c50a61ac4c4ea7766cc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / onepasswordconnectsdk-2.1.1-py3-none-any.whl
| Download URL | onepasswordconnectsdk-2.1.1-py3-none-any.whl |
|---|---|
| Size | 34.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
568769dda44940c9672a5721804c6eabf084fbb315aef2bc3e04414f380330c7
|
|
BLAKE2b-256 checksum How to use checksums |
87ef8b8a338e25673885ae7898643c955886a25fc7bce15426ac265e3d5c954b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for onepasswordconnectsdk 2.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.