Simple authentication package for the Bayes Esports API
Project description
lol_bayes_auth
Simple authentication package for the Bayes Esports API
Install
pip install lol_bayes_auth
If you wish to install the latest development version:
pip install -U git+https://github.com/Allan-Cao/lol_bayes_auth
Example Usage
Get a Bayes Esports authentication token using a v1/v2 login
from lol_bayes_auth import BayesAuth
authv1 = BayesAuth('v1username', 'v1password', True)
authv2 = BayesAuth('v2username', 'v2password')
v1token = authv1.get_token()
v2token = authv2.get_token()
Get a formatted header to authenticate with the Bayes Esports API
auth = BayesAuth('username', 'password')
header = auth.get_headers()
# Example usage with the requests library
requests.get(
f'https://lolesports-api.bayesesports.com/v2/games',
headers=auth.get_headers(),
params=parameters,
).json()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lol_bayes_auth-0.1.4.tar.gz
(14.6 kB
view hashes)
Built Distribution
Close
Hashes for lol_bayes_auth-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd52bf79a5d28a77b9639427bdf8c3856f67991f354e2585eec303c4ccdf25b2 |
|
MD5 | 8a7e3b47cb798112570ba002b328a0ea |
|
BLAKE2b-256 | f667d51f933c5b7421ea2713f650b6abce14466ced6f770f6b32cf13e4dd3e61 |