Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 months ago.
Improve this question
can i share session between different lang applications like:
1st is based on C# and
2nd is based on python, so can i somehow share session?
if yes can someone please tell me how?
You need to have a common means of storing and sharing the data.
This can be your DB or better a shared cache like Redis.
Session data can be stored with a session id as a Key.
Then you can store this Key as a Cookie value to the client which will be passed on every request.
One of the most standardized ways of storing this information into the client is JWT
JWT can be read by almost all kind of server apps.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
Say you write a python application that interacts with a webserver. The application secures your traffic with public-private key encryption (e.g. RSA). How can you prevent someone to read the program in a normal text editor and extract your private key?
Usually user applications that interact with a webserver have 2 methods for authentication.
1-Session authentication: you need to login to the webserver for the server to give you access to the pages or information you need.
2-Token authentication: The server can generate a token that the user can send with the requests.
On the other hand if its an application that only you are going to use you can set the private keys in the environment variables of your operating system and then fetch them using python.
API_SECRET = os.environ.get("SECRET_KEY")
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am looking to send data from a SQL server to a third party api via Python.
I was wondering if anyone could provide any references to follow that work through this process.
P.S - I've looked online but, suprisingly haven't found anything - perhaps I am not searching for the correct terms.
Any help would be appreciated.
Well, this tells you how to connect to MySQL via Python:
How do I connect to a MySQL Database in Python?
And this tells you how to consume a REST API via Python:
How do I get JSON data from RESTful service using Python?
You could access a REST API from MySQL via UDF, but that's not the kind of logic one should put in the database.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm new to Flask but have experience with PHP. I know there are session variables and global variables just as in PHP, but what do the contexts actually mean? I read the documentation but could not understand whet it was saying.
What are the application and request contexts, and what the is app.app_context()?
app.app_context loads the application and any extentions you have loaded.
A request context is loaded when you are dealing with a request.
A good example.
If you have a background cron that does some database work, you'll need to make use of app_context to get access to the models.
You'll be a in request context pretty much whenever you're handling a view.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
How can I create a client side database to store information of users on client side. Does anybody know of any tutorials or pointers? Which is the recommended database to use? My client is in .js and uses Django framework.
What you are asking for is called Web Storage and is part of HTML5.
http://diveintohtml5.info/storage.html
http://www.gwtproject.org/doc/latest/DevGuideHtml5Storage.html
However, many times when people SAY they need a client-side database, I ask them the details and it turns out that they don't really need client side storage at all, so proceed with caution.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I want to create a little program with following features.
Use proxy in format proxy:port:username:password
Choose a proxy sequentialially from list
Open http://example.com
Fill Details choosing data from data.txt ( CSV )
Export Cookie,username,password,email address --> cookie.txt
Delete Cookies
Log into associated email account and confirm account by visiting
link sent to that email address.
Then cycle through Step1 again.
I read several similar question on stackoverflow.
I planned to use Selenium for this program, but reading comment here How to save and restore all cookies with Selenium RC?
the get_cookie method doesn't provide the path, domain, and expiry
date for each cookie, so it isn't possible to fully restore those
parameters with create_cookie. any other ideas
And i won't be able to manipulate cookies using method as describe here http://hub.tutsplus.com/tutorials/how-to-build-a-python-bot-that-can-play-web-games--active-11117
I want to know easiest way to tackle this problem. I plan to run single threaded application.
I don't know selenium, but why not use mechanize and requests ? Both are awesome.