huaweicloud-csms-environ


Namehuaweicloud-csms-environ JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/C0D1UM/huaweicloud-csms-environ
Summary
upload_time2022-12-09 10:54:42
maintainer
docs_urlNone
authorCODIUM
requires_python>=3.8,<4.0
licenseMIT
keywords huaweicloud csms environment-variables
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # huaweicloud-csms-environ

[![GitHub](https://img.shields.io/github/license/C0D1UM/huaweicloud-csms-environ)](https://github.com/C0D1UM/huaweicloud-csms-environ/blob/main/LICENSE)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/C0D1UM/huaweicloud-csms-environ/CI)](https://github.com/C0D1UM/huaweicloud-csms-environ/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/C0D1UM/huaweicloud-csms-environ/branch/main/graph/badge.svg?token=PN19DJ3SDF)](https://codecov.io/gh/C0D1UM/huaweicloud-csms-environ)
[![PyPI](https://img.shields.io/pypi/v/huaweicloud-csms-environ)](https://pypi.org/project/huaweicloud-csms-environ/)  
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/huaweicloud-csms-environ)](https://github.com/C0D1UM/huaweicloud-csms-environ)

## Installation

```bash
pip install huaweicloud-csms-environ
```

## Sample Usage

```python
import csms

# basic
csms.load_env('secret-name', region='ap-southeast-2')

# project id instead of region
csms.load_env('secret-name', project_id='project-id')

# using pure environment variables
csms.load_env()

# no environment variables
csms.load_env(
   'secret_name',
   access_key='access-key',
   secret_key='secret-key',
   region='ap-southeast-2',
)
```

## Environment Variables

| Key                          | SDK | Description                    |
| ---------------------------- | --- | ------------------------------ |
| `HUAWEICLOUD_SDK_AK`         | Yes | Access key of Huawei Cloud IAM |
| `HUAWEICLOUD_SDK_SK`         | Yes | Secret key of Huawei Cloud IAM |
| `HUAWEICLOUD_SDK_PROJECT_ID` | Yes | Huawei Cloud project ID        |
| `HUAWEICLOUD_REGION`         | No  | Huawei Cloud region            |
| `HUAWEICLOUD_SECRET_NAME`    | No  | CSMS secret name               |

> For more SDK variables, please see [this](https://github.com/huaweicloud/huaweicloud-sdk-python-v3#241-environment-variables-top).

## Development

### Requirements

- Docker
- Python
- Poetry

### Linting

```bash
make lint
```

### Testing

```bash
make test
```

### Fix Formatting

```bash
make yapf
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/C0D1UM/huaweicloud-csms-environ",
    "name": "huaweicloud-csms-environ",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "huaweicloud,csms,environment-variables",
    "author": "CODIUM",
    "author_email": "support@codium.co",
    "download_url": "https://files.pythonhosted.org/packages/dd/fa/cde0c160818a12edae099c78f1ebb4e3422da0b671f5156db53df988284a/huaweicloud_csms_environ-0.1.2.tar.gz",
    "platform": null,
    "description": "# huaweicloud-csms-environ\n\n[![GitHub](https://img.shields.io/github/license/C0D1UM/huaweicloud-csms-environ)](https://github.com/C0D1UM/huaweicloud-csms-environ/blob/main/LICENSE)\n[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/C0D1UM/huaweicloud-csms-environ/CI)](https://github.com/C0D1UM/huaweicloud-csms-environ/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/C0D1UM/huaweicloud-csms-environ/branch/main/graph/badge.svg?token=PN19DJ3SDF)](https://codecov.io/gh/C0D1UM/huaweicloud-csms-environ)\n[![PyPI](https://img.shields.io/pypi/v/huaweicloud-csms-environ)](https://pypi.org/project/huaweicloud-csms-environ/)  \n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/huaweicloud-csms-environ)](https://github.com/C0D1UM/huaweicloud-csms-environ)\n\n## Installation\n\n```bash\npip install huaweicloud-csms-environ\n```\n\n## Sample Usage\n\n```python\nimport csms\n\n# basic\ncsms.load_env('secret-name', region='ap-southeast-2')\n\n# project id instead of region\ncsms.load_env('secret-name', project_id='project-id')\n\n# using pure environment variables\ncsms.load_env()\n\n# no environment variables\ncsms.load_env(\n   'secret_name',\n   access_key='access-key',\n   secret_key='secret-key',\n   region='ap-southeast-2',\n)\n```\n\n## Environment Variables\n\n| Key                          | SDK | Description                    |\n| ---------------------------- | --- | ------------------------------ |\n| `HUAWEICLOUD_SDK_AK`         | Yes | Access key of Huawei Cloud IAM |\n| `HUAWEICLOUD_SDK_SK`         | Yes | Secret key of Huawei Cloud IAM |\n| `HUAWEICLOUD_SDK_PROJECT_ID` | Yes | Huawei Cloud project ID        |\n| `HUAWEICLOUD_REGION`         | No  | Huawei Cloud region            |\n| `HUAWEICLOUD_SECRET_NAME`    | No  | CSMS secret name               |\n\n> For more SDK variables, please see [this](https://github.com/huaweicloud/huaweicloud-sdk-python-v3#241-environment-variables-top).\n\n## Development\n\n### Requirements\n\n- Docker\n- Python\n- Poetry\n\n### Linting\n\n```bash\nmake lint\n```\n\n### Testing\n\n```bash\nmake test\n```\n\n### Fix Formatting\n\n```bash\nmake yapf\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "",
    "version": "0.1.2",
    "split_keywords": [
        "huaweicloud",
        "csms",
        "environment-variables"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "65a9fd8af3b240687213dbc42af9ef3c",
                "sha256": "60df4989619c7ef30feb0b1563b7a790e1c30ec693102eb44a616d7d8a7ae542"
            },
            "downloads": -1,
            "filename": "huaweicloud_csms_environ-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "65a9fd8af3b240687213dbc42af9ef3c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 3940,
            "upload_time": "2022-12-09T10:54:41",
            "upload_time_iso_8601": "2022-12-09T10:54:41.265129Z",
            "url": "https://files.pythonhosted.org/packages/2c/74/219c6c52ae3614e59ca3cd912c284111caffe42a9b6f7bd1bc1c707f54f1/huaweicloud_csms_environ-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "960629c235605a7b496dd18997c6fd85",
                "sha256": "573f2e358b4669280156274c020c3cb578131f98cde8cc38ce86dd12c727b1d1"
            },
            "downloads": -1,
            "filename": "huaweicloud_csms_environ-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "960629c235605a7b496dd18997c6fd85",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 3619,
            "upload_time": "2022-12-09T10:54:42",
            "upload_time_iso_8601": "2022-12-09T10:54:42.642496Z",
            "url": "https://files.pythonhosted.org/packages/dd/fa/cde0c160818a12edae099c78f1ebb4e3422da0b671f5156db53df988284a/huaweicloud_csms_environ-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-09 10:54:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "C0D1UM",
    "github_project": "huaweicloud-csms-environ",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "huaweicloud-csms-environ"
}
        
Elapsed time: 0.01609s