Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google App engine support #7

Open
shayanb opened this issue Oct 19, 2015 · 7 comments
Open

Google App engine support #7

shayanb opened this issue Oct 19, 2015 · 7 comments

Comments

@shayanb
Copy link

shayanb commented Oct 19, 2015

Has anyone tried to port this sdk to Google App engine? is there any plans to support app engine?

@shayanb
Copy link
Author

shayanb commented Oct 20, 2015

I put together a fork that works on Appengine: https://github.com/shayanb/blocktrail-sdk-python

@rubensayshi
Copy link
Contributor

hmm, I thought the requests package would work on GAE, maybe I should switch the sdk to https://pypi.python.org/pypi/urllib3 instead, which does claim to support GAE

@shayanb
Copy link
Author

shayanb commented Oct 21, 2015

yeah it might be a bit tricky to have a universal library that works on all platforms, for the fork I used from google.appengine.api import urlfetch that is just specific to GAE, but I've used urllib2 before for the same issue and it worked fine, urlib3 could work too.

try:
    from urllib2 import urlopen
except ImportError:
    from urllib.request import urlopen

@shayanb
Copy link
Author

shayanb commented Oct 22, 2015

using client.transaction(tx) , it sometimes ends up with this error on GAE:

'_URLFetchResult' object has no attribute 'reason' : {}

Any ideas?

p.s I'm using from google.appengine.api import urlfetch

@shayanb
Copy link
Author

shayanb commented Oct 22, 2015

@rubensayshi they are the double-spends (malleability) tx-hashes that fail to reply.

@rubensayshi
Copy link
Contributor

can you give me one of the failing TXs? if you don't want to publicly link one then mail me ruben@blocktrail.com

@peterlie
Copy link

peterlie commented Feb 4, 2017

requests-toolbelt is helpful to get requests working on App Engine: https://github.com/sigmavirus24/requests-toolbelt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants