This repository contains practical examples for working with the Passwork API using approaches:
- DevOps/CI workflows via
passwork-cli(retrieving secrets, searching by tags/folders, direct API calls) - Programmatic integrations via the Python connector (create/read/update/delete objects, sessions, shortcuts, snapshots, etc.)
This repository does not contain the sources of the CLI or the connector — only usage examples.
Requires Python 3.10+.
pip install git+ssh://git@github.com:passwork-me/passwork-python.git
or
pip install git+https://github.com/passwork-me/passwork-python.git-
python/— examples that use the Python connector to interact with Passwork.- Includes examples for: creating company vaults and vaults (
create_company_vault.md,create_private_vault.md), CRUD for items (create_item.md,get_item.md,get_items.md,update_item.md,delete_item.md), search (search_item.md,search_shortcut.md), shortcuts (create_shortcut.md,get_shortcut.md), snapshots (get_snapshot.md), sessions and tokens (session.md,refresh_token.md), direct calls (general_call.md), user and links (create_user.md,create_link.md), inbox and SSL options (get_inbox_item.md,no_ssl_verify.md), vault retrieval (get_vault.md).
- Includes examples for: creating company vaults and vaults (
-
cli/— copy‑ready recipes for DevOps/CI pipelines usingpasswork-cli.- Open the corresponding files for scenarios:
single_password.md— fetch a single secretmultiple_passwords.md— fetch multiple secretssearch_by_tags.md— search by tagsfolder_search.md— search in a foldercustom_fields.md— work with custom fieldsrefresh_token.md— refresh tokensdirect_api_call.md— direct API callscmd_parameter.md— pass secrets as command parametersget.md— get items and shortcuts, extract specific fields, generate TOTP codesupdate.md— update data items
- Open the corresponding files for scenarios:
-
pipelines/— CI example usingpasswork-cliin a pipeline environment.pipeline.ymldemonstrates:- retrieving database credentials to run migrations
- retrieving API/deploy keys to run deployment scripts
- sending a notification via a direct API call
- Uses the Docker image
passwork-cli:latestas the build image.
- API overview: API and integrations — intro
- Python connector: Python connector
- CLI utility: CLI utility
- Docker image for CLI: Docker container for CLI
- Source code (Python connector and CLI): passwork-me/passwork-python
MIT — see LICENSE.