A poetry plugin that configures AWS CodeArtifact
Project description
POETRY-PARTIFACT-PLUGIN
This project is a poetry plugin that wraps the poetry add/install commands and adds some logic
that will authenticate to AWS CodeArtifact under the hood.
Before any poetry add or install commands are run, this plugin will check the pyproject.toml file
for any codeartifact sources.
It is looking for the first tool.poetry.source block that contains .codeartifact. in its url.
The required fields are "url" and "name."
If the tool doesn't find any valid source blocks, nothing happens.
Configuration
Create a tool.poetry.source block in your pyproject.toml file, then set the "url" to the CodeArtifact repository url, and set the "name" to the id of the AWS profile you'll be using to authenticate.
Here's an example of a valid tool.poetry.source block (the default=true is optional):
[[tool.poetry.source]]
name = "<your-aws-profile-name>"
url = "https://<your-domain-name>-<your-project-id>.d.codeartifact.<your-region>.amazonaws.com/pypi/<your-repo-name>/simple/"
default = true
Installation
To install the plugin, run this command:
poetry self add poetry-partifact-plugin
Uninstallation
To remove the plugin, run this command:
poetry self remove poetry-partifact-plugin
Under the Hood
Once the plugin has gotten your repository url and the name of the AWS profile you'll be using, it uses the AWS profile credentials located at ~/.aws/credentials to make an API request to your AWS CodeArtifact repository.
If this request is successful, a short-lived token will be returned that will grant temporary access. This token is set as a poetry environment variable and allows poetry to seamlessly authenticate to the repository.
Dependencies
License
Copyright 2023 Amino Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file poetry_partifact_plugin-0.1.1.tar.gz.
File metadata
- Download URL: poetry_partifact_plugin-0.1.1.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24d5fccef480c0bc2814b2df815d822f124fe9b27fc5e29714244d8b9a24e2f6
|
|
| MD5 |
bc9e708274b5d01d6d1982250fce5e52
|
|
| BLAKE2b-256 |
b7906e42d81081e559e9132ee11585e4d8531891b70fe88fa2ace34ffdfbfc2b
|
File details
Details for the file poetry_partifact_plugin-0.1.1-py3-none-any.whl.
File metadata
- Download URL: poetry_partifact_plugin-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d4240db4060fb35ce5cbb880c9c9470bf9b7a08bf2fb275cfe5691578b4137a
|
|
| MD5 |
e46b312199cfa4518ff8ceb1472cace2
|
|
| BLAKE2b-256 |
08dfaaf251f612f125d5fdc5c8becfbe90e5c939d02f94a60ca0fc2754596d36
|