1Password/connect-sdk-python
关于
Python SDK for 1Password Connect
开发工具实测星标增长
- 24小时
- 0
- 7天
- +1
- 15天
- +2
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文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 onepasswordconnectsdkExport 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=90Use 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 [email protected].
探索相关项目
加载中…