{"id":19816965,"url":"https://github.com/geoadmin/tool-aws","last_synced_at":"2025-02-28T14:59:56.960Z","repository":{"id":57476199,"uuid":"70698714","full_name":"geoadmin/tool-aws","owner":"geoadmin","description":"A set of generic utility tools to manage some aws services","archived":false,"fork":false,"pushed_at":"2023-12-14T10:33:30.000Z","size":282,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":26,"default_branch":"develop","last_synced_at":"2025-02-11T22:44:17.548Z","etag":null,"topics":["managed-by-tf"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geoadmin.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-12T12:40:50.000Z","updated_at":"2024-06-26T11:36:53.000Z","dependencies_parsed_at":"2024-11-12T10:11:24.443Z","dependency_job_id":"144bb6e1-0fca-4519-8449-5be7124cdd1e","html_url":"https://github.com/geoadmin/tool-aws","commit_stats":{"total_commits":65,"total_committers":4,"mean_commits":16.25,"dds":0.3846153846153846,"last_synced_commit":"e7ed6e3ee82f94adb6c356301c835bcceb0cb671"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Ftool-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Ftool-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Ftool-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Ftool-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geoadmin","download_url":"https://codeload.github.com/geoadmin/tool-aws/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241170256,"owners_count":19921572,"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":["managed-by-tf"],"created_at":"2024-11-12T10:11:15.159Z","updated_at":"2025-02-28T14:59:56.901Z","avatar_url":"https://github.com/geoadmin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"tool-aws\n========\n\n![Build Status](https://codebuild.eu-central-1.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiMkdMVnVoVDVnUW1WWTZLYjNUOGdVV2FSZ1g0VHNPdEtnRk9YcWpuQWE0L29XRlEyQlVhUmlqUVBncmVST0NyTHhwZDVRdzNQVnFmTHNtTC81dmJBOG4wPSIsIml2UGFyYW1ldGVyU3BlYyI6InAxWTJCN2lzUzFUcjVyRFQiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D\u0026branch=master)\n\n### Macro CMDs for managing AWS resources\n\n## Installation\n\n`$ pip install tool_aws`\n\n## Usage\n\nBatch delete files in S3 by listing content iteratively with a prefix.\n\n`$ s3rm --bucket-name ${BUCKET_NAME} --prefix ${PATH}`\n\nBatch delete tiles in S3 using a bbox in LV95:\n\n`$ s3rm --bucket-name ${BUCKET_NAME} --prefix /1.0.0/ch.swisstopo.fixpunkte-agnes/default/current/2056/* --bbox 2671000,1139000,2712250,1158500 --image-format png`\n\n\nYou can always use the help function:\n\n```\n$ s3rm --help\nusage: s3rm [-h] -b BUCKETNAME -p PREFIX [--profile PROFILENAME] [--bbox BBOX]\n            [-n NBTHREADS] [-s CHUNKSIZE] [-i IMAGEFORMAT] [-lr LOWRES]\n            [-hr HIGHRES] [-f]\n\nPurpose:\n    This script is intended for efficient and MASSIVE RECURSIVE\n    DELETION of S3 'folders'. This mean that any resource matching with\n    the PREFIX variable, will be DELETED IRREVERSIVELY.\n\n    Use this script CAREFULLY.\n\noptional arguments:\n  -h, --help            show this help message and exit\n\nMandatory arguments:\n  -b BUCKETNAME, --bucket-name BUCKETNAME\n                        bucket name\n  -p PREFIX, --prefix PREFIX\n                        Prefix (string) relative to the bucket base path.\n\nProgram options:\n  --profile PROFILENAME\n                        AWS profile\n  --bbox BBOX           a bounding box in lv95\n  -n NBTHREADS, --threads-number NBTHREADS\n                        Number of threads (subprocess), default: machine\n                        number of CPUs\n  -s CHUNKSIZE, --chunk-size CHUNKSIZE\n                        Chunk size for S3 batch deletion, default is set to\n                        1000 (maximal value for S3)\n  -i IMAGEFORMAT, --image-format IMAGEFORMAT\n                        The image format\n  -lr LOWRES, --lowest-resolution LOWRES\n                        The lowest resolution in meters\n  -hr HIGHRES, --highest-resolution HIGHRES\n                        The highest resolution in meters\n  -f, --force           force the removal, i.e. no prompt for confirmation.\n\nDisclaimer:\n    This software is provided \"as is\" and\n    is not granted to work in particular cases or without bugs.\n    The author disclaims any responsability in case of data loss,\n    computer damage or any other bad issue that could arise\n    using this software.\n```\n\n## Setup in dev mode\n\n`$ python3 -m venv .venv`\n`$ source .venv/bin/activate`\n`$ pip install -e .`\n`$ pip install -r dev-requirements.txt`\n\n\nTo launch the tests:\n\n`$ nosetests tests/`\n\n### Style\n\nControl styling:\n\n`$ flake8 tool_aws/ tests/`\n\nAutofix mistakes:\n\n`$ find tool_aws/* tests/* -type f -name '*.py' -print | xargs autopep8 --in-place --aggressive --aggressive --verbose`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeoadmin%2Ftool-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeoadmin%2Ftool-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeoadmin%2Ftool-aws/lists"}