Python library for uploading to AppEngine

42 views
Skip to first unread message

Emlyn

unread,
Sep 11, 2011, 12:48:08 AM9/11/11
to google-a...@googlegroups.com
Is there a python library for uploading code to AppEngine? I'd like to
build an App that can upload code to other apps, has anyone done this
already?

--
Emlyn

http://my.syyn.cc - Synchonise Google+, Facebook, WordPress and Google
Buzz posts,
comments and all.
http://point7.wordpress.com - My blog
Find me on Facebook and Buzz

Jan Zawadzki / Hapara

unread,
Sep 11, 2011, 2:17:22 AM9/11/11
to Google App Engine
At the risk of asking the obvious, you mean other than appcfg.py?

J

On Sep 11, 4:48 pm, Emlyn <emlynore...@gmail.com> wrote:
> Is there a python library for uploading code to AppEngine? I'd like to
> build an App that can upload code to other apps, has anyone done this
> already?
>
> --
> Emlyn
>
> http://my.syyn.cc- Synchonise Google+, Facebook, WordPress and Google
> Buzz posts,
> comments and all.http://point7.wordpress.com- My blog

Emlyn

unread,
Sep 11, 2011, 2:37:06 AM9/11/11
to google-a...@googlegroups.com
Yep. Or, can you consume appcfg.py from inside your app? If you can,
then that's the answer to my question.

<yes, in advance, I am a hopeless n00b, sob>

On 11 September 2011 15:47, Jan Zawadzki / Hapara

> --
> You received this message because you are subscribed to the Google Groups "Google App Engine" group.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
>
>

--
Emlyn

http://my.syyn.cc - Synchonise Google+, Facebook, WordPress and Google


Buzz posts,
comments and all.

http://point7.wordpress.com - My blog

Robert Kluin

unread,
Sep 11, 2011, 2:47:26 AM9/11/11
to google-a...@googlegroups.com
It is just a Python script. Open it up and have a look at what it does.

Tim Hoffman

unread,
Sep 11, 2011, 3:28:33 AM9/11/11
to google-a...@googlegroups.com
HI

As robert says it  is just python. Also its using the remote_api.

So all definately do-able.  I run remote_api stuff inside zope to transparently access the datastore from within zope.

Rgds

Tim

Emlyn

unread,
Sep 11, 2011, 3:44:37 AM9/11/11
to google-a...@googlegroups.com
On 11 September 2011 16:17, Robert Kluin <robert...@gmail.com> wrote:
> It is just a Python script.  Open it up and have a look at what it does.
>

It's not just a python script, it's a fair sized system. I had a quick
look a while back and thought, hmm, this will take work.

So before I get into it again, I thought I'd be an idiot for not
asking first if someone else has done the work.

If not, I'll be happy to do it and post the results!

Emlyn

unread,
Sep 11, 2011, 3:46:23 AM9/11/11
to google-a...@googlegroups.com
My google-fu is failing. Do you have any specific links to more info
on uploading code using remote_api?

> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.

> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/TKWNqEhYNuIJ.

Tim Hoffman

unread,
Sep 11, 2011, 8:11:43 AM9/11/11
to google-a...@googlegroups.com
Hi 

Sorry no specific links.

Have a read of appcfg.py in google/appengine/tools/appcfg.py , specifically the class
AppVersionUpload.

It uses remote_api rpc calls under the hood

All of the appcfg functions that talk to a remote server do.

If you wanted to build your own wrapper I would be using that class, otherwise you would need to start
building all of the stages of an upload yourself, which could change from release to release etc..

As it is, I am sure AppVersionUpload isn't a public api (ie could change from release to release, but I bet far less changes to manage.)


Rgds

Tim




Waleed Abdulla

unread,
Sep 11, 2011, 2:08:32 PM9/11/11
to google-a...@googlegroups.com
I've done something close in the past where I have a GAE app that pulls Python script from another location and executes it. Not sure if that helps you, but here it is. Make sure the script is safe, though, because it'll be running against your own datastore. 


            try:
                path = ROOT_URL + 'script.py'
                result = urllib2.urlopen(path)
            except:
                logging.error('Error pulling: ' + path)
                sys.exit(0)
            
            try:
                code = result.read()
                exec(code.replace('\r\n', '\n'))
            except:
                logging.error('Error in script')
                sys.exit(0)
Reply all
Reply to author
Forward
0 new messages