|
Resources
Sample Code and Libraries
Amazon S3 Library for REST in Python
Posts:
12
Registered:
7/2/08
|
|
|
|
Re: Amazon S3 Library for REST in Python
Posted:
Aug 17, 2009 8:41 AM PDT
in response to: uuorld
|
|
|
The S3 library needs to be updated (And ideally moved to a better code repository like github.com):
Anyway, here is the current warning from Python 2.6:
This deprecation warning comes up in Python 2.6.2:
S3.py:16: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
import sha
Just change
{{{
#!python
import sha
}}}
to
{{{
#!python
import hashlib
}}}
and then use hashlib.sha1()
|
|
Posts:
2
Registered:
10/8/09
|
|
|
|
Re: Amazon S3 Library for REST in Python ++ ACL policy parsing and creation
Posted:
Oct 8, 2009 12:28 PM PDT
in response to: A. Nelson
|
|
|
I updated the s3.py file to account for the changes in python 2.6. I also noticed that there was no object parsing support for ACL lists nor was there any way to create an ACL using an object approach.
I added a few additional classes and xml.sax handlers to parse the ACL lists. There are also some classes for creating ACL policies from scratch.
I also embedded the unit tests in the file for compactness but, of course, they don't need to be there for production use.
Download the file here:
https://plaidcloud.s3.amazonaws.com/public/s3/s3.py.zip
|
|
Posts:
12
Registered:
7/2/08
|
|
|
|
Re: Amazon S3 Library for REST in Python ++ ACL policy parsing and creation
Posted:
Oct 8, 2009 12:40 PM PDT
in response to: Paul M.
|
|
|
Awesome Paul.
I'm considering this page to basically be dead - the AWS CMS is kind of ... not so great.
I moved the file where everybody can get at it, modify it, make tickets, etc....
http://github.com/AdamN/python-s3
|
|
Posts:
12
Registered:
7/2/08
|
|
|
|
Re: Amazon S3 Library for REST in Python ++ ACL policy parsing and creation
Posted:
Oct 19, 2009 1:16 PM PDT
in response to: Paul M.
|
|
|
Paul,
Can you clarify the addition of the copyright?
# (c) 2009 Tartan Solutions, Inc
This won't be usable on most libraries I'd like this integrated into if you're claiming copyright. It's fine, I just need to know so those changes aren't propagated to the GPL libraries that use s3.py.
Cheers,
Adam
|
|
Posts:
12
Registered:
7/2/08
|
|
|
|
Re: Amazon S3 Library for REST in Python ++ ACL policy parsing and creation
Posted:
Oct 28, 2009 8:51 AM PDT
in response to: A. Nelson
|
|
|
After careful consideration, I recommend all users use boto instead for a python s3 library as this library is no longer actively maintained:
http://boto.s3.amazonaws.com/index.html http://code.google.com/p/boto/
It's not immediately obvious to a new Python user what to do when starting with S3 and Amazon Web Services, but boto is far and away the superior library.
|
|
|
|
 |
|
|