Google App Engine Simplejson Error
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up installing simplejson on the google appengine up vote 5 down vote favorite Super nub question time! I am trying to use simplejson on the google appengine. In a terminal on my machine I have simplejson installed and working. But my when I try to import it in a script running on the appengine I get an error saying no such library exists. If open the interactive console on my machine (from the link on http://localhost:8080/_ah/admin) and type "import simplejson" I get: Traceback (most recent call last): File "/home/chris/google_appengine/google/appengine/ext/admin/init.py", line 210, in post exec(compiled_code, globals()) File "", line 1, in ImportError: No module named simplejson Any thoughts? python google-app-engine simplejson share|improve this question asked Apr 26 '10 at 7:02 dustynachos 2,97851925 4 nevermind, here it is: from django.utils import simplejson –dustynachos Apr 26 '10 at 7:04 add a comment| 2 Answers 2 active oldest votes up vote 14 down vote accepted Look in django package: from django.utils import simplejson as json obj = json.loads(json_string) Since Sdk 1.4.2 Json can be imported with the following statement: import simplejson Note that on Python 2.7 runtime you can use the native Json library. share|improve this answer edited May 22 '12 at 9:21 answered Apr 26 '10 at 9:00 systempuntoout 34.7k26128206 I've seen this answer given frequently to this question, but it seems a bit odd to me to import anything from the django package if the user is not using Django. Should non-Django users just add the generic simplejson directly to their project? Or is the version supplied by Googl
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Python 2.7 on App Engine, simplejson vs http://stackoverflow.com/questions/2711605/installing-simplejson-on-the-google-appengine native json, who's faster? up vote 9 down vote favorite 1 I've had the understanding that simplejson is much faster than the native json in Python, such as this thread: `json` and `simplejson` module differences in Python However, I was just thrown for a loop when I read in App Engines documentation that with Python 2.7 Uses the native JSON library, which is much faster than simplejson. http://stackoverflow.com/questions/8191945/python-2-7-on-app-engine-simplejson-vs-native-json-whos-faster http://code.google.com/appengine/docs/python/python27/newin27.html So now I'm confused. Everywhere else it seems to say simplejson is better, but now App Engine with Python 2.7 says the native is faster. What gives? python json google-app-engine python-2.7 simplejson share|improve this question asked Nov 19 '11 at 4:39 adam 1,67952242 It's possible that the version that ships with Python 2.7 includes the optimizations of simplejson. It's also possible that Google is using some native implementation instead of the default module (sort of like how they rename cPickle to pickle). Mere speculation on my part, though ;-) –Cameron Nov 19 '11 at 4:46 add a comment| 2 Answers 2 active oldest votes up vote 23 down vote accepted Before the release of the Python 2.7 runtime, nearly every module included with App Engine, and literally every module you could include yourself were pure python. With the 2.7 release, the json module includes speedups written in C, making it much faster than any simplejson you can run on App Engine. The benefits to using simplejson on 2.7 you get normally (mainly having a version that's newer than it was when the latest release of Python 2.7 was made) don't apply, since you can't
von GoogleAnmeldenAusgeblendete FelderNach Gruppen oder Nachrichten suchen
Support Partners Console Google App Engine DocsStandard EnvironmentAbout the Standard EnvironmentPython 2.7Java 7PHPGoFlexible EnvironmentAbout the Flexible EnvironmentPythonJavaNode.jsGoRubyCustom RuntimesResourcesChoosing an EnvironmentInstall the SDK for App EnginePricing and QuotasPricingQuotasArticlesOverviewDesigning for ScaleOptimizing Spring FrameworkJPA facets & Cloud SQLDatastore Index Selection & Advanced SearchWorkflows with FantasmLife of a Datastore WriteStoring Entities & IndexesHandling Datastore ErrorsDeferred LibraryXMPP ServiceEffective PolyModelAvoiding Datastore ContentionBest Practices for App Engine MemcacheEffective MemcacheSharding CountersModeling Entity RelationshipsUpdating Your Model's SchemaTransaction IsolationUsing Cloud Logging in App Engine AppsMoving to the Google Cloud Platform ConsoleDealing with DeadlineExceededErrorsScheduled BackupsSupportSubmit Product IssueContact Google SupportCommunity SupportApp Engine FAQDeprecationFeature DeprecationDjango Packaged Libraries 1.2, 1.3 Support TurndownJava 6 Runtime Support TurndownVirtual IP (VIP) Transition to Server Name Indication (SNI)Commercial Launch ChecklistApp Engine Services SummaryGlossaryService Level AgreementService Level Agreement Error Rates Google App Engine DocsStandard EnvironmentAbout the Standard EnvironmentPython 2.7Java 7PHPGoFlexible EnvironmentAbout the Flexible EnvironmentPythonJavaNode.jsGoRubyCustom RuntimesResourcesChoosing an EnvironmentInstall the SDK for App EnginePricing and QuotasPricingQuotasArticlesOverviewDesigning for ScaleOptimizing Spring FrameworkJPA facets & Cloud SQLDatastore Index Selection & Advanced SearchWorkflows with FantasmLife of a Datastore WriteStoring Entities & IndexesHandling Datastore ErrorsDeferred LibraryXMPP ServiceEffective PolyModelAvoiding Datastore ContentionBest Practices for App Engine MemcacheEffective MemcacheSharding CountersModeling Entity RelationshipsUpdating Your Model's SchemaTransaction IsolationUsing Cloud Logging in App Engine AppsMoving to the Google Cloud Platform ConsoleDealing with DeadlineExceede