s3empty


Names3empty JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/cliffano/s3empty
SummaryPython CLI for convenient emptying of S3 bucket
upload_time2024-10-19 13:08:25
maintainerNone
docs_urlNone
authorCliffano Subagio
requires_python<4.0,>=3.10
licenseApache-2.0
keywords s3empty ...
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            <img align="right" src="https://raw.github.com/cliffano/s3empty/main/avatar.jpg" alt="Avatar"/>

[![Build Status](https://github.com/cliffano/s3empty/workflows/CI/badge.svg)](https://github.com/cliffano/s3empty/actions?query=workflow%3ACI)
[![Security Status](https://snyk.io/test/github/cliffano/s3empty/badge.svg)](https://snyk.io/test/github/cliffano/s3empty)
[![Dependencies Status](https://img.shields.io/librariesio/release/pypi/s3empty)](https://libraries.io/github/cliffano/s3empty)
[![Published Version](https://img.shields.io/pypi/v/s3empty.svg)](https://pypi.python.org/pypi/s3empty)
<br/>

S3Empty
--------

S3Empty is a Python CLI for conveniently emptying an AWS S3 bucket.

This tool is useful when you want to delete all objects in a bucket before deleting the bucket itself. It handles versioned and non-versioned S3 buckets.

    BucketNotEmpty: The bucket you tried to delete is not empty. You must delete all versions in the bucket.

![S3Empty console screenshot](screenshots/console.jpg "S3Empty console screenshot")

Installation
------------

    pip3 install s3empty

Usage
-----

Run S3Empty with specified bucket name:

    s3empty --bucket-name some-bucket

Show help guide:

    s3empty --help

Permission
----------

Here's an IAM policy with minimum permissions required by S3Empty:

```json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "S3EmptyPolicy",
            "Effect": "Allow",
            "Action": [
                "s3:GetBucketVersioning",
                "s3:ListBucket",
                "s3:ListBucketVersions",
                "s3:DeleteObject",
                "s3:DeleteObjectVersion",
            ],
            "Resource": [
                "arn:aws:s3:::some-bucket",
                "arn:aws:s3:::some-bucket/*"
            ]
        }
    ]
}
```

Colophon
--------

[Developer's Guide](https://cliffano.github.io/developers_guide.html#python)

Build reports:

* [Lint report](https://cliffano.github.io/s3empty/lint/pylint/index.html)
* [Code complexity report](https://cliffano.github.io/s3empty/complexity/wily/index.html)
* [Unit tests report](https://cliffano.github.io/s3empty/test/pytest/index.html)
* [Test coverage report](https://cliffano.github.io/s3empty/coverage/coverage/index.html)
* [Integration tests report](https://cliffano.github.io/s3empty/test-integration/pytest/index.html)
* [API Documentation](https://cliffano.github.io/s3empty/doc/sphinx/index.html)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/cliffano/s3empty",
    "name": "s3empty",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "s3empty, ...",
    "author": "Cliffano Subagio",
    "author_email": "cliffano@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/5a/93/302bea03d4e652945533b5b905b9d92b31fdd50d8c9d1d2a6b7db3d7cdec/s3empty-1.0.1.tar.gz",
    "platform": null,
    "description": "<img align=\"right\" src=\"https://raw.github.com/cliffano/s3empty/main/avatar.jpg\" alt=\"Avatar\"/>\n\n[![Build Status](https://github.com/cliffano/s3empty/workflows/CI/badge.svg)](https://github.com/cliffano/s3empty/actions?query=workflow%3ACI)\n[![Security Status](https://snyk.io/test/github/cliffano/s3empty/badge.svg)](https://snyk.io/test/github/cliffano/s3empty)\n[![Dependencies Status](https://img.shields.io/librariesio/release/pypi/s3empty)](https://libraries.io/github/cliffano/s3empty)\n[![Published Version](https://img.shields.io/pypi/v/s3empty.svg)](https://pypi.python.org/pypi/s3empty)\n<br/>\n\nS3Empty\n--------\n\nS3Empty is a Python CLI for conveniently emptying an AWS S3 bucket.\n\nThis tool is useful when you want to delete all objects in a bucket before deleting the bucket itself. It handles versioned and non-versioned S3 buckets.\n\n    BucketNotEmpty: The bucket you tried to delete is not empty. You must delete all versions in the bucket.\n\n![S3Empty console screenshot](screenshots/console.jpg \"S3Empty console screenshot\")\n\nInstallation\n------------\n\n    pip3 install s3empty\n\nUsage\n-----\n\nRun S3Empty with specified bucket name:\n\n    s3empty --bucket-name some-bucket\n\nShow help guide:\n\n    s3empty --help\n\nPermission\n----------\n\nHere's an IAM policy with minimum permissions required by S3Empty:\n\n```json\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"S3EmptyPolicy\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"s3:GetBucketVersioning\",\n                \"s3:ListBucket\",\n                \"s3:ListBucketVersions\",\n                \"s3:DeleteObject\",\n                \"s3:DeleteObjectVersion\",\n            ],\n            \"Resource\": [\n                \"arn:aws:s3:::some-bucket\",\n                \"arn:aws:s3:::some-bucket/*\"\n            ]\n        }\n    ]\n}\n```\n\nColophon\n--------\n\n[Developer's Guide](https://cliffano.github.io/developers_guide.html#python)\n\nBuild reports:\n\n* [Lint report](https://cliffano.github.io/s3empty/lint/pylint/index.html)\n* [Code complexity report](https://cliffano.github.io/s3empty/complexity/wily/index.html)\n* [Unit tests report](https://cliffano.github.io/s3empty/test/pytest/index.html)\n* [Test coverage report](https://cliffano.github.io/s3empty/coverage/coverage/index.html)\n* [Integration tests report](https://cliffano.github.io/s3empty/test-integration/pytest/index.html)\n* [API Documentation](https://cliffano.github.io/s3empty/doc/sphinx/index.html)\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Python CLI for convenient emptying of S3 bucket",
    "version": "1.0.1",
    "project_urls": {
        "Documentation": "https://github.com/cliffano/s3empty",
        "Homepage": "https://github.com/cliffano/s3empty",
        "Repository": "https://github.com/cliffano/s3empty"
    },
    "split_keywords": [
        "s3empty",
        " ..."
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "66a482abb2a3aee429ea2c854acd6e896504c0d7ecb197c79679e46e0fb377b3",
                "md5": "f5fc05778471ea5456897d639447ad00",
                "sha256": "671b7f9c6f35fe0f06290768c3b0ab392594cf6a616d88829dc09f3026d8bc83"
            },
            "downloads": -1,
            "filename": "s3empty-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f5fc05778471ea5456897d639447ad00",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 7660,
            "upload_time": "2024-10-19T13:08:23",
            "upload_time_iso_8601": "2024-10-19T13:08:23.877262Z",
            "url": "https://files.pythonhosted.org/packages/66/a4/82abb2a3aee429ea2c854acd6e896504c0d7ecb197c79679e46e0fb377b3/s3empty-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5a93302bea03d4e652945533b5b905b9d92b31fdd50d8c9d1d2a6b7db3d7cdec",
                "md5": "cfde37f46b1d9e33db319a7663c4beae",
                "sha256": "76a2066e2245ec8ab2488cba24fa60dd0764ec99bad2c873f6c2371961ba38e4"
            },
            "downloads": -1,
            "filename": "s3empty-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "cfde37f46b1d9e33db319a7663c4beae",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 6960,
            "upload_time": "2024-10-19T13:08:25",
            "upload_time_iso_8601": "2024-10-19T13:08:25.865514Z",
            "url": "https://files.pythonhosted.org/packages/5a/93/302bea03d4e652945533b5b905b9d92b31fdd50d8c9d1d2a6b7db3d7cdec/s3empty-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-19 13:08:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cliffano",
    "github_project": "s3empty",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "s3empty"
}
        
Elapsed time: 0.80444s