Psono API interface for python
Project description
Psono python module
This module is intended to allow you to interface with psono, a self hosted/cloud hosted open source secret manager.
This module has been developed by http://www.cybersecure.com/ . We provide managed backups and data resilience.
Authentication
You can either set it in the code as per below, or you can set it in the environment, and it will login automagically.
export PSONO_API_KEY_ID=
export PSONO_API_PRIVATE_KEY=
export PSONO_API_SECRET_KEY=
export PSONO_API_SERVER_URL=https://psono.org.com/server
export PSONO_API_SERVER_PUBLIC_KEY=
export PSONO_API_SERVER_SIGNATURE=
Simple examples
import psonoapi
# This connects to the psono public server by default.
psonoserver=psonoapi.PsonoServerConfig(key_id='b3b5c964-50d2-40d7-a0f0-69ae43c498d3',
private_key='test'
secret_key='test')
psono = psonoapi.PsonoAPI(serverconfig=psonoserver)
# getting a secret (this requires full api)
mysecret = psono.get_path('sharename/foldername/secretname')
# getting a secret
mysecret = psono.get_secret(secret_id='b3b5c964-50d2-40d7-a0f0-69ae43c498d3')
# Getting a list of secrets that apply to a urlfilter:
mysecrets = psono.search_urlfilter('example.com')
# Updating (works as long as you have write permissions)
mysecret.title = 'I want a new title'
psono.update_secret(mysecret)
# You could also use write_secret instead
psono.write_secret(mysecret)
# Creating a new secret
newsecret = psono.generate_new_secret('website_password') # must be one of psonoapi.psono_type_list
newsecret : psonoapi.models.PsonoApplicationPassword # set the type to make life easy for yourself.
newsecret.path = 'existingfolder/newfolder/secretname'
newsecret.password = '1234'
newsecret.username = 'myusername'
newsecret.title = 'My special new secret'
psono.write_secret(newsecret)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file psonoapi-0.2.1.tar.gz.
File metadata
- Download URL: psonoapi-0.2.1.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0b1d779f6832b203b856054c9c1b136bb7231932ebd852deada51652c89cc8c
|
|
| MD5 |
db42a962b956de8b8a7ce53f11ea2f62
|
|
| BLAKE2b-256 |
a8810a7bf86bd09cfa2abc9934c2c5fc8788dd30b3ebd8cc75bcc8b7f376aaf4
|
File details
Details for the file psonoapi-0.2.1-py3-none-any.whl.
File metadata
- Download URL: psonoapi-0.2.1-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f22d0cb7c2e078f358177fc79d5806748d4d95f4543eebcf5f46235ab08ce1e3
|
|
| MD5 |
759fa83c2413ac18d95bb780f8949a79
|
|
| BLAKE2b-256 |
1cc94f125d35ac408b822b2bf7f1d4d70e7178b5392c3ca148a880268888ac10
|