Skip to content

Commit 85f102e

Browse files
committed
fix: Fix publish, improve docs
1 parent e913ddf commit 85f102e

File tree

4 files changed

+27
-22
lines changed

4 files changed

+27
-22
lines changed

.circleci/config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ jobs:
2626
command: |
2727
poetry publish \
2828
--build \
29-
--repository pypi \
3029
--username "$TWINE_USERNAME" \
3130
--password "$TWINE_PASSWORD"
3231

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
dist/
2-
__pycache__
2+
__pycache__
3+
.coverage
4+
htmlcov/

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff 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

example.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)