All Projects → josuebrunel → yahoo-oauth

josuebrunel / yahoo-oauth

Licence: MIT license
Yahoo OAuth Library

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to yahoo-oauth

sign-in-with-google
A WordPress plugin that adds "Sign in with Google" functionality
Stars: ✭ 24 (-59.32%)
Mutual labels:  oauth
portara-website
Portara dashboard controller to change rate limit settings without redeploying your app
Stars: ✭ 42 (-28.81%)
Mutual labels:  oauth
micro-service-practice
OpenStack+Docker+RestAPI+OAuth/HMAC+RabbitMQ/ZMQ+OpenResty/HAProxy/Nginx/APIGateway+Bootstrap/AngularJS+Ansible+K8S/Mesos/Marathon构建/探索微服务最佳实践。
Stars: ✭ 25 (-57.63%)
Mutual labels:  oauth
kubernetes-localdev
Create a local Kubernetes development environment on macOS or Windows and WSL2, including HTTPS/TLS and OAuth2/OIDC authentication.
Stars: ✭ 210 (+255.93%)
Mutual labels:  oauth
sign-in-with-ethereum
Minimal example of sign in with Ethereum. Compatible with web3 browsers.
Stars: ✭ 25 (-57.63%)
Mutual labels:  oauth
Twitter
[READ ONLY] Subtree split of the SocialiteProviders/Twitter Provider (see SocialiteProviders/Providers)
Stars: ✭ 21 (-64.41%)
Mutual labels:  oauth
laravel-socialiter
Automatically manage user persistence and resolution for any Laravel Socialite provider.
Stars: ✭ 43 (-27.12%)
Mutual labels:  oauth
docusign-esign-node-client
The Official DocuSign Node.js Client Library used to interact with the eSign REST API. Send, sign, and approve documents using this client.
Stars: ✭ 129 (+118.64%)
Mutual labels:  oauth
aPRAW
Asynchronous Python Reddit API Wrapper
Stars: ✭ 49 (-16.95%)
Mutual labels:  oauth
ueberauth slack
Slack OAuth2 Strategy for Überauth
Stars: ✭ 23 (-61.02%)
Mutual labels:  oauth
aiohttp-login
Registration and authorization (including social) for aiohttp apps.
Stars: ✭ 53 (-10.17%)
Mutual labels:  oauth
auth-oauth-app.js
GitHub OAuth App authentication for JavaScript
Stars: ✭ 56 (-5.08%)
Mutual labels:  oauth
guzzle-oauth2-subscriber
OAuth 2.0 Client for Guzzle 4, 5, 6 and 7 with PHP 5.4 - PHP 8.0 - no more dependency hell!
Stars: ✭ 112 (+89.83%)
Mutual labels:  oauth
New-JavaScript-SDK---OAuth-2.0-based-FBConnect-Tutorial
Javascript SDK oAuth 2.0 based FBConnect
Stars: ✭ 68 (+15.25%)
Mutual labels:  oauth
yii2-league-oauth2-server
Yii 2.0 implementation of PHP league OAuth2 server interfaces
Stars: ✭ 29 (-50.85%)
Mutual labels:  oauth
mod oauth2
OAuth 2.x Resource Server module for the Apache HTTPd web server
Stars: ✭ 34 (-42.37%)
Mutual labels:  oauth
streamlabs
This module is a implementation of Streamlabs API https://dev.streamlabs.com/
Stars: ✭ 21 (-64.41%)
Mutual labels:  oauth
socialify
Socialify - Social Login and support OAuth2 for WordPress based on HybridAuth made by @uptimizt with Love :)
Stars: ✭ 20 (-66.1%)
Mutual labels:  oauth
Instagram
[READ ONLY] Subtree split of the SocialiteProviders/Instagram Provider (see SocialiteProviders/Providers)
Stars: ✭ 34 (-42.37%)
Mutual labels:  oauth
express-mvp
Express.js project template ready to go
Stars: ✭ 21 (-64.41%)
Mutual labels:  oauth

yahoo_oauth

Build Status Documentation Status Code Health PyPI PyPI PyPI PyPI Coverage Status PyPI

Yahoo_OAuth is a very easy to use OAuth library for Yahoo! APIs.

Installation

pip install yahoo_oauth

Quickstart

Wether you use OAuth1 or OAuth2, only 2 parameters are required.

  • consumer_key
  • consumer_secret

I recommend putting those two into a file. Only json and yaml files are supported

{
    "consumer_key": "my_very_long_and_weird_consumer_key",
    "consumer_secret": "my_not_that_long_consumer_secret"
}

