{"id":19785729,"url":"https://github.com/cartyc/ar-python-packages","last_synced_at":"2026-02-13T01:38:38.397Z","repository":{"id":186333796,"uuid":"632991712","full_name":"cartyc/ar-python-packages","owner":"cartyc","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-26T14:46:19.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-30T09:35:20.302Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cartyc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-04-26T14:46:02.000Z","updated_at":"2023-04-26T14:46:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"5e700335-9e43-472c-8d80-a039de6adc54","html_url":"https://github.com/cartyc/ar-python-packages","commit_stats":null,"previous_names":["cartyc/ar-python-packages"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cartyc/ar-python-packages","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cartyc%2Far-python-packages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cartyc%2Far-python-packages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cartyc%2Far-python-packages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cartyc%2Far-python-packages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cartyc","download_url":"https://codeload.github.com/cartyc/ar-python-packages/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cartyc%2Far-python-packages/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29392009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T00:53:09.511Z","status":"ssl_error","status_checked_at":"2026-02-13T00:53:09.126Z","response_time":55,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-12T06:15:35.861Z","updated_at":"2026-02-13T01:38:38.376Z","avatar_url":"https://github.com/cartyc.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Packages in Artifact Registry Example\n\nThis repo is a simple example of using Artifact Registry to store Python Packages. The official docs can be found[here](https://cloud.google.com/artifact-registry/docs/python)\n\n## Environment\n\nSet the project environment variable\n```\nexport PROJECT_ID=your-project-id\n```\n\nConfig gcloud to use this by default\n```\ngcloud config set project $PROJECT_ID\n```\n\n## Install Twine\n\nThis will be used to push the python packages to AR\n\n```\npip install twine\n```\n\n## Create an Artifact Registry\n\nCreate the AR instance to store the Python Pacakages\n\n```\ngcloud artifacts repositories create python \\\n    --repository-format=python \\\n    --location=northamerica-northeast1 \\\n    --description=\"Python packages for in Artifact Registry\"\n```\n\nSet the AR in your gcloud configs\n```\ngcloud config set artifacts/repository python\n```\n\n## Authentication\n\nInstall keyring to store the credentials for PIP twine to authenticate with against the AR instance.\n\n```\npip install keyring\npip install keyrings.google-artifactregistry-auth\ngcloud auth application-default login\n```\n\n## Packages!\n\nCreate a dir to store the packages in\n```\nmkdir pip-packages\nmkdir pip-packages/dist\ncd pip-packages\n```\n\ncat the packages list into a `requirements.txt` file so we can tell pip to download them.\n```\ncat \u003c\u003cEOF \u003e requirements.txt\nflask \nrequests \nwaitress \ngoogle-auth \ngoogle-cloud-storage \nmarshmallow \ngoogle-cloud-asset \nprotobuf \ngoogle-cloud-logging \ngoogle-cloud-securitycenter\nEOF\n```\n\n### Download the packages\n\n```\npip download -r requirements.txt -d dist\n```\n\n### Upload Packages to AR\n```\npython3 -m twine upload --repository-url https://northamerica-northeast1-python.pkg.dev/${PROJECT_ID}/python/ dist/*\n```\n\n## Config Setting for Pip to be able to download Packages\n\nFollow the instructions printed by this command to update your `.pypirc` and `pip.conf` files.\n\n```\ngcloud artifacts print-settings python --project=${PROJECT_ID} \\\n    --repository=python \\\n    --location=northamerica-northeast1\n```\n\nYou can now use `pip` to install the packages\n\n```\npip install -r requirements.txt\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcartyc%2Far-python-packages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcartyc%2Far-python-packages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcartyc%2Far-python-packages/lists"}