{"id":20924423,"url":"https://github.com/validus-risk-management/partifact","last_synced_at":"2025-05-13T16:31:11.710Z","repository":{"id":57450909,"uuid":"400570629","full_name":"Validus-Risk-Management/partifact","owner":"Validus-Risk-Management","description":"CodeArtifact login for poetry based Python repositories.","archived":false,"fork":false,"pushed_at":"2023-09-09T12:59:41.000Z","size":155,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-24T13:22:52.865Z","etag":null,"topics":["aws","cli","codeartifact","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Validus-Risk-Management.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-27T16:24:39.000Z","updated_at":"2024-01-26T14:02:13.000Z","dependencies_parsed_at":"2022-09-26T17:31:36.562Z","dependency_job_id":null,"html_url":"https://github.com/Validus-Risk-Management/partifact","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Validus-Risk-Management%2Fpartifact","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Validus-Risk-Management%2Fpartifact/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Validus-Risk-Management%2Fpartifact/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Validus-Risk-Management%2Fpartifact/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Validus-Risk-Management","download_url":"https://codeload.github.com/Validus-Risk-Management/partifact/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253981750,"owners_count":21994327,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cli","codeartifact","python"],"created_at":"2024-11-18T20:22:04.396Z","updated_at":"2025-05-13T16:31:06.702Z","avatar_url":"https://github.com/Validus-Risk-Management.png","language":"Python","readme":"# partifact\n\npartifact is a tool to help with configuring and authenticating CodeArtifact as a repository for [Poetry](https://github.com/python-poetry/poetry) and [pip](https://pip.pypa.io/en/stable/).\n\n[AWS CLI](https://docs.aws.amazon.com/cli/latest/reference/codeartifact/login.html) offers functionality to configure CodeArtifact for pip.\nThis tool offers the following improvements over the CLI:\n1. Poetry support.\n1. Assuming an AWS role to get the token. This is handy in automated pipelines, which may have the access key and secret key as environment variables,\n  but want to install packages from CodeArtifact on a different account.\n1. Configuration persisted in a config file, making the tool more convenient to use than the CLI with the options it requires to be passed in from the command line.\n\n\n# How to use it?\n\nInstall partifact from pypi using pip the usual way:\n\n```shell\npip install partifact\n```\n\nIt's best to do this globally, rather than inside the virtualenv.\n\nBefore you can use partifact, the Poetry source repository needs to be\n[configured](https://python-poetry.org/docs/repositories/#install-dependencies-from-a-private-repository)\nin `pyproject.toml`.\n\n```toml\n[[tool.poetry.source]]\nname = \"my-repo\"\nurl = \"https://{code_artifact_domain}-{aws_account}.d.codeartifact.{aws_region}.amazonaws.com/pypi/{code_artifact_repository}/simple/\"\ndefault = true  # if this should be the default repository to install from\n```\n\nIf you are publishing to the repository, the `/simple/` suffix is not required at the end.\n\nOnce Poetry is configured, you can use the partifact command to authenticate:\n\n```shell\npartifact login my-repo\n```\n\n\u003e **NOTE**: Make sure your run the command from the directory where your `pyproject.toml` is!\n\n\nOptionally, you can pass in an AWS profile and/or AWS role to use\nfor CodeArtifact token generation.\n\n```shell\npartifact login myrepo --profile myprofile\npartifact login myrepo --role myrole\n```\n\nIf you would also like to configure `global.index-url` in the `pip` config,\nyou can do so through the `--configure-pip` flag.\n\n```shell\npartifact login myrepo --profile myprofile --configure-pip\n```\n\n# Known issues\n\n1. The `CodeArtifact` token seems to exceed the maximum length allowed in Windows Credential Manager, resulting\nin a misleading `(1783, 'CredWrite', 'The stub received bad data.')` error. The library has been tested on macOS.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalidus-risk-management%2Fpartifact","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalidus-risk-management%2Fpartifact","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalidus-risk-management%2Fpartifact/lists"}