Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regressions from 0.0.8 #16

Open
rach opened this issue Dec 22, 2015 · 1 comment
Open

Regressions from 0.0.8 #16

rach opened this issue Dec 22, 2015 · 1 comment

Comments

@rach
Copy link

rach commented Dec 22, 2015

Thanks @leplatrem to work on this project, I'm glad to see that pyramid_storage is receiving some love recently. There is few regressions from 0.0.8 as new settings for s3 are required, eg: port
If you compare to the previous code (0.0.8) much less setting were required. https://github.com/danjac/pyramid_storage/blob/master/pyramid_storage/s3.py#L29-L90

def from_settings(cls, settings, prefix):
return cls(access_key=settings[prefix + 'aws.access_key'],
secret_key=settings[prefix + 'aws.secret_key'],
bucket_name=settings[prefix + 'aws.bucket'],
acl=settings.get(prefix + 'aws.default_acl', 'public-read'),
base_url=settings.get(prefix + 'base_url', ''),
extensions=settings.get(prefix + 'extensions', 'default'))
def __init__(self, access_key, secret_key, bucket_name,
acl=None, base_url='', extensions='default'):
self.access_key = access_key
self.secret_key = secret_key
self.bucket_name = bucket_name
self.acl = acl
self.base_url = base_url
self.extensions = resolve_extensions(extensions)
def get_connection(self):
try:
from boto.s3.connection import S3Connection
except ImportError:
raise RuntimeError("You must have boto installed to use s3")
return S3Connection(self.access_key, self.secret_key)

I don't think that the regressions are big deal but may be worth to update the doc to specify which s3 settings are now required.

@rach
Copy link
Author

rach commented Jan 5, 2016

A bit unrelated but maybe it will be worthwhile to look to make pyramid_storage a wrapper around pyfilesystem to have less work maintaining s3 and also being able to support other storage.
https://github.com/PyFilesystem/pyfilesystem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant