Sunday, December 12, 2010

New Review Uploaded

Check out my new review:

Language Implementation Patterns

Monday, December 6, 2010

I have a review website now!

I just uploaded my review website to AppEngine check it out:

http://the-reviews.appspot.com

Monday, October 4, 2010

Beat AppEngine get limit (offline mode)

def get_entities(kind):
c = None
es = []
while True:
q = kind.all()
if c: q.with_cursor(c)
i = q.fetch(1000)
es.extend(i)
if not i: break
c = q.cursor()
return es

Thursday, September 30, 2010

Manipulate AppEngine datastore from the Python interactive console

# wednesday june 23, 2010 11:39 pm
# Victor N.

import sys
import code

gaedir = 'path/to/gae'

sys.path.append(gaedir)
sys.path.append(gaedir + '/lib/yaml/lib')
sys.path.append(gaedir + '/lib/webob')
sys.path.append(gaedir + '/lib/django')
sys.path.append(gaedir + '/lib/fancy_urllib')

extra = 'path/to/extra/libs'
sys.path.append(extra)

from google.appengine.ext.remote_api import remote_api_stub


def auth_func():
return 'da_username', 'da_password'


def main():
if len(sys.argv) < 2:
print 'Usage: %s app_id [host]' % sys.argv[0]
return

app_id = sys.argv[1]

if len(sys.argv) > 2: host = sys.argv[2]
else: host = '%s.appspot.com' % app_id

remote_api_stub.ConfigureRemoteDatastore(
app_id,
'/remote_api',
auth_func,
host
)

code.interact(
'App Engine interactive console for %s' % (app_id,),
None,
locals()
)


if __name__ == '__main__':
main()

now you just do:

python the_script_name.py your_app_name

you know who to blame if it does not work for you.

semper fi.