from file_storages import File
from file_storages import S3Storage
AWS_ACCESS_KEY_ID = 'your_aws_access_key_id'
AWS_SECRET_ACCESS_KEY = 'your_aws_secret_access_key'
storage = S3Storage(
'your_bucket_name',
aws_access_key_id=AWS_ACCESS_KEY_ID,
aws_secret_access_key=AWS_SECRET_ACCESS_KEY
)
file = File('your_path_to_file', storage)
# or
file = File('your_path_to_file', 'another_bucket_name', storage)
# write
file.write(b'some_content')
# read
content: bytes = file.read()
# delete
file.delete()
-
Notifications
You must be signed in to change notification settings - Fork 0
A package that implements a facade for working with different types of file storages
License
Destriery/file-storages
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A package that implements a facade for working with different types of file storages
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published