1

I'm trying to use this SDK/API, but it's built for Python2 and I'm working in a Django 1.8.8 / Python 3.5.1 site. I'm sure I could trigger a Python2 script from Python3-Django, but is it safe to pass secure, web-submitted information to it? Is there a better way to handle this altogether?

I can't find anything about SecureSubmit in StackExchange, even though it seems to be huge, and I'm not finding much on using mixed Python (Python2 + Python3) libraries at all...

Heartland has been around awhile and their SecureSubmit service has APIs for many languages (PHP, .Net, Java, Ruby, Python and nodeJS). If it's better to integrate one of those with my Django site rather than launch a Python2 script, let me know! (I've contacted Heartland, too, but who knows when I'll get a response...)

Thanks!

evan
  • 162
  • 1
  • 14
  • I would contact the developer and ask if they are porting to python 3 before asking on here. – PythonTester Jul 18 '16 at 08:13
  • looking at the source code it appears that it may be a simple task to port for python 3, there is nothing complicated to it. – PythonTester Jul 18 '16 at 08:19
  • That's great to hear! The developer did respond and they said they have no plans to port to Python 3. I'm working on porting it myself with [future](https://pypi.python.org/pypi/future) but I've run into a serious snag: the package in question has a custom enums.py module that conflicts with the one built into Python 3.Tyring to override it and hoping that doesn't break anything... – evan Jul 18 '16 at 13:09
  • are you talking about: heartland-python/securesubmit/infrastructure/enums.py This looks like an implementation of enums using : 'https://docs.python.org/3/library/enum.html' .... what is the error you are getting?? I would just try running it in python 3 then go from there. – PythonTester Jul 19 '16 at 14:17
  • Yeah. Python 3 won't let you subclass an enum if it has members (which is what they did) so I just recreated a few of their subclassed enums to be new enums. Seems to be working... – evan Jul 19 '16 at 14:19
  • Great work!! he who tries and all that.. now you can test it and re submit the fork :) let the dev know and take a bow :) – PythonTester Jul 19 '16 at 14:21
  • Thanks! I will! It will be my first fork. (But I do have my own github). The encouragement means a TON, btw. I feel like a poser coder because such a dearth of formal training though I've made a lot of handy stuff for myself and even sold my software to a couple universities (before I knew what a method or a class was!). Python is DA BOMB and I can't imagine ever going back to VBA or PHP (the only other languages I've made working apps in). – evan Jul 19 '16 at 14:31

1 Answers1

0

I think it's great you grasped the nettle, I am sure all who use your work will appreciate the ability to use python 3 with this. I am happy to have inspired you to try.

PythonTester
  • 831
  • 7
  • 11