How to get an old Google App Engine SDK version - python

I'm having exactly the same problem like this one: google-app-engine 1.9.19 deploy failure
Please, someone can explain me how to get an older version of GAE's SDKs?
In this particular case I need the version 1.9.18 for Python.

Most versions should be available in the Deprecated page
If the particular version you are trying to get is not there, you could always play around with the Download URLs, to get the one you need.
For example:
https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.19.zip
Can be modified to:
https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.18.zip

Related

How to find the latest git issue number on github using python?

I need to find the latest git issue number for a repository using python for all users rather than an authenticated user.
Is there any way i could do this? either through the API or any library?
I looked at the github docs and from my understanding it is not possible to list issues for all users but only authenticated users.
I looked at pygithub where all i could find was how to create an issue through the library
#Kevin Vizalil
You can use the Github API's to get the list of issues or single issue
please check https://developer.github.com/v3/issues/#list-issues
edit:
e.g. https://api.github.com/repos/vmg/redcarpet/issues?sort=created&direction=desc

How to update my forks of Evernote SDK for Python to track latest updates?

First of all, I'm hoping that Evernote will start maintaining its Python SDK (evernote/evernote-sdk-python for Python 2 and evernote/evernote-sdk-python3 for Python 3). In the meantime, I'm looking for advice on how to update my forks of these SDK to bring them up-to-speed with the latest changes in the Evernote API. Specifically:
Can someone from Evernote indicate whether these SDKs will be supported or are we on our own?
For evernote/evernote-sdk-python for Python 2, it looks like a good place to start is to merge the matthewayne/evernote-sdk-python fork and then pick and choose from the outstanding pull requests. Has someone already gone down this path?
For (https://github.com/evernote/evernote-sdk-python) and evernote/evernote-sdk-python3 for Python 3), has anyone tried Merge latest python2 sdk by ahxxm · Pull Request #11 · evernote/evernote-sdk-python3?
Where can I find the latest Thrift IDL files for Evernote? evernote/evernote-thrift: Thrift IDL files for the Evernote Cloud API hasn't been updated since June 2013 (to match version 1.25 of the Evernote API. (Are we up to version 1.28 at the very least of the API?) BTW, what is the current version number of the API?
How do I go about compiling the Thrift IDL files into Python code for the Evernote SDK?
Thanks in advance!
We haven't put too much work into our SDKs lately but we're hoping to change that in the coming weeks. As a first step we (finally) updated our API reference (another, minor update coming soon) and the next step is our SDKs. There's a lot of work to do here, since we have SDKs for quite a few languages, and the few of us that are working on this stuff are doing so in between core product work. Part of that is adding newly generated thrift files, so you shouldn't need to worry about that.
Thank you for your patience!

confused about Solr Django and Haystack installation

I'm following the tutorial in the Haystack for using solr in django. I download haystack ad it to my installed apps, and I like to check my development to make sure my apps still working. So when I go to my my localhost it says
A server error occurred. Please contact the administrator.
and in my terminal it says
raise MissingDependency("The 'solr' backend requires the installation of 'pysolr'. Please refer to the documentation.")
and when I go to the pysolr documentation it seems as if it's to be used without haystack. There is no mention pysolr in haystack docs and no mention of haystack in pysolr docs. Not only that, but pysolr gives an example that says
# If on Python 2.X
Im using python 3. I understand theres a learning curve but is there anything that has all the resources in one post? Or must I just trial and error it out? and also can it be Kind of up to date? 2.x to 3.5 is a big gap. There are surprisingly no google videos or vimeo videos on this. any and all help is welcome. I know anything worth having or knowing isn't easy to come by but sheesh? the few sites Ive seen also have the url like this in urls.py
(r'^search/', include('haystack.urls')),
but if I do it like that I get an error
regex_pattern = pattern.regex.pattern
AttributeError: 'tuple' object has no attribute 'regex'
this may seem like nothing to someone experienced, but to the untrained this can lead to a lot of confusion to the proper syntax.
Haystack uses different adapters to talk to different backend services, such as ElasticSearch or Solr.
The Solr adapter uses pysolr:
You’ll also need a Solr binding, pysolr. The official pysolr package, distributed via PyPI, is the best version to use (2.1.0+). Place pysolr.py somewhere on your PYTHONPATH.
You shouldn't have to do anything with pysolr yourself, as that is only used inside the haystack Solr adapter. Be sure to follow the tutorial for setting up the schema and getting the indexing running.
just pip install pysolr and move about your day.
Personally, I used(in my virtual env):
python3 -m pip install pysolr

Having trouble with download_app and coursebuilder

I inherited an appengine coursebuilder project a couple months ago, and we've been trying to upgrade to a more recent version of coursebuilder. In order to do this, the first step is to download local version of the course.
Whenever I run appcfg.py download_app -A $projectID -V $versionNumber ./folderToSaveTo
It downloads a different version of the course, one that looks like an old test version with old placeholder text, all links to lessons set to private, etc.
When I look at the versions of the course in the appengine dashboard, there is only a single version, so I'm not sure what it's even downloading.
Alternatively, it was suggested I use the ETL tool provided with coursebuilder to download the files instead, but that had a bunch of other issues associated with it as well. Previously I had asked the question directly on the coursebuilder forum where the ETL tool was initially suggested.
Thanks in advance for any help,
-Tyler Nolan
appcfg's download_app will only look within the default module. You should check if there are any drop-downs in the Developers Console UI which will allow you to look into whether there are other modules.
gcloud preview app modules download on the other hand, does allow you to specify modules.
Hopefully this helps you find the "real version" of your app.
It's also possible that what you download is displaying default data because it's not being viewed in a manner which is properly connected to the database, so it falls back to look like that.

Upgrade Django from 1.6.2 to latest version (~1.8)

So I've been tasked with upgrading a Django server from 1.6.2 to the latest (~1.8), along with upgrading Python from 2.7.3 to 3.3. I suspect this is going to break quite a bit of code. (I even need to upgrade the Ubuntu installation from 12.04 to 14.04)
I would like to migrate my Django app from the server it's currently running on (Ubuntu 12.04) to a virtual machine, and use that environment as a sandbox to make changes.
Would anyone be so kind to provide guidance on django app migration? Please let me know if you'd like me to provide any specific details.
Thank you.
Edit: If anyone would like to vote down this question because they believe I haven't done enough research, I'm very happy to add missing information, if I know what you're looking for.
Django versions from 1.5 onwards has been designed so that the same code will work on both versions of Python as in the documentation thanks to them following the six compatibility layer.
You might face some issues with code that isn't strictly related to Django components like print statements and other such parts that might have been coded in. The official Python Porting Guide should held you with that.
Django 1.8 is a LTS (Long Term Release) so it's a good idea to upgrade to it. Migrating the database might be a bit of an issue considering it's from 2.7 to 3.4 but that's in all likelihood the place you'll find most issue with. The How to Migrate is a great resource.
If I recall correctly the directory structure is a bit different in 1.6 so you'll have to move some code and files manually. I suggest having the tutorial pages for both versions 1.6 and 1.8 open and comparing the directory structure.
Going through the first 2 pages of the tutorial should give you enough of an overview to migrate the database and the settings file. This should also help with migrations.
The 3rd and 4th pages should get you through migrating the views and urls files.
The only thing I'm not familiar with is the migration of the wsgi file which has configuration information, you should be able to find some basic information about that here.
Updating your Ubuntu however won't change or affect anything at all.
Also as has been said in the comments by jape and joel, it's a good idea to use virtualenv and git.
I would like to add another suggestion based on my own experience with pushing code to a Django server :
Download the code base to your local machine and work there and once you're done and the server is working well on your machine push it all to the server at once. That way you can isolate server machine specific issues from coding issues.

Categories