aliyun-secret-manager-client


Namealiyun-secret-manager-client JSON
Version 0.1.4 PyPI version JSON
download
home_page
SummaryAlibaba Cloud Secrets Manager Client implementation for Python
upload_time2023-11-27 11:39:12
maintainerAlibaba Cloud
docs_urlNone
authorAlibaba Cloud
requires_python
licenseApache License 2.0
keywords aliyun kms secrets-manager
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Aliyun Secrets Manager Client for Python
========================================

The Aliyun Secrets Manager Client for Python enables Python developers
to easily work with Aliyun KMS Secrets.

Read this in other languages: 简体中文
<https://github.com/aliyun/aliyun-secretsmanager-client-python/blob/master/README.zh-cn.rst>

-  `Aliyun Secrets Manager Client
   Homepage <https://help.aliyun.com/document_detail/190269.html?spm=a2c4g.11186623.6.621.201623668WpoMj>`__
-  `Issues <https://github.com/aliyun/aliyun-secretsmanager-client-python/issues>`__
-  `Release <https://github.com/aliyun/aliyun-secretsmanager-client-python/releases>`__

License
-------

`Apache License
2.0 <https://www.apache.org/licenses/LICENSE-2.0.html>`__

Features
--------

-  Provide quick integration capability to gain secret information
-  Provide Alibaba secrets cache ( memory cache or encryption file cache
   )
-  Provide tolerated disaster by the secrets with the same secret name
   and secret data in different regions
-  Provide default backoff strategy and user-defined backoff strategy

Requirements
------------

Python 2.7,3.5,3.6,3.7,3.8,3.9

Install
-------

Install the official release version through PIP (taking Linux as an
example):

.. code:: bash

   $ pip install aliyun-secret-manager-client

You can also install the unzipped installer package directly:

.. code:: bash

   $ sudo python setup.py install

Sample Code
-----------

Ordinary User Sample Code
~~~~~~~~~~~~~~~~~~~~~~~~~

-  Build Secrets Manager Client by system environment variables (`system
   environment variables setting for details <README_environment.md>`__)

.. code:: python

   from alibaba_cloud_secretsmanager_client.secret_manager_cache_client_builder import SecretManagerCacheClientBuilder

   if __name__ == '__main__':
       secret_cache_client = SecretManagerCacheClientBuilder.new_client()
       secret_info = secret_cache_client.get_secret_info("#secretName#")
       print(secret_info.__dict__)

-  Build Secrets Manager Client by the given parameters(accessKey,
   accessSecret, regionId, etc)

.. code:: python

   import os

   from alibaba_cloud_secretsmanager_client.secret_manager_cache_client_builder import SecretManagerCacheClientBuilder
   from alibaba_cloud_secretsmanager_client.service.default_secret_manager_client_builder import DefaultSecretManagerClientBuilder

   if __name__ == '__main__':
       secret_cache_client = SecretManagerCacheClientBuilder.new_cache_client_builder(DefaultSecretManagerClientBuilder.standard() \
           .with_access_key(os.getenv("#accessKeyId#"), os.getenv("#accessKeySecret#")) \
           .with_region("#regionId#").build()) \
       .build();
       secret_info = secret_cache_client.get_secret_info("#secretName#")
       print(secret_info.__dict__)

Particular User Sample Code
~~~~~~~~~~~~~~~~~~~~~~~~~~~

-  Use custom parameters or customized implementation

.. code:: python

   import os

   from alibaba_cloud_secretsmanager_client.secret_manager_cache_client_builder import SecretManagerCacheClientBuilder
   from alibaba_cloud_secretsmanager_client.cache.file_cache_secret_store_strategy import FileCacheSecretStoreStrategy
   from alibaba_cloud_secretsmanager_client.service.default_secret_manager_client_builder import DefaultSecretManagerClientBuilder
   from alibaba_cloud_secretsmanager_client.service.default_refresh_secret_strategy import DefaultRefreshSecretStrategy
   from alibaba_cloud_secretsmanager_client.service.full_jitter_back_off_strategy import FullJitterBackoffStrategy

   if __name__ == '__main__':
       secret_cache_client = SecretManagerCacheClientBuilder \
       .new_cache_client_builder(DefaultSecretManagerClientBuilder.standard().with_access_key(os.getenv("#accessKeyId#"), os.getenv("#accessKeySecret#")) \
            .with_back_off_strategy(FullJitterBackoffStrategy(3, 2000, 10000)) \
            .with_region("#regionId#").build()) \
        .with_cache_secret_strategy(FileCacheSecretStoreStrategy("#cacheSecretPath#", True,"#salt#")) \
        .with_refresh_secret_strategy(DefaultRefreshSecretStrategy("#ttlName#")) \
        .with_cache_stage("#stage#") \
        .with_secret_ttl("#secretName#", 1 * 60 * 1000l) \
        .build()
       secret_info = secret_cache_client.get_secret_info("#secretName#")
       print(secret_info.__dict__)
            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "aliyun-secret-manager-client",
    "maintainer": "Alibaba Cloud",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "aliyun,kms,secrets-manager",
    "author": "Alibaba Cloud",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/fd/1c/3834a00911ea614caa49c33890e443d008128e7f30519375fc0eade5e530/aliyun-secret-manager-client-0.1.4.tar.gz",
    "platform": null,
    "description": "Aliyun Secrets Manager Client for Python\n========================================\n\nThe Aliyun Secrets Manager Client for Python enables Python developers\nto easily work with Aliyun KMS Secrets.\n\nRead this in other languages: \u7b80\u4f53\u4e2d\u6587\n<https://github.com/aliyun/aliyun-secretsmanager-client-python/blob/master/README.zh-cn.rst>\n\n-  `Aliyun Secrets Manager Client\n   Homepage <https://help.aliyun.com/document_detail/190269.html?spm=a2c4g.11186623.6.621.201623668WpoMj>`__\n-  `Issues <https://github.com/aliyun/aliyun-secretsmanager-client-python/issues>`__\n-  `Release <https://github.com/aliyun/aliyun-secretsmanager-client-python/releases>`__\n\nLicense\n-------\n\n`Apache License\n2.0 <https://www.apache.org/licenses/LICENSE-2.0.html>`__\n\nFeatures\n--------\n\n-  Provide quick integration capability to gain secret information\n-  Provide Alibaba secrets cache ( memory cache or encryption file cache\n   )\n-  Provide tolerated disaster by the secrets with the same secret name\n   and secret data in different regions\n-  Provide default backoff strategy and user-defined backoff strategy\n\nRequirements\n------------\n\nPython 2.7\uff0c3.5\uff0c3.6\uff0c3.7\uff0c3.8\uff0c3.9\n\nInstall\n-------\n\nInstall the official release version through PIP (taking Linux as an\nexample):\n\n.. code:: bash\n\n   $ pip install aliyun-secret-manager-client\n\nYou can also install the unzipped installer package directly:\n\n.. code:: bash\n\n   $ sudo python setup.py install\n\nSample Code\n-----------\n\nOrdinary User Sample Code\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\n-  Build Secrets Manager Client by system environment variables (`system\n   environment variables setting for details <README_environment.md>`__)\n\n.. code:: python\n\n   from alibaba_cloud_secretsmanager_client.secret_manager_cache_client_builder import SecretManagerCacheClientBuilder\n\n   if __name__ == '__main__':\n       secret_cache_client = SecretManagerCacheClientBuilder.new_client()\n       secret_info = secret_cache_client.get_secret_info(\"#secretName#\")\n       print(secret_info.__dict__)\n\n-  Build Secrets Manager Client by the given parameters(accessKey,\n   accessSecret, regionId, etc)\n\n.. code:: python\n\n   import os\n\n   from alibaba_cloud_secretsmanager_client.secret_manager_cache_client_builder import SecretManagerCacheClientBuilder\n   from alibaba_cloud_secretsmanager_client.service.default_secret_manager_client_builder import DefaultSecretManagerClientBuilder\n\n   if __name__ == '__main__':\n       secret_cache_client = SecretManagerCacheClientBuilder.new_cache_client_builder(DefaultSecretManagerClientBuilder.standard() \\\n           .with_access_key(os.getenv(\"#accessKeyId#\"), os.getenv(\"#accessKeySecret#\")) \\\n           .with_region(\"#regionId#\").build()) \\\n       .build();\n       secret_info = secret_cache_client.get_secret_info(\"#secretName#\")\n       print(secret_info.__dict__)\n\nParticular User Sample Code\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n-  Use custom parameters or customized implementation\n\n.. code:: python\n\n   import os\n\n   from alibaba_cloud_secretsmanager_client.secret_manager_cache_client_builder import SecretManagerCacheClientBuilder\n   from alibaba_cloud_secretsmanager_client.cache.file_cache_secret_store_strategy import FileCacheSecretStoreStrategy\n   from alibaba_cloud_secretsmanager_client.service.default_secret_manager_client_builder import DefaultSecretManagerClientBuilder\n   from alibaba_cloud_secretsmanager_client.service.default_refresh_secret_strategy import DefaultRefreshSecretStrategy\n   from alibaba_cloud_secretsmanager_client.service.full_jitter_back_off_strategy import FullJitterBackoffStrategy\n\n   if __name__ == '__main__':\n       secret_cache_client = SecretManagerCacheClientBuilder \\\n       .new_cache_client_builder(DefaultSecretManagerClientBuilder.standard().with_access_key(os.getenv(\"#accessKeyId#\"), os.getenv(\"#accessKeySecret#\")) \\\n            .with_back_off_strategy(FullJitterBackoffStrategy(3, 2000, 10000)) \\\n            .with_region(\"#regionId#\").build()) \\\n        .with_cache_secret_strategy(FileCacheSecretStoreStrategy(\"#cacheSecretPath#\", True,\"#salt#\")) \\\n        .with_refresh_secret_strategy(DefaultRefreshSecretStrategy(\"#ttlName#\")) \\\n        .with_cache_stage(\"#stage#\") \\\n        .with_secret_ttl(\"#secretName#\", 1 * 60 * 1000l) \\\n        .build()\n       secret_info = secret_cache_client.get_secret_info(\"#secretName#\")\n       print(secret_info.__dict__)",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "Alibaba Cloud Secrets Manager Client implementation for Python",
    "version": "0.1.4",
    "project_urls": null,
    "split_keywords": [
        "aliyun",
        "kms",
        "secrets-manager"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fd1c3834a00911ea614caa49c33890e443d008128e7f30519375fc0eade5e530",
                "md5": "b909db8ddcf275faef8eb62feea5c176",
                "sha256": "2c40cb775e2c4e43b5633842becc5ab64611377ca9ad067072aace0278ccf330"
            },
            "downloads": -1,
            "filename": "aliyun-secret-manager-client-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "b909db8ddcf275faef8eb62feea5c176",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 22394,
            "upload_time": "2023-11-27T11:39:12",
            "upload_time_iso_8601": "2023-11-27T11:39:12.303244Z",
            "url": "https://files.pythonhosted.org/packages/fd/1c/3834a00911ea614caa49c33890e443d008128e7f30519375fc0eade5e530/aliyun-secret-manager-client-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-27 11:39:12",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "aliyun-secret-manager-client"
}
        
Elapsed time: 0.37563s