Python connector
Passwork Python Connector is a tool that simplifies integration of Passwork for programmers and DevOps engineers. The connector allows quick and secure automation of password, vault, and access management without diving into the details of low-level API interaction and cryptography.
Main features and benefits
- Integration simplification: The connector eliminates the need to manually implement API, encryption, and sessions. All basic operations are reduced to simple methods.
- Client-side security: All client cryptography (encryption, decryption, master key) is implemented inside the connector. Your secrets are always protected — even when working with open API.
- Session management: The connector allows saving and restoring sessions to avoid the need to re-authorize on every script run.
- Flexibility: For all API methods that are not covered by separate connector functions, a universal call method is implemented. With it, you can access any Passwork API endpoints while maintaining security and convenience.
Usage examples
- Creating a new password
password = {
"name": "Service Name",
"login": "username",
"password": "secure-password",
"vaultId": vault_id,
"folderId": folder_id, # Optional
"description": "Description",
"url": "https://service-url.com",
"tags": ["tag1", "tag2"],
"customs": [
{
"name": "Additional login",
"value": "second-username",
"type": "text"
},
{
"name": "Recovery code",
"value": "recovery-code-value",
"type": "password"
},
{
"name": "TOTP",
"value": "JBSWY3DPEHPK3PXP",
"type": "totp"
}
],
"attachments": [
{
"path": "path/to/file.png",
"name": "file.png"
}
]
}
password_id = client.create_password(password)
- Direct API calls for operations not covered by helper methods:
# Direct API call
response = client.call("DELETE", f"/api/v1/folders/{folder_id}")
What Python connector is suitable for
- Password and vault management automation from Python scripts;
- Passwork integration with CI/CD pipelines and internal services;
- Secure centralized access management and change auditing;
- Quick Passwork implementation in corporate infrastructure without deep API knowledge.
Security
- All secrets are encrypted and decrypted only on the client side (if client-side encryption is enabled);
- Session data can be stored in encrypted form;
- All operations use a master key that never leaves your environment.