Sunday, June 20, 2010

How to download / upload data to Google App Engine for localhost

The appcfg.py --dump option is not working
with this error appcfg.py: error: no such option: --dump

Deprecated method (Code for Configuration) is used instead to upload_data / download_data to localhost app

Here is an example

(1) modify app.yaml and add this under handlers:
- url: /remote_api
script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py
login: admin


You have to restart the app after modifying app.yaml

(2) create this file : album_load.py

# album_loader.py
import datetime
from google.appengine.ext import db
from google.appengine.tools import bulkloader

class Album(db.Model):
artist = db.StringProperty()
title = db.StringProperty()
publication_date = db.DateProperty()
length_in_minutes = db.IntegerProperty()

class AlbumLoader(bulkloader.Loader):
def __init__(self):
bulkloader.Loader.__init__(self, 'Album',
[('title', str),
('artist', str),
('publication_date',
lambda x: datetime.datetime.strptime(x, '%m/%d/%Y').date()),
('length_in_minutes', int),
])

loaders = [AlbumLoader]


(3) prepare an upload file : album.csv

title1,artist1,1/1/2000,12
title2,artist2,1/1/2001,22
title3,artist3,1/1/2002,32


(3) Launch your app in localhost and upload using this command

appcfg.py upload_data --config_file=album_loader.py --application=yourappid --kind=Album --url=http://localhost:8080/remote_api --filename=album.csv


(4) check the table data in your Google App SDK console

(5) to download data create this file : album_exporter.py

# album_exporter.py
import datetime
from google.appengine.ext import db
from google.appengine.tools import bulkloader

class Album(db.Model):
artist = db.StringProperty()
title = db.StringProperty()
publication_date = db.DateProperty()
length_in_minutes = db.IntegerProperty()

class AlbumExporter(bulkloader.Exporter):
def __init__(self):
bulkloader.Exporter.__init__(self, 'Album',
[('title', str, None),
('artist', str, None),
('publication_date', str, None),
('length_in_minutes', int, None),
])

exporters = [AlbumExporter]


(6) use this command to download data
appcfg.py download_data --config_file=album_exporter.py --application=yourappid --kind=Album --url=http://localhost:8080/remote_api --filename=albumout.csv
.
.
.

Friday, June 18, 2010

Old versions of iTunes

iTunes 10.4 Download
Windows X86 http://appldnld.apple.com/iTunes10/041-0718.20110720.YXCZe/iTunesSetup.exe
Windows X64 http://appldnld.apple.com/iTunes10/041-0719.20110720.rE358/iTunes64Setup.exe
Mac OS X http://appldnld.apple.com/iTunes10/041-1988.20110720.Rt5Yp/iTunes10.4.dmg



iTunes 10.3.1 Download
Windows X86 http://appldnld.apple.com/iTunes10/041-1633.20110607.FvP5t/iTunesSetup.exe
Windows X64 http://appldnld.apple.com/iTunes10/041-1634.20110607.4EPY6/iTunes64Setup.exe
Mac OS X http://appldnld.apple.com/iTunes10/041-1632.20110607.SUch3/iTunes10.3.1.dmg



iTunes 10.2.2 Download
Windows X86 http://appldnld.apple.com/iTunes10/041-0988.20110501.CdEr4/iTunesSetup.exe
Windows X64 http://appldnld.apple.com/iTunes10/041-0989.20110501.Pr4tg/iTunes64Setup.exe
Mac OS X http://appldnld.apple.com/iTunes10/041-0533.20110418.AqP4r/iTunes10.2.2.dmg





iTunes for Windows x86
9.2 http://appldnld.apple.com/iTunes9/061-7656.20100616.ZTns2/iTunesSetup.exe
9.2.1 http://appldnld.apple.com/iTunes9/061-8602.20100719.Tnz92/iTunesSetup.exe
10.0 http://appldnld.apple.com/iTunes10/061-8246.20100901.Zxsew3/iTunesSetup.exe
10.0.1 http://appldnld.apple.com/iTunes10/061-9186.20100924.nbght/iTunesSetup.exe
10.1 http://appldnld.apple.com/iTunes10/061-9842.20101118.Bgyt6/iTunesSetup.exe
10.1.1 http://appldnld.apple.com/iTunes10/061-9926.20101215.XdsP6/iTunesSetup.exe
10.1.2 http://appldnld.apple.com/iTunes10/061-9992.20110127.WdzxP/iTunesSetup.exe
10.2 http://appldnld.apple.com/iTunes10/061-9638.20110302.Wnzse/iTunesSetup.exe
10.2.1 http://appldnld.apple.com/iTunes10/041-0471.20110308.Nzxs2/iTunesSetup.exe

