https://github.com/peakwinter/cs3c
https://github.com/peakwinter/cs3c
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/peakwinter/cs3c
- Owner: peakwinter
- Created: 2016-11-29T06:37:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-29T06:47:42.000Z (over 9 years ago)
- Last Synced: 2024-12-29T15:28:18.686Z (over 1 year ago)
- Language: Python
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cs3c
Grab basic information about S3 buckets and the objects within.
### Install
```
git clone $REPO_URL && cd cs3c
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt && pip install -e .
cs3c list
```
### Use
*Note*: AWS credentials can also be passed as env vars `AWS_ACCESS_KEY` and `AWS_SECRET_KEY`.
```
Usage: cs3c list [OPTIONS]
Options:
-s, --size [g|m|t|k|b] Display results in [B]ytes, [K]b, [M]b, [G]b or [T]b
-j, --json Output as JSON
-t, --type Group by storage type (standard, infrequent access,
etc)
-p, --prefix TEXT Filter count/size data based on path prefix
-f, --filter TEXT Filter bucket names (regex compatible)
-l, --location TEXT Filter buckets by region (e.g. "us-west-2")
--access-key TEXT AWS access key
--secret-key TEXT AWS secret key
--help Show this message and exit.
```
### Test
Some basic test cases are included; run `python setup.py test`.
### Other notes
Uses `click` and `boto3`. Developed and tested with Python 3.x.