Once you acquired your access_token, this file will look like :

  • OAuth1
{
    "access_token": "A=5ZnN5xXY5yKacQp1QtUF68MlEmXVIF8fRplkc7W1QMVYeLJ2DdBmNyH7SxVgUbAjdv5edCnk_DEUbfr6GpqezsSAuE9h36wfh.J45twIo1sA.bqMk7Bta6IisI9z1_h8D0QZzWYmjybxlQcuNgd7TY4nJuu_Afj_8ED787BQbjg6OqRotV.eM4_YyBCjP1K8G6rG44iX2PGNj.JSEJrocgvglABkTTVA_8t.JoLH7NHSgxCQXhakBsk3_K.6Rkgm_Nkc7.ZD02pYy3dJAfBh1fFvtrCwIOqDIplri305dZ1UY430X6SfPnZIFJNiTWkMH8_QRhcnfizG5TZugN_.0ib2VnnUzspeFT0_86p6WMP3uFOLYXspdEOryhSJwFJ3AHZN9n.t8euRQOxanpsvw5M5ffBs6P0dI5FijGw3fibbqoheJOSUE_BRUNEL_KOUKAJSsJCH(^_^)JHllHmJUptK9k5ifiqJOpTbodnW8EsyyNhthDOusv5Bp6142mvCPnC7HX7PkTodHqfgVyAUOvOqSsqMGyc65OY8roLORKpUWObw9bjd8YsU40jwSaGZtWmvVhYV9RxUA779bRuE1k0BL_fvXQ_tlZnxPhtIFBB64szQ9AwA9HT_nZKq8q1rOfUcBIZJ7Zu1jwpZUAOkHsfmHWCW2gK8BC4wjk0WuJg95FpZ2z741mhRcdma2bVYpdh3k2DdaBVYRTDT36Q4SBtreb_GNi1Mctg.RhSqopCTTvW4jjXAkt2SHnscUi37v0yo4JVex0cnVmVTFL7TRl1JMLl9jt0XmaLaKuS4nhR4A--", 
    "access_token_secret": "99a20a82e99THE_A_Tf803cb153f3d98", 
    "consumer_key": "dj0yJmk9e_THIS_IS_THE_CK_RGTnpZbWNHbzlNQS0tJnM9Y29uc3VtZXJzZWNyZXQmeD1iNQ--", 
    "consumer_secret": "08802b459abTHIS_IS_THE_CS4b75789f7", 
    "guid": "AJHDHJMYGUID",
    "session_handle": "APIENFXij.bjFW_MY_SESSION_EXn.4.DOIYOR37", 
    "token_time": 1433546792.343515
}
  • OAuth2
{
    "access_token": "DELvMgOYvwPQJS8eFW_2hRN5rJxz6dnHAOk2s.qB0iMIeRg5.ZpW3xZF0p8CABLjZ2gfNdE602dCN2wTHdGHHLtChF3ls9BUuZ1QDdqIVq.yWclfweleyZSq6dAzlPEHiskWmfItjHK5VERY_LONG_ACCESS_TOKEN_oyyD4cIKvdNJsJ9k779mAUqN02_5ugBeDfCLebqjL8uVuunObew0ERa2MxE6jywNY0TTCe9W0nqTd6n0lKoN4PSP1Dw_Ifwx6enGuhUUAhhpa7nNMyhNy_pe6PfDf7IJ5gbkdtw3mD1o2T218ZTV0owdrKDLSF9oZrNvZ75xDlqaaI5yeW_.L63zk11PjsWUd5K8LGhWSTgRbyhffCDBcqVwTYEqHwCyVqHX4z2kgHhGsc0ies6WMG33kSw5Cgun0fnPbdDuHBgQziXU.GMv4hIDoIDMSLGpzpcpkyx4GS1CC_RUQwKxLilR3MQy7X2gI3cJA4lhRPlXEOdhS5HIQiQTgMWO9nWt7.RR7XtXVg-",
    "consumer_key": "dj0yJmk9eFJINERDYWMY_CONSUMER_KEYmRGTnpZbWNHbzlNQS0tJnM9Y29uc3VtZXJzZWNyZXQmeD1iNQ--",
    "consumer_secret": "08802b459ab48eeaMY_CONSUMER_SECRET_0af6a4b75789f7",
    "guid": "AJHDHJMYGUID",
    "refresh_token": "APIENFXij.bjFW1tEcr2THE_REFRESH_TOKEN_Xn.4.DOIYOR37",
    "token_time": 1433553339.706037,
    "token_type": "bearer"
}

With that you should be good to go.

Normally, once your got all that, you can use the same credentials FOREVER, you just have to REFRESH THEM.

Examples

OAuth1

from yahoo_oauth import OAuth1
oauth = OAuth1(None, None, from_file='oauth1.json')
...

if not oauth.token_is_valid():
    oauth.refresh_access_token()

# Example
response = oauth.session.post(url, data=body)

OAuth2

from yahoo_oauth import OAuth2
oauth = OAuth2(None, None, from_file='oauth2.json')
...

if not oauth.token_is_valid():
    oauth.refresh_access_token()
# Example
response = oauth.session.get(url, params=payload)

Tips

  • How to get your Global Unique Identifier (GUID)
from yahoo_oauth import OAuth2

oauth = OAuth2('consumer_key', 'consumer_secret')
guid = oauth.guid
  • How to disable Yahoo_OAuth Logger
import logging
oauth_logger = logging.getLogger('yahoo_oauth')
oauth_logger.disabled = True

Contribute

Any kind of contribution is welcomed.

  1. report bug by opening an issue
  2. Fork the repository
  3. Make your changes
  4. Test your changes
  5. Submit a pull request

Have fun guys 😉

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].