In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
How to understand Python's OAuth login interface python-oauth2, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
Preface
Python-oauth3 is the OAuth 2 implementation of the Python language, including the client side and the server side. The project has been fully tested.
It has the following features:
100% unit test coverage.
The DataStore object is completely removed.
All class names are no longer prefixed with OAuth.
The Request class produces dictionary objects.
Python2.3 is no longer supported.
The Client class is an extension on top of httplib2.
The examples in the document are all in Twitter, including the following:
Basic Twitter login.
Use Django.
An example of XOAUTH for IMAP and SMTP.
Although the examples are all based on Twitter, they are all OAuth3 protocols, and it won't be a big problem to log in to domestic services.
Client sample code:
Import oauth3 as oauth# Create your consumer with the proper key/secret.consumer = oauth.Consumer (key= "your-twitter-consumer-key", secret= "your-twitter-consumer-secret") # Request token URL for Twitter.request_token_url = "http://twitter.com/oauth/request_token"# Create our client.client = oauth.Client (consumer) # The OAuth Client request works just like httplib2 for the most part.resp, content = client.request (request_token_url," GET ") print respprint content
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.