Skip to main content

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(api_key='b3b5c964-50d2-40d7-a0f0-69ae43c498d3',
                                    api_private_key='test'
                                    api_secret_key='test')
psono = psonoapi.PsonoAPI(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)

# 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


Download files

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

Source Distribution

psonoapi-0.0.8.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

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

psonoapi-0.0.8-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file psonoapi-0.0.8.tar.gz.

File metadata

  • Download URL: psonoapi-0.0.8.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for psonoapi-0.0.8.tar.gz
Algorithm Hash digest
SHA256 2661564ba2ace01b6a5cf56d0b5a01bcd88f870257bca91f21d2aaa1d62105c1
MD5 3c76ad446241aa2dca872ba903b1a821
BLAKE2b-256 0f8818ea568ff3080fe24bdefba30ce62abbcc5163888193a6c9db1c5d3c26bf

See more details on using hashes here.

File details

Details for the file psonoapi-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: psonoapi-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for psonoapi-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b72c9ca7bdaaf3ad6486c120a9af3b99b71fd43890e21bcca14cb7f2a1d74c91
MD5 4f22a165c5c0b9d418d728ed5fbb944e
BLAKE2b-256 c90ac86d6b0ee77c71955f3c261f927f8ce87e57397f4aed20ccf4de91d95fe6

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