Using S3 Just Like a Local File System in Python

“S3 just like a local drive, in Python” There’s a cool Python module called s3fs which can “mount” S3, so you can use POSIX operations to files. Why would you care about POSIX operations at all? Because python also implements them. So if you happen to currently run a python app an write things to a local file via: with open(path, “w”) as f: write_to(f) you can write this to S3 simply by replacing it by: with s3.open(bucket + path, “w”) as f: write_to(f) . Of course S3 has good python integration with boto3, so why care to wrap a POSIX […]

Using S3 Just Like a Local File System in Python Read More