Skip to main content

The 1Password Python SDK offers programmatic read access to your secrets in 1Password in an interface native to Python.

Project description

1Password Python SDK

Build integrations that programmatically access your secrets in 1Password.

Documentation | Examples


Requirements

The 1Password Python SDK is compatible with:

  • python 3.9 or later
  • libssl 3
  • glibc 2.32 or later

If you're running a Linux distribution that still uses libssl version 1.1.1, such as Debian 11 or Ubuntu 20.04, you'll need to update to a later version of Linux or install the required dependencies.

🚀 Get started

To use the 1Password Python SDK in your project:

  1. Create a service account and give it the appropriate permissions in the vaults where the items you want to use with the SDK are saved.

  2. Provision your service account token. We recommend provisioning your token from the environment. For example, to export your token to the OP_SERVICE_ACCOUNT_TOKEN environment variable:

    macOS or Linux

    export OP_SERVICE_ACCOUNT_TOKEN=<your-service-account-token>
    

    Windows

    $Env:OP_SERVICE_ACCOUNT_TOKEN = "<your-service-account-token>"
    
  3. Install the 1Password Python SDK in your project:

    pip install onepassword-sdk
    
  4. Use the Python SDK in your project:

import asyncio
import os
from onepassword.client import Client

async def main():
    # Gets your service account token from the OP_SERVICE_ACCOUNT_TOKEN environment variable.
    token = os.getenv("OP_SERVICE_ACCOUNT_TOKEN")

    # Connects to 1Password. Fill in your own integration name and version.
    client = await Client.authenticate(auth=token, integration_name="My 1Password Integration", integration_version="v1.0.0")

    # Retrieves a secret from 1Password. Takes a secret reference as input and returns the secret to which it points.
    value = await client.secrets.resolve("op://vault/item/field")
    # use value here

if __name__ == '__main__':
    asyncio.run(main())

Make sure to use secret reference URIs with the syntax op://vault/item/field to securely load secrets from 1Password into your code.

Supported functionality

1Password SDKs are in active development. We're keen to hear what you'd like to see next. Let us know by upvoting or filing an issue.

Item management

Operations:

Field types:

  • API Keys
  • Passwords
  • Concealed fields
  • Text fields
  • Notes
  • SSH private keys, public keys, fingerprint and key type
  • One-time passwords
  • URLs
  • Websites (used to suggest and autofill logins)
  • Phone numbers
  • Credit card types
  • Credit card numbers
  • Emails
  • References to other items
  • Address
  • Date
  • MM/YY
  • File attachments and Document items
  • Menu
  • Passkeys

