I'm exploring options to create RESTful APIs for MT4 without setting up EA. As an example, http://mt4.mtapi.be/index.html - is just what I want to create.
However, the problem is that I'm not entirely sure if its possible to do so without setting up EA inside the MT4 terminal.
I read this post and it seems like ZeroMQ can be used.
Any help will be appreciated. Thank you.
Your question is not very clear to me.
I have set up a Google Apps Script (bound to a spreadsheet) that's connecting to the Oanda API.
Maybe that's what you're looking for?
Related
This is my first post. I tried to google and find my own solution, but I don’t even know where to start with this. I want to make a phone app (with Unity(C#) ideally) and eventually a website, while also hosting a web app (python) that the phone app can send basic info (ideally a json or dict) that the web app can do some processing and database referencing and just send back a short answer or two (again ideally a json or dict). I looked into bottlepy and just communicating through http but this seems clunky and I’m sure is not the best way. I don't need (although would appreciate) a full explanation, just the term/protocol/technology I am looking for. Thanks in advance for any help!
You should look at the UnityWebRequest : https://docs.unity3d.com/Manual/UnityWebRequest.html
And maybe you should try to use a REST API on your server to communicate with a UnityWebRequest : https://codetolight.wordpress.com/2017/01/18/unity-rest-api-interaction-with-unitywebrequest-and-besthttp/
I want to be able to give out a form, with essentially 4 inputs. Each time it is submitted, I would it to trigger a python script.
I'm not totally sure where to start here. I could have the python code live on a server somewhere and have the google apps script trigger it, but ideally I could do this without having to host my code somewhere else. I also would like to avoid paying for anything...
Any and all advice would be appreciated. Please assume I have only a small amount of knowledge about this kind of stuff.
Check out this tutorial on the AppEngine documentation.
https://developers.google.com/appengine/docs/python/gettingstartedpython27/introduction
It will help you set up using Python and WebApp2 (for your forms!) and storing this data to datastore if you wish. You could just expand and modify the guestbook tutorial they make you do to have your application/script do exactly what you need it to. It's an excellent tutorial to get started even if you don't have much knowledge about python or appengine.
can anyone help me get sessions or cookies working with my code here:
http://pastebin.com/2Y2tydsF
I have tried a few session modules that I found with Google but nothing seems to work, or I dont know how to use it.
I have also fiddled with cookies but with no luck
Also, what are the differences, and what are CGI and WSGI apps? and would my code be one of the two?
Thanks
Use gai-sessions. The source includes demos which show how to use it, including how to integrate with the Users API or RPX/JanRain.
Is there any way to make widgets with Python on Android?
I mean, that I know only Python, HTML, DOM, JS, maybe jQuery and nothing more (not C, Java or something).
Maybe it's simple?
I honestly searched stackoverflow but search returned no answers :(
Help me, please. Give me a hope.
Personally I wrote a google app engine app in python to collect and display the data, and then used an app called "meta widget" that allows you to turn a website's content into a widget. The app pulls the content from my GAE website and shows it in a widget on the android homescreen.
You might be able to do something completely local if you can make something to serve HTTP requests in sl4a python, then have meta widget go to a local http address.
I don't think this could be done.
I've done a quick search in SL4A documentation and there is no API to register broadcast receiver. And Android widgets are just a bunch of Views and code in BroadcastReceiver.
And as far as I know, SL4A is the only way to use Python on Android with UI interaction.
Please check this links:
http://code.google.com/p/android-scripting/
http://google-opensource.blogspot.com/2009/06/introducing-android-scripting.html
Remember that there is a Python implementation on the JVM called Jython.
Edit:
In terms of Android development i should say Jythonroid.
Pyjamas perhaps? Maybe not exactly what you're looking for but it would allow you to at least write some of your code in Python (and compile to JavaScript).
I am currently working on a project to create simple file uploader site that will update the user of the progress of an upload.
I've been attempting this in pure python (with CGI) on the server side but to get the progress of the file I obviously need send requests to the server continually. I was looking to use AJAX to do this but I was wondering how hard it would be to, instead of changing to some other framerwork (web.py for instance), just write my own web server for receiving the XML HTTP Requests?
My main problem is that sending the request is done from HTML and Javascript so it all seems like magic trickery at the moment.
Can anyone advise me as to the best way to go about receiving these requests on the server?
EDIT: It seems that a framework would be the way to go. Would web.py be a good route to take?
I would recommend to use a microframework like Sinatra for Ruby. There seem to be some equivalents for Python. What python equivalent of Sinatra would you recommend?
Such a framework allows you to simply map a single method to a route.
Writing a very basic HTTP server won't be very hard (see http://docs.python.org/library/simplehttpserver.html for an example), but you will be missing many features that are provided by real servers and web frameworks.
For your project, I suggest you pick one of the many Python web frameworks and run your application behind Apache/mod_wsgi.
There's absolutely no need to write your own web server. Plenty of options exist, including lightweight ones like nginx.
You should use one of those, and either your own custom WSGI code to receive the request, or (better) one of the microframeworks like Flask or Bottle.