File tree Expand file tree Collapse file tree 4 files changed +27
-22
lines changed
Expand file tree Collapse file tree 4 files changed +27
-22
lines changed Original file line number Diff line number Diff line change 2626 command : |
2727 poetry publish \
2828 --build \
29- --repository pypi \
3029 --username "$TWINE_USERNAME" \
3130 --password "$TWINE_PASSWORD"
3231
Original file line number Diff line number Diff line change 11dist /
2- __pycache__
2+ __pycache__
3+ .coverage
4+ htmlcov /
Original file line number Diff line number Diff line change @@ -34,7 +34,26 @@ pip install oauth2-cli-auth
3434
3535## Usage
3636
37- See [ example.py] ( example.py )
37+ ### Simple
38+
39+ The following should work for 90% of all use cases, for rest please check the lib docs.
40+
41+ ``` python
42+ from oauth2_cli_auth import get_access_token_with_browser_open, OAuth2ClientInfo
43+
44+ client_info = OAuth2ClientInfo(
45+ client_id = " <clientId>" ,
46+ authorization_url = " <authorizeUrl>" ,
47+ token_url = " <TokenUrl>" ,
48+ scopes = [" scopeA" , " scopeB" ]
49+ )
50+
51+ try :
52+ token = get_access_token_with_browser_open(client_info)
53+ print (f " Obtained token ' { token} ' " )
54+ except ValueError :
55+ print (" Failed to obtain token" )
56+ ```
3857
3958## Motivation
4059
@@ -45,7 +64,7 @@ So I created this small library without any dependencies besides the python stan
4564
4665## Documentation
4766
48- > TBD
67+ - [ Library documentation ] ( https://timo-reymann.github.io/python-oauth2-cli-auth/oauth2_cli_auth/ )
4968
5069## Contributing
5170
@@ -69,7 +88,9 @@ To get started please read the [Contribution Guidelines](./CONTRIBUTING.md).
6988
7089### Test
7190
72- > TBD
91+ ```
92+ poetry run pytest .
93+ ```
7394
7495### Build
7596
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments