Name | hatch-aws-publisher JSON |
Version |
0.3.0
JSON |
| download |
home_page | None |
Summary | Hatch plugin for deploying to AWS with SAM |
upload_time | 2023-04-19 17:22:11 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT License
Copyright (c) 2022 [pj]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
keywords |
aws
hatch
lambda
plugin
sam
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<!-- markdownlint-disable-file no-inline-html first-line-h1 -->
<div align="center">
# hatch-aws-publisher
[![PyPI - Version](https://img.shields.io/pypi/v/hatch-aws-publisher.svg)](https://pypi.org/project/hatch-aws-publisher) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hatch-aws-publisher.svg)](https://pypi.org/project/hatch-aws-publisher) [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch) [![code style - black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![types - mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/python/mypy) [![imports - isort](https://img.shields.io/badge/imports-isort-ef8336.svg)](https://github.com/pycqa/isort)
AWS publisher plugin for **[Hatch 🥚🐍](<https://hatch.pypa.io/latest/>)**. *Hatch is modern, extensible Python project manager.*
</div>
---
## Table of Contents
- [hatch-aws-publisher](#hatch-aws-publisher)
- [Table of Contents](#table-of-contents)
- [How to enable](#how-to-enable)
- [How to use it](#how-to-use-it)
- [Options](#options)
- [section `tool.hatch.publish.aws`](#section-toolhatchpublishaws)
- [section `tool.hatch.publish.aws.sam`](#section-toolhatchpublishawssam)
- [section `tool.hatch.publish.aws.sam.env.<env-name>`](#section-toolhatchpublishawssamenvenv-name)
- [License](#license)
## How to enable
Plugin must be installed in the same environment as `Hatch` itself.
```bash
python -m venv .venv
.venv/bin/pip install hatch-aws-publisher
```
## How to use it
The [publisher plugin](https://hatch.pypa.io/latest/plugins/publisher/reference) name is called `aws`.
1. Build you app with [SAM](https://aws.amazon.com/serverless/sam/). You can use my Hatch plugin [hatch-aws](https://github.com/aka-raccoon/hatch-aws).
2. Put your SAM config to `pyproject.toml` (stack name is by default name of your project):
```toml
[project]
name = "my-app"
[tool.hatch.publish.aws.sam]
region = "us-west-1"
confirm_changeset = false
fail_on_empty_changeset = false
force_upload = true
capabilities = "CAPABILITY_IAM"
s3_bucket = "my-bucket"
parameter_overrides = ["stage=dev"]
[tool.hatch.publish.aws.sam.tags]
job = "batman"
name = "bruce"
```
3. Publish (deploy) your app.
```bash
hatch publish -p aws
```
### Options
#### section `tool.hatch.publish.aws`
This section allows to modify behavior of the plugin. Available options:
```toml
[tool.hatch.publish.aws]
stack_name_append_env = true
stack_name_prefix = "super-"
stack_name_suffix = "-man"
deploy = true
```
All above options can be overwritten using a CLI parameter
```shell
.venv/hatch/bin/hatch publish -p aws -o stack_name_prefix="bat-"
```
- **stack_name_prefix**: adds a prefix to a stack name -> `bat-my-app`
- **stack_name_suffix**: adds a suffix to a stack name -> `bat-my-app-man`
- **stack_name_append_env**: adds a selected environment to a stack name -> `bat-my-app-man-dev`
- **deploy**: if it's `false`, only sam config will be generated, but `sam deploy` will not be executed
#### section `tool.hatch.publish.aws.sam`
Default values for SAM. You can use any key:value pair available in [SAM config](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-config.html).
Only difference is format of tags (they use separate section):
```toml
[tool.hatch.publish.aws.sam.tags]
job = "batman"
name = "bruce"
```
#### section `tool.hatch.publish.aws.sam.env.<env-name>`
You can define specific deployment environments. They inherit values from [tool.hatch.publish.aws.sam](#section-toolhatchpublishawssam).
Environment settings in `pyproject.toml`:
```toml
[tool.hatch.publish.aws.sam]
region = "us-west-1"
confirm_changeset = false
fail_on_empty_changeset = false
force_upload = true
capabilities = "CAPABILITY_IAM"
[tool.hatch.publish.aws.sam.env.dev]
region = "us-west-2"
s3_bucket = "dev-bucket"
parameter_overrides = ["stage=dev"]
[tool.hatch.publish.aws.sam.env.prd]
s3_bucket = "prd-bucket"
parameter_overrides = ["stage=prd"]
fail_on_empty_changeset = true
```
You need to specify an environment using a CLI parameter:
```bash
hatch publish -p aws -o env=dev
```
## License
Plugin `hatch-aws-publisher` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
Raw data
{
"_id": null,
"home_page": null,
"name": "hatch-aws-publisher",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "aws,hatch,lambda,plugin,sam",
"author": null,
"author_email": "aka-raccoon <aka-raccoon@pm.me>",
"download_url": "https://files.pythonhosted.org/packages/1e/df/64eee8df0265638d067a664859a900fb9117ddaebed1ea9118e08663f47a/hatch_aws_publisher-0.3.0.tar.gz",
"platform": null,
"description": "<!-- markdownlint-disable-file no-inline-html first-line-h1 -->\n<div align=\"center\">\n\n# hatch-aws-publisher\n\n[![PyPI - Version](https://img.shields.io/pypi/v/hatch-aws-publisher.svg)](https://pypi.org/project/hatch-aws-publisher) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hatch-aws-publisher.svg)](https://pypi.org/project/hatch-aws-publisher) [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch) [![code style - black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![types - mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/python/mypy) [![imports - isort](https://img.shields.io/badge/imports-isort-ef8336.svg)](https://github.com/pycqa/isort)\n\nAWS publisher plugin for **[Hatch \ud83e\udd5a\ud83d\udc0d](<https://hatch.pypa.io/latest/>)**. *Hatch is modern, extensible Python project manager.*\n\n</div>\n\n---\n\n## Table of Contents\n\n- [hatch-aws-publisher](#hatch-aws-publisher)\n - [Table of Contents](#table-of-contents)\n - [How to enable](#how-to-enable)\n - [How to use it](#how-to-use-it)\n - [Options](#options)\n - [section `tool.hatch.publish.aws`](#section-toolhatchpublishaws)\n - [section `tool.hatch.publish.aws.sam`](#section-toolhatchpublishawssam)\n - [section `tool.hatch.publish.aws.sam.env.<env-name>`](#section-toolhatchpublishawssamenvenv-name)\n - [License](#license)\n\n## How to enable\n\nPlugin must be installed in the same environment as `Hatch` itself.\n\n```bash\npython -m venv .venv\n.venv/bin/pip install hatch-aws-publisher\n```\n\n## How to use it\n\nThe [publisher plugin](https://hatch.pypa.io/latest/plugins/publisher/reference) name is called `aws`.\n\n1. Build you app with [SAM](https://aws.amazon.com/serverless/sam/). You can use my Hatch plugin [hatch-aws](https://github.com/aka-raccoon/hatch-aws).\n2. Put your SAM config to `pyproject.toml` (stack name is by default name of your project):\n\n ```toml\n [project]\n name = \"my-app\"\n\n [tool.hatch.publish.aws.sam]\n region = \"us-west-1\"\n confirm_changeset = false\n fail_on_empty_changeset = false\n force_upload = true\n capabilities = \"CAPABILITY_IAM\"\n s3_bucket = \"my-bucket\"\n parameter_overrides = [\"stage=dev\"]\n\n [tool.hatch.publish.aws.sam.tags]\n job = \"batman\"\n name = \"bruce\"\n ```\n\n3. Publish (deploy) your app.\n\n ```bash\n hatch publish -p aws\n ```\n\n### Options\n\n#### section `tool.hatch.publish.aws`\n\nThis section allows to modify behavior of the plugin. Available options:\n\n```toml\n[tool.hatch.publish.aws]\nstack_name_append_env = true\nstack_name_prefix = \"super-\"\nstack_name_suffix = \"-man\"\ndeploy = true\n```\n\nAll above options can be overwritten using a CLI parameter\n\n```shell\n.venv/hatch/bin/hatch publish -p aws -o stack_name_prefix=\"bat-\"\n```\n\n- **stack_name_prefix**: adds a prefix to a stack name -> `bat-my-app`\n- **stack_name_suffix**: adds a suffix to a stack name -> `bat-my-app-man`\n- **stack_name_append_env**: adds a selected environment to a stack name -> `bat-my-app-man-dev`\n- **deploy**: if it's `false`, only sam config will be generated, but `sam deploy` will not be executed\n\n#### section `tool.hatch.publish.aws.sam`\n\nDefault values for SAM. You can use any key:value pair available in [SAM config](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-config.html).\n\nOnly difference is format of tags (they use separate section):\n\n```toml\n[tool.hatch.publish.aws.sam.tags]\njob = \"batman\"\nname = \"bruce\"\n```\n\n#### section `tool.hatch.publish.aws.sam.env.<env-name>`\n\nYou can define specific deployment environments. They inherit values from [tool.hatch.publish.aws.sam](#section-toolhatchpublishawssam).\n\nEnvironment settings in `pyproject.toml`:\n\n```toml\n[tool.hatch.publish.aws.sam]\nregion = \"us-west-1\"\nconfirm_changeset = false\nfail_on_empty_changeset = false\nforce_upload = true\ncapabilities = \"CAPABILITY_IAM\"\n\n[tool.hatch.publish.aws.sam.env.dev]\nregion = \"us-west-2\"\ns3_bucket = \"dev-bucket\"\nparameter_overrides = [\"stage=dev\"]\n\n[tool.hatch.publish.aws.sam.env.prd]\ns3_bucket = \"prd-bucket\"\nparameter_overrides = [\"stage=prd\"]\nfail_on_empty_changeset = true\n```\n\nYou need to specify an environment using a CLI parameter:\n\n```bash\nhatch publish -p aws -o env=dev\n```\n\n## License\n\nPlugin `hatch-aws-publisher` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2022 [pj]\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "Hatch plugin for deploying to AWS with SAM",
"version": "0.3.0",
"split_keywords": [
"aws",
"hatch",
"lambda",
"plugin",
"sam"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "7c61266039987faed0d49c9af4a44c0731b383fdc581d938a8b1086b86a217e1",
"md5": "a9ab1be2f1dce3edbda1af822747c8c2",
"sha256": "4911e5cb7b2026cc0a103be9ffe3c405087b4d0eee72083d9511f6d7e2d839b3"
},
"downloads": -1,
"filename": "hatch_aws_publisher-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a9ab1be2f1dce3edbda1af822747c8c2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 6181,
"upload_time": "2023-04-19T17:22:09",
"upload_time_iso_8601": "2023-04-19T17:22:09.874521Z",
"url": "https://files.pythonhosted.org/packages/7c/61/266039987faed0d49c9af4a44c0731b383fdc581d938a8b1086b86a217e1/hatch_aws_publisher-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "1edf64eee8df0265638d067a664859a900fb9117ddaebed1ea9118e08663f47a",
"md5": "94e8788d1ff665d59d79794cca5441b6",
"sha256": "9f7c0bb2f90d15a2fcfe27847f792de6e050170132baf57a30ee059f2a8912a5"
},
"downloads": -1,
"filename": "hatch_aws_publisher-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "94e8788d1ff665d59d79794cca5441b6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 5388,
"upload_time": "2023-04-19T17:22:11",
"upload_time_iso_8601": "2023-04-19T17:22:11.878622Z",
"url": "https://files.pythonhosted.org/packages/1e/df/64eee8df0265638d067a664859a900fb9117ddaebed1ea9118e08663f47a/hatch_aws_publisher-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-19 17:22:11",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "hatch-aws-publisher"
}