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.
Related
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?
Probably this was already answered somewhere, but my google-fu can't get proper keywords for this.
Ok so, I need to get a file from my site which is like foo.bar/foobar/file.ext . That file is always accessible but if you aren't google-authenticated on the site you get a blank file.
How can I get proper authentication with python?
Sorry if this isn't very clear but it's my first time here... Thanks in advance for help
First install the Python SDK here.
Then I would start reading about OAuth here.
They have different examples depending on your use case. (e.g. If you are authenticating a user from their browser, versus from server to server)
I want to use server-side includes so I can include header and footer files on my personal portfolio. I've been using the Python SimpleHTTPServer because I had the command handy, so I know how to run it.
My server-side includes don't currently work. My understanding is that, based on this article, I would need to configure my SimpleHTTPServer to allow for server-side includes. I haven't been able to find this information anywhere, so I'm thinking that I need to I use a different web server. Can someone clarify?
If I have to use a different web server, I'd love to hear any suggestions. I'm a noob so something simple would be great. Also, it'd be helpful if you could provide: (1) any good tutorials for making any of the necessary config changes so I can run SSI; (2) the command I run to start the server (so I can make an alias). I looked briefly at Apache stuff, but seems very intimidating. I'm wondering if there is a more noob-friendly way. I'm trying to build a personal portfolio, not do anything crazy.
Thanks for your help!
I found ssi-server by Googling for "ssi python". It says it provides "Server Side Includes in Python's SimpleHTTPServer" and looks like it might work for you.
Do you have to use Server Side Includes? Since you're using python, there are lot of options for doing this kind of functionality. For example, you could just use python's string manipulation to join the files together (e.g. with the str.format method). Or you could use a templating language like jinja2, mako, etc.
What SSI features are you depending on? Or do you have some existing SSI files that you want to use as-is?
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.
I have so many tasks to be done via scrapy on prodcution server.
As my manager wants to add or remove the urls to scrap and he wants the web interface.
I am thinking of making the web app for that
I have found this link
https://github.com/holgerd77/django-dynamic-scraper/
I just want to know that can I use that in production or I can manually call scrapy in my django app and I don't need to use that app.
I have tried that and looks alright to me. They also have good documentaion written there
They are good if you are new and want to get things going. but i think once you get used to the scrapy and django in detail you almost don't need it
Python modules, including scrapy, are most of the time plug-and-play so yes, you should be able to do it with scrapy itself. And you will probably benefit from clearer documentation.