High-level Python abstraction layer for Amazon S3
Project description
High-level Python abstraction layer for Amazon S3:
An `open <https://docs.python.org/2/library/functions.html#open>`__-like context handler which allows using S3 keys and local files interchangeably.
When reading S3, contents are first written to a temporary local file.
When writing S3, contents are written to a temporary local file, and uploaded on close.
An s3 CLI for listing, copying, syncing, and other common activities.
Features
Works without an S3 connection (with local files).
Supports multiprocess parallelism for copying lots of files.
Supports Python 2.7 and uses boto2.
Supports OS X, Linux, and Windows.
Tested and production-hardened.
Examples
with s3.open('s3://example/info.txt', 'w') as f:
f.write('hello')
with s3.open('file:///home/me/info.txt', 'w') as f:
f.write('hello')
with s3.open('s3://example/info.txt', 'r') as f:
contents = f.readlines()
with s3.open('file:///home/me/info.txt', 'r') as f:
contents = f.readlines()
s3 cp foo.txt s3://example/bar.txt
s3 cp s3://example/bar.txt s3://another-example/bazinga.txt
s3 rm s3://example/bar.txt
Development
pip install -r requirements_dev.txt
rake test
rake lint
TODO
Migrate credentials to ~/.aws/credentials or env, and deprecate AWS credential support in ~/.bodylabs.
Move baiji.util.parallel into a separate library.
Upgrade to boto3.
Contribute
Issue Tracker: github.com/bodylabs/baiji/issues
Source Code: github.com/bodylabs/baiji
Pull requests welcome!
Support
If you are having issues, please let us know.
License
The project is licensed under the Apache license, version 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file baiji-2.2.5.tar.gz
.
File metadata
- Download URL: baiji-2.2.5.tar.gz
- Upload date:
- Size: 34.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee5d81b1a4d2663c2298f7857afa59d970f9ff3be5af87a987b239c2e3a35efb |
|
MD5 | cacf5c140f7acfce137c1ef804293b67 |
|
BLAKE2b-256 | 594ed016cb9adac17ccb7a2297ae7ec23ac72cf570adaede1a673385c8582108 |