Vault management

  • Retrieve vaults
  • Create vaults (#36)
  • Update vaults
  • Delete vaults
  • List vaults

User & access management

  • Provision users
  • Retrieve users
  • List users
  • Suspend users
  • Create groups
  • Update group membership
  • Update vault access & permissions

Compliance & reporting

Authentication

📖 Learn more

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

onepassword_sdk-0.3.2.tar.gz (31.6 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

onepassword_sdk-0.3.2-cp313-cp313-win_amd64.whl (5.8 MB view details)

Uploaded CPython 3.13Windows x86-64

onepassword_sdk-0.3.2-cp313-cp313-manylinux_2_32_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.32+ x86-64

onepassword_sdk-0.3.2-cp313-cp313-manylinux_2_32_aarch64.whl (6.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.32+ ARM64

onepassword_sdk-0.3.2-cp313-cp313-macosx_11_0_arm64.whl (6.1 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

onepassword_sdk-0.3.2-cp313-cp313-macosx_10_13_x86_64.whl (6.3 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

onepassword_sdk-0.3.2-cp312-cp312-win_amd64.whl (5.8 MB view details)

Uploaded CPython 3.12Windows x86-64

onepassword_sdk-0.3.2-cp312-cp312-manylinux_2_32_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.32+ x86-64

onepassword_sdk-0.3.2-cp312-cp312-manylinux_2_32_aarch64.whl (6.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.32+ ARM64

onepassword_sdk-0.3.2-cp312-cp312-macosx_11_0_arm64.whl (6.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

onepassword_sdk-0.3.2-cp312-cp312-macosx_10_9_x86_64.whl (6.3 MB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

onepassword_sdk-0.3.2-cp311-cp311-win_amd64.whl (5.8 MB view details)

Uploaded CPython 3.11Windows x86-64

onepassword_sdk-0.3.2-cp311-cp311-manylinux_2_32_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.32+ x86-64

onepassword_sdk-0.3.2-cp311-cp311-manylinux_2_32_aarch64.whl (6.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.32+ ARM64

onepassword_sdk-0.3.2-cp311-cp311-macosx_11_0_arm64.whl (6.1 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

onepassword_sdk-0.3.2-cp311-cp311-macosx_10_9_x86_64.whl (6.3 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

onepassword_sdk-0.3.2-cp310-cp310-win_amd64.whl (5.8 MB view details)

Uploaded CPython 3.10Windows x86-64

onepassword_sdk-0.3.2-cp310-cp310-manylinux_2_32_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.32+ x86-64

onepassword_sdk-0.3.2-cp310-cp310-manylinux_2_32_aarch64.whl (6.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.32+ ARM64

onepassword_sdk-0.3.2-cp310-cp310-macosx_11_0_arm64.whl (6.1 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

onepassword_sdk-0.3.2-cp310-cp310-macosx_10_9_x86_64.whl (6.3 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

onepassword_sdk-0.3.2-cp39-cp39-win_amd64.whl (5.8 MB view details)

Uploaded CPython 3.9Windows x86-64

onepassword_sdk-0.3.2-cp39-cp39-manylinux_2_32_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.32+ x86-64

onepassword_sdk-0.3.2-cp39-cp39-manylinux_2_32_aarch64.whl (6.8 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.32+ ARM64

onepassword_sdk-0.3.2-cp39-cp39-macosx_11_0_arm64.whl (6.1 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

onepassword_sdk-0.3.2-cp39-cp39-macosx_10_9_x86_64.whl (6.3 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

Details for the file onepassword_sdk-0.3.2.tar.gz.

File metadata

  • Download URL: onepassword_sdk-0.3.2.tar.gz
  • Upload date:
  • Size: 31.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for onepassword_sdk-0.3.2.tar.gz
Algorithm Hash digest
SHA256 c06308e7a2059694b633f704001bd28a88fffa4c196854e0c3c1f9fa0c749092
MD5 238f0b1a53cac4d0e886d065f9c1b771
BLAKE2b-256 d64870fc0d0c5ba9a399968bd647f2b30d9bf370c1bf93baf3db6763cbb1ed1c

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ef014a475033e50236766b50fc8a3cbe22a41576e674c1068a65b13aec50543c
MD5 74b9f8c1412cc17503497b3d9a0b635e
BLAKE2b-256 60f9f40b4a1f599bf0280a184b26c855beab84b392fe1a2fe1b341fb67481031

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp313-cp313-manylinux_2_32_x86_64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp313-cp313-manylinux_2_32_x86_64.whl
Algorithm Hash digest
SHA256 092ec666ceb804b2ddb0b9d26527a5758a9a28a127e59140cfea3455e8904b14
MD5 066480f1f3cea0791ab72dce66a6394d
BLAKE2b-256 981521f4c5ad1d9ce49e2ff3658f48166fa00d7ab71f3294588d063306dff523

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp313-cp313-manylinux_2_32_aarch64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp313-cp313-manylinux_2_32_aarch64.whl
Algorithm Hash digest
SHA256 1c3e4a0f014d68722dc5ad6e31bce41093aba20124267d4a3d58e75f8f6fc7f4
MD5 288a38851b33e1f76ee05e801f8b16a0
BLAKE2b-256 230074f4f4517312cdba676d973dd9f846deac1c08a1a2b569188043b56f7ffc

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 98946ac52f1dfedf2f0df3b70bf8afe99ddac0d5a3f6e50715879f38ea0db1e7
MD5 1f7ed9b8031c5f6e33f8b0a480b68bcd
BLAKE2b-256 96ff6acdd9cfc00e8dd9396955ef206b307ad14c29fff5c7ea920864813f7df4

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 430b574f90be8447145992dcbf99ac9954ae55d0ec323dba9b473ccc7b88163c
MD5 bf4b6958196155b064211d80846ed68d
BLAKE2b-256 202a5e502a4bc5ab1974a65f6c6041f565a4dc1ca1439046d69aa45e7d4fa844

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 63d0ef315fa407496e27aebfb10456602c6c52a3658c47460275372870d0c71d
MD5 450416480136d50b35bde37550b4cc5a
BLAKE2b-256 4ab6027478f31b1ef9fc9e7fea5bd31f51d01a3ab4e0b1948d68a545dedf325e

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp312-cp312-manylinux_2_32_x86_64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp312-cp312-manylinux_2_32_x86_64.whl
Algorithm Hash digest
SHA256 3067f18abc560e8a97782762cef4872967c3cb2c849ee4364be67767dd1df71b
MD5 0ad65d5c416fa55ee4590514a510836d
BLAKE2b-256 877f87e905570c364934628f801cff36ccc974fcd759c0f7c0f055dd51e0c659

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp312-cp312-manylinux_2_32_aarch64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp312-cp312-manylinux_2_32_aarch64.whl
Algorithm Hash digest
SHA256 0a8626f8a84f93b8e46e832a19564c20f7597f7e74e67a6593f7baa79fc7c212
MD5 50402a84301d5ff697f39db54e6a3aaa
BLAKE2b-256 660ad94e8f085b3f2b67f195935bb85c877d26c6dccd35b39b94517c84ce323d

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f44851bc62d26c6031ec462c1bc3af88b361c6053b813c1cff7e1113e18da0af
MD5 e3d2ff8443b9c18f0d4997e15ec431c4
BLAKE2b-256 490a8f879883595a0d1ecb7f33ad87894e92fd817a33a3b737423e2f8da69544

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cd78ddacf54377d015a3f1865103a9baca386b38aa271d79aac0fe59073b8990
MD5 27262b8d0e1989af1136dac9185b03f1
BLAKE2b-256 f59bf9def226fc33c87a2b55a40d07d8f731a28be54a343afcc61099df418f72

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6e15dcd088b47d2a6f30873a7a6c8569a1036072cd6a38ea89c6b92e80a4bf25
MD5 bf5b300f0c0844281ec74657c1a180ea
BLAKE2b-256 467ba27cb2799f949b9ab08614b45598fb6d358cf80f1a5c1be9784150bac5be

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp311-cp311-manylinux_2_32_x86_64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp311-cp311-manylinux_2_32_x86_64.whl
Algorithm Hash digest
SHA256 62f488aa3d9d728e6dbf909f5fe03a2e14380e2d0b1951b0f8ed65a6b0d03537
MD5 45d273c12802f4030b84927f57356556
BLAKE2b-256 7c5602c90e6c99eacfbaa62bc77ea2a046226a9247aeac1674c5b7d7c6c3fd7b

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp311-cp311-manylinux_2_32_aarch64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp311-cp311-manylinux_2_32_aarch64.whl
Algorithm Hash digest
SHA256 5d51a73cc3ce1e1a47c95ae7f70223932babbc8cfe503371cbc1363e8a1cc732
MD5 8bd7d7f401d29a1ef54f0c12b4dc8f96
BLAKE2b-256 082e4cb5a4ec38ff22f3b86a64706033b602b9f5df847061fd8aa02c4a6fab19

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b6b80f67911baadad7097f86e92f45b6f303456ea6051e4ecb5e8f80b5182d52
MD5 c61582029a42dcbca68ca5e982d10dc7
BLAKE2b-256 ce310a72c048f99439051e6b7c563609158e8da5b6b3e3b468ab48e7c779a6d6

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d985293ecaa986269d7e1f5eeb23b67b79693b9f20df40e5fa02914c60dd10fd
MD5 542143f5f83fb10f43dab1e2e857e0e9
BLAKE2b-256 71fe6f5387178e4519ed147e15c7437fa57a754e990fcc215fafa66dc25174fd

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9ba924fe83f44e0108e35f93a73797cb75a701c66ad4f45f5c9739888e27e3c5
MD5 a647bde78d674f0d69f0e425a974bcff
BLAKE2b-256 10ffc276c0f48daacae21195d464bb5c7d8dfa02b2bc0b729048ac7f7156e8d6

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp310-cp310-manylinux_2_32_x86_64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp310-cp310-manylinux_2_32_x86_64.whl
Algorithm Hash digest
SHA256 342ce152fc533f3b2fee8c9e839eac91bfacb461cf12caca082eee9ef032e4ce
MD5 f2d68ff4444c4444c5e967ed5318a2aa
BLAKE2b-256 5d6992af9385c63993517e446c909b05224c9f41e8b183af22e9977337f43013

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp310-cp310-manylinux_2_32_aarch64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp310-cp310-manylinux_2_32_aarch64.whl
Algorithm Hash digest
SHA256 0c4acb6d821b8b131e3fa9fbcdb2df780937e5a6ede9eac0184a3cec01b6b42a
MD5 55c159e33b5248862508035d1c524881
BLAKE2b-256 0ccc106f29609eda0bfead45ecd5f98141d418e5a10461ea26a8fee641a0ceff

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 335530129f1eb2ee308b3dd5081c504d475d07e37b0798e7a33830642fa495d4
MD5 fae7cef180d027d935f5c316df53daf0
BLAKE2b-256 65a895778b5aabb036d047c376f3ce4ba8bd285362e3ebeb3a01cffa25f8b3bb

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 01c18e5110b939cea8c18d1feb2b161a27d009e46a58e6aa35b9ef9b71a08a52
MD5 8dde0420b9ece7470d0edf676466cc65
BLAKE2b-256 cf675f19a52dd368cddfc2f1121782e833ca42d4f7876d7de76944097fbaa4b6

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a6c548ce491c6d55cae61635f9e7fa29bb20d4ec3f32e7380e5055cf7ecca387
MD5 92f99e67b7ab6d93a3ede38aab64c396
BLAKE2b-256 fa8a25dd38eb37111fdacbec02c803ebf216c141c1e1d81e29fb14a2ea9bb21d

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp39-cp39-manylinux_2_32_x86_64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp39-cp39-manylinux_2_32_x86_64.whl
Algorithm Hash digest
SHA256 963af1fa1466e794783a657ac25a93d88b0c1e6330354fd8509aeaf0acc9164c
MD5 7137a1d5a46cfd94029d777e79867435
BLAKE2b-256 cbeb86f450df04eccbc1317b8316061e768c93554e9fc0facb0185dcf60ef387

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp39-cp39-manylinux_2_32_aarch64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp39-cp39-manylinux_2_32_aarch64.whl
Algorithm Hash digest
SHA256 be4382eb5d007c153b0c6c8c096c46280b9d35b513f44bc0fe09a2078dda563f
MD5 9a273537387094a143a725a883d1afd8
BLAKE2b-256 b36d81a56216dcc1db7c0e259da3b7c9c290158d0f5ab1c93ed2ab78a8fb9829

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 76bb47fd06ef4f8231e0d04c85606dee66c37f50ef0541fc24e88d56a5156931
MD5 f5c521d34663b59bd05f7742a9bc24dd
BLAKE2b-256 0472e75e54e985a4affdf0e5d9b5a9c3945dc0583ce32c1f62d6ee0faef78c41

See more details on using hashes here.

File details

Details for the file onepassword_sdk-0.3.2-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for onepassword_sdk-0.3.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9116696cd26f53419423128a9e15c4d634921b9c82d1e6ebf038a9dc3eb795af
MD5 d295f7f1e299eba765ba216962b52ec8
BLAKE2b-256 84c9c57b228b379375e71d06084b7f7b26dfb874b994d0db96e30553cc2b34aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page