iTunes for Windows x64
9.2 http://appldnld.apple.com/iTunes9/061-7657.20100616.92msz/iTunes64Setup.exe
9.2.1 http://appldnld.apple.com/iTunes9/061-8603.20100719.Dcfe4/iTunes64Setup.exe
10.0 http://appldnld.apple.com/iTunes10/061-8245.20100901.Pr4rg/iTunes64Setup.exe
10.0.1 http://appldnld.apple.com/iTunes10/061-9187.20100924.Bnhju/iTunes64Setup.exe
10.1 http://appldnld.apple.com/iTunes10/061-9843.20101118.Txdse/iTunes64Setup.exe
10.1.1 http://appldnld.apple.com/iTunes10/061-9927.20101215.Txsde/iTunes64Setup.exe
10.1.2 http://appldnld.apple.com/iTunes10/061-9993.20110127.Nju7Y/iTunes64Setup.exe
10.2 http://appldnld.apple.com/iTunes10/061-9639.20110302.XcKgt/iTunes64Setup.exe
10.2.1 http://appldnld.apple.com/iTunes10/041-0472.20110308.WnT2z/iTunes64Setup.exe


iTunes for Mac
9.2 http://appldnld.apple.com/iTunes9/061-8440.20100616.Tnzs2/iTunes9.2.dmg
9.2.1 http://appldnld.apple.com/iTunes9/061-8601.20100719.nhy5R/iTunes9.2.1.dmg
10.0 http://appldnld.apple.com/iTunes10/061-9183.20100902.X2ndX/iTunes10.dmg
10.0.1 http://appldnld.apple.com/iTunes10/061-9207.20100924.Nzse2/iTunes10.0.1.dmg
10.1 http://appldnld.apple.com/iTunes10/061-9530.20101112.MSakc/iTunes10.1.dmg
10.1.1 http://appldnld.apple.com/iTunes10/041-0027.20101215.AzsL3/iTunes10.1.1.dmg
10.1.2 http://appldnld.apple.com/iTunes10/061-9991.20110127.ZxsE3/iTunes10.1.2.dmg
10.2 http://appldnld.apple.com/iTunes10/061-9637.20110302.Tnz2t/iTunes10.2.dmg
10.2.1 http://appldnld.apple.com/iTunes10/041-0475.20110308.mAcaz/iTunes10.2.1.dmg




iTunes 9.2
http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iTunes9/061-8440.20100616.Tnzs2/iTunes9.2.dmg

iTunes 9.1.1 (Mac OS 10.4.11 or later)
http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iTunes9/061-8202.20100427.5vfkH/iTunes9.1.1.dmg

iTunes 9.1 for Mac
http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iTunes9/061-7203.20100330.XswP8/iTunes9.1.dmg

iTunes 9.0.3 for Mac
http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iTunes9/061-7752.20100201.Tz39N/iTunes9.0.3.dmg

iTunes 9.0 for Mac
http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iTunes9/061-6350.20090909.tnzs2/iTunes9.dmg

iTunes 8.2.1 for Mac
http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iTunes8/061-6715.20090715.cfR54/iTunes8.2.1.dmg



iTunes 9.2 for Windows 64 bit
http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iTunes9/061-7657.20100616.92msz/iTunes64Setup.exe

iTunes 9.2 for Windows 32 bit
http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iTunes9/061-7656.20100616.ZTns2/iTunesSetup.exe

iTunes 9.1.1 for Windows 64 bit (Windows Vista 64 bit, Windows 7 64 bit)
http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iTunes9/061-8204.20100427.AEueJ/iTunes64Setup.exe


iTunes 9.1.1 for Windows 32 bit (Windows XP SP2, Vista)
http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iTunes9/061-8203.20100427.1J2kd/iTunesSetup.exe

iTunes 9.1 for Windows
http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iTunes9/061-7204.20100330.Cdr4T/iTunesSetup.exe

iTunes 9.0.3 for Windows
http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iTunes9/061-7753.20100201.Jcv4r/iTunesSetup.exe

iTunes 9.0 for Windows
http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iTunes9/061-6351.20090909.Tza9j/iTunesSetup.exe

iTunes 8.2.1 for Windows
http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iTunes8/061-6717.20090715.XsE4R/iTunesSetup.exe
.
.
.