{"id":14985672,"url":"https://github.com/adfinis/pyaptly","last_synced_at":"2026-03-16T11:36:32.583Z","repository":{"id":8448178,"uuid":"57893746","full_name":"adfinis/pyaptly","owner":"adfinis","description":"Automates the creation and managment of aptly mirrors and snapshots based on yml input files.","archived":false,"fork":false,"pushed_at":"2025-04-06T01:33:55.000Z","size":24093,"stargazers_count":16,"open_issues_count":11,"forks_count":12,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-11T22:03:37.190Z","etag":null,"topics":["aptly","automation","cli","python","yml"],"latest_commit_sha":null,"homepage":"http://docs.adfinis.com/pyaptly/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adfinis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-05-02T13:52:26.000Z","updated_at":"2025-04-09T10:11:04.000Z","dependencies_parsed_at":"2024-01-02T15:46:26.099Z","dependency_job_id":"b313894a-b244-432a-b4e7-e8e8840be7f2","html_url":"https://github.com/adfinis/pyaptly","commit_stats":{"total_commits":357,"total_committers":12,"mean_commits":29.75,"dds":0.5350140056022409,"last_synced_commit":"24c28fdc202b52dd02eff267ea476a9d2826adcd"},"previous_names":["adfinis-sygroup/pyaptly"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adfinis%2Fpyaptly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adfinis%2Fpyaptly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adfinis%2Fpyaptly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adfinis%2Fpyaptly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adfinis","download_url":"https://codeload.github.com/adfinis/pyaptly/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487717,"owners_count":21112191,"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":["aptly","automation","cli","python","yml"],"created_at":"2024-09-24T14:11:27.820Z","updated_at":"2026-03-16T11:36:32.401Z","avatar_url":"https://github.com/adfinis.png","language":"Python","readme":"# Pyaptly\n\nAutomates the creation and managment of aptly mirrors and snapshots based on toml\ninput files.\n\n**Important**: Currently under heavy development:\n\n- For for the old version [switch to the master branch](https://github.com/adfinis/pyaptly/tree/master)\n- Main branch builds contain [alpha packages](https://github.com/adfinis/pyaptly/actions/runs/8147002919), see Artifacts\n\n## Why \u0026 How\n\n[Aptly](https://www.aptly.info/) is great tool for creating Debian repositories.\nBut as soon as it's required to maintain repositories for different [environments](https://en.wikipedia.org/wiki/Deployment_environment) it gets very complicated fast.\n\nThis is where Pyaptly comes in.\nFirst of all, a single `config.toml` can be used to define `mirrors`, `snapshots` and `publishes` instead of using command line arguments.\nThe definition includes exactly how the entities are created and updated.\n\nSecondly, aptly isn't really layed out to have retention policies. Updating a `snapshot` will lose the information of the previous state.\nThat means it's hard to roll back to a previous state if required.\nThis problem is fixed by using fix timestamps in snapshot names.\nThat behaviour also allows to define a fixed update spacing. It's possible to say for example \"only update this snapshot once a week\".\n\n## Example commands\n\nInitialize a new aptly server.\n\n```shell\npyaptly mirror mirrors.toml create\npyaptly mirror mirrors.toml update\npyaptly snapshot mirrors.toml create\npyaptly publish mirrors.toml create\n```\n\nUpdate mirrors and snapshots and switch publish endpoints with\n```automatic-update: true``` to the new snapshots.\n\n```shell\npyaptly mirror mirrors.toml update\npyaptly snapshot mirrors.toml create\npyaptly publish mirrors.toml create\npyaptly publish mirrors.toml update\n```\n\nManually trigger a switch to the new snapshots for the publish endpoint\nubuntu/stable.\n\n```shell\npyaptly publish mirrors.toml update -n ubuntu/stable\n```\n\n## Debugging\n\nThe most interesting mode for users is not `--debug` but `--info` which shows\nall commands executed.\n\n```bash\n\u003e pyaptly legacy -- --info --config pyaptly/tests/repo.toml repo create\nCommand call\n  cmd:         gpg --no-default-keyring --keyring trustedkeys.gpg --list-keys --with-colons -\u003e 0\n  stdout:     'tru::1:1709575833:0:3:1:5\n               pub:-:255:22:2841988729C7F3FF:1701882080:::-:::scESC:::::ed25519:::0:\n               fpr:::::::::6380C07FF6496016E01CF4522841988729C7F3FF:\n               uid:-::::1701882080::5BBE9C7E7AA5EEE3538F66274125D69FA727FD1E::Pyaptly Test 01 \u003ctest01@pyaptly.nowhere\u003e::::::::::0:\n               sub:-:255:18:0A1CBEF26FE4F36E:1701882080::::::e:::::cv25519::\n               fpr:::::::::9EE64E40A5E3530D3E18A97C0A1CBEF26FE4F36E:\n               pub:-:255:22:EC54D33E5B5EBE98:1701882297:::-:::scESC:::::ed25519:::0:\n               fpr:::::::::660D45228AB6B59CCE48AFB3EC54D33E5B5EBE98:\n               uid:-::::1701882297::F3EF71B78669C0FC259A4078151BDC5815A6015D::Pyaptly Test 02 \u003ctest02@pyaptly.nowhere\u003e::::::::::0:\n               sub:-:255:18:042FE0F5BB743B60:1701882297::::::e:::::cv25519::\n               fpr:::::::::AE58B62134E02AF8E5D55FF4042FE0F5BB743B60:'\nCommand call\n  cmd:         aptly repo list -raw -\u003e 0\n  stderr:     'Config file not found, creating default config at /root/.aptly.conf'\nCommand call\n  cmd:         aptly mirror list -raw -\u003e 0\nCommand call\n  cmd:         aptly snapshot list -raw -\u003e 0\nCommand call\n  cmd:         aptly publish list -raw -\u003e 0\nCommand call\n  cmd:         aptly repo -architectures=amd64,i386 -distribution=stable -component=main create centrify -\u003e 0\n  stdout:     'Local repo [centrify] successfully added.\n               You can run 'aptly repo add centrify ...' to add packages to repository.'\n```\n\nCommands that fail are always displayed in red on a tty, but that actually only\nhappens if something is broken.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadfinis%2Fpyaptly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadfinis%2Fpyaptly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadfinis%2Fpyaptly/lists"}