Metadata-Version: 2.1
Name: s1crets
Version: 0.0.10
Summary: Convenience wrapper for AWS Parameter Store/Secrets Manager
Home-page: https://github.com/bra-fsn/s1crets
Author: NAGY, Attila
Author-email: nagy.attila@gmail.com
License: UNKNOWN
Project-URL: Documentation, https://s1crets.readthedocs.io/en/latest/index.html
Project-URL: Issue tracker, https://github.com/bra-fsn/s1crets/issues
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
License-File: LICENSE

s1crets
=======

s1crets is a thin Python wrapper to read secrets from cloud resources.
Wherever supported, it can be used to read/update non-encrypted values as well.

You can find its documentation at `readthedocs.io
<https://s1crets.readthedocs.io/en/latest/>`_

Installing
----------

Install and update using `pip`_:

.. code-block:: text

    pip install -U s1crets

A Simple Example
----------------

.. code-block:: python

    # Using AWS Parameter Store
    import s1crets.providers.aws
    ps = s1crets.providers.aws.ParameterStore()
    ps.get('/prod/databases/mysql/bigdb/root')
    ps.get_by_path('/prod/databases/mysql')
    ps.path_exists('/prod/databases/mysql')
    ps.update('/prod/databases/mysql/bigdb/root', 'S3cr3Tp4Ssw0Rd!^')

    # AWS Secrets Manager
    sm = s1crets.providers.aws.SecretsManager()
    sm.get('prod/databases/mysql/bigdb/root')
    sm.path_exists('prod/databases/mysql')
    sm.update('prod/databases/mysql/bigdb/root', 'S3cr3Tp4Ssw0Rd!^')


.. code-block:: text

    $ s1crets get secrets/json_test
    {'level1': {'level2': 3}}
    $ s1crets get secrets/json_test level1
    {'level2': 3}
    $ s1crets get secrets/json_test level1 level2
    3


Getting secrets from a different (than configured) region:

.. code-block:: python

    import s1crets.providers.aws
    sm = s1crets.providers.aws.SecretsManager(sts_args={"aws_region": "us-east-1"})
    sm.get("secret-from-us-east-1")


This library is developed and used internally at `System1
<https://system1.com/>`_

.. _pip: https://pip.pypa.io/en/stable/quickstart/


