openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #14190
Re: need help on swift and python
Hi Christophe,
I have just moved one step ahead and able to import cloudfiles library in my
python code.
Now, I am trying to run the example you have provided. I am getting the
below error.
raise AuthenticationFailed()
cloudfiles.errors.AuthenticationFailed
Do you have any idea on this?
Thanks & Regards
Yogesh Bansal
-----Original Message-----
From: Chmouel Boudjnah [mailto:chmouel@xxxxxxxxxxx]
Sent: 27 June 2012 AM 1:50
To: Christophe Le Guern
Cc: Yogesh Bansal; openstack@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Openstack] need help on swift and python
Yogesh,
a couple of years ago I wrote some simple cloudfiles functions that uses
python-cloudfiles to do some common task which you may want to look at to
see how it's done, available here :
https://github.com/chmouel/cloud-files-helper
Chmouel
On Tue, Jun 26, 2012 at 8:31 AM, Christophe Le Guern <c35sys@xxxxxxxxx>
wrote:
> Hi Yogesh,
>
> Here is an example using swauth middleware and swift:
>
> ******************************
> from cloudfiles.connection import Connection
>
> conn = Connection("account:user", "password",
> authurl="https://SWIFT-URL/auth/v1.0")
>
> container = conn.create_container("mycontainer")
>
> obj = container.create_object("myobject.txt")
> obj.content_type = "text/plain"
> obj.write("Hello World")
> ******************************
>
> Christophe
>
> On Tue, Jun 26, 2012 at 7:14 AM, Yogesh Bansal <yogeshbansal83@xxxxxxxxx>
wrote:
>> Hi,
>>
>>
>>
>> I want to upload a file or image on swift object storage server. I
>> can do it using curl command. But I am not able to do it using python
>> apis. I am using Django and python to make web based application,
>> which required to store file from client to swift object storage server.
>>
>>
>>
>> Is there any swift and python experts, who can guide me in this regard.
>>
>>
>>
>> I am able to create and list containers using python.
>>
>>
>>
>> An example will be very helpful.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Thanks
>>
>> Yogesh Bansal
>>
>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack Post to :
>> openstack@xxxxxxxxxxxxxxxxxxx Unsubscribe :
>> https://launchpad.net/~openstack More help :
>> https://help.launchpad.net/ListHelp
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack Post to :
> openstack@xxxxxxxxxxxxxxxxxxx Unsubscribe :
> https://launchpad.net/~openstack More help :
> https://help.launchpad.net/ListHelp
References