Skip to content

Commit 6554306

Browse files
authored
release(v0.3.2): with allow custom ssl certs + help package (#52)
2 parents 38229f5 + 60d1edd commit 6554306

16 files changed

Lines changed: 61 additions & 46 deletions

.github/workflows/main.yaml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
python-version: ["3.10", "3.11"]
15+
python-version: ["3.10", "3.11", "3.12"]
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
18+
with:
19+
fetch-depth: 0
20+
1821
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v4
22+
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
2023
with:
2124
python-version: ${{ matrix.python-version }}
2225
cache: 'pip'
@@ -40,9 +43,12 @@ jobs:
4043
needs: [test]
4144

4245
steps:
43-
- uses: actions/checkout@v4
46+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
47+
with:
48+
fetch-depth: 0
49+
4450
- name: Set up Python
45-
uses: actions/setup-python@v4
51+
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
4652
with:
4753
python-version: "3.10"
4854
cache: 'pip'
@@ -60,7 +66,7 @@ jobs:
6066
python setup.py sdist bdist_wheel
6167
6268
- name: Publish package
63-
uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf
69+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
6470
with:
6571
user: __token__
6672
password: ${{ secrets.PYPI_API_TOKEN }}
@@ -71,9 +77,11 @@ jobs:
7177
needs: [publish]
7278

7379
steps:
74-
- uses: actions/checkout@v4
80+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
81+
with:
82+
fetch-depth: 0
7583

76-
- uses: Roang-zero1/github-create-release-action@57eb9bdce7a964e48788b9e78b5ac766cb684803
84+
- uses: Roang-zero1/github-create-release-action@57eb9bdce7a964e48788b9e78b5ac766cb684803 # v3.0.1
7785
with:
7886
version_regex: ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+
7987
env:

.openapi-generator/FILES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ openfga_sdk/client/models/write_transaction_opts.py
9292
openfga_sdk/configuration.py
9393
openfga_sdk/credentials.py
9494
openfga_sdk/exceptions.py
95+
openfga_sdk/help.py
9596
openfga_sdk/models/__init__.py
9697
openfga_sdk/models/any.py
9798
openfga_sdk/models/assertion.py

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## v0.3.2
4+
5+
### [0.3.2](https://github.com/openfga/python-sdk/compare/v0.3.1...v0.3.2) (2023-12-15)
6+
- feat: allow passing ssl certs to client configuration
7+
- feat: setup openfga_sdk.help for bug info
8+
39
## v0.3.1
410

511
### [0.3.1](https://github.com/openfga/python-sdk/compare/v0.3.0...v0.3.1) (2023-12-01)

README.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ from openfga_sdk.client import OpenFgaClient
130130

131131
async def main():
132132
configuration = openfga_sdk.ClientConfiguration(
133-
api_scheme = OPENFGA_API_SCHEME, # optional, defaults to "https"
134-
api_host = OPENFGA_API_HOST, # required, define without the scheme (e.g. api.fga.example instead of https://api.fga.example)
135-
store_id = OPENFGA_STORE_ID, # optional, not needed when calling `CreateStore` or `ListStores`
136-
authorization_model_id = OPENFGA_AUTHORIZATION_MODEL_ID, # Optional, can be overridden per request
133+
api_scheme = FGA_API_SCHEME, # optional, defaults to "https"
134+
api_host = FGA_API_HOST, # required, define without the scheme (e.g. api.fga.example instead of https://api.fga.example)
135+
store_id = FGA_STORE_ID, # optional, not needed when calling `CreateStore` or `ListStores`
136+
authorization_model_id = FGA_AUTHORIZATION_MODEL_ID, # Optional, can be overridden per request
137137
)
138138
# Enter a context with an instance of the OpenFgaClient
139139
async with OpenFgaClient(configuration) as fga_client:
@@ -152,14 +152,14 @@ from openfga_sdk.credentials import Credentials, CredentialConfiguration
152152

153153
async def main():
154154
configuration = openfga_sdk.ClientConfiguration(
155-
api_scheme = OPENFGA_API_SCHEME, # optional, defaults to "https"
156-
api_host = OPENFGA_API_HOST, # required, define without the scheme (e.g. api.fga.example instead of https://api.fga.example)
157-
store_id = OPENFGA_STORE_ID, # optional, not needed when calling `CreateStore` or `ListStores`
158-
authorization_model_id = OPENFGA_AUTHORIZATION_MODEL_ID, # Optional, can be overridden per request
155+
api_scheme = FGA_API_SCHEME, # optional, defaults to "https"
156+
api_host = FGA_API_HOST, # required, define without the scheme (e.g. api.fga.example instead of https://api.fga.example)
157+
store_id = FGA_STORE_ID, # optional, not needed when calling `CreateStore` or `ListStores`
158+
authorization_model_id = FGA_AUTHORIZATION_MODEL_ID, # Optional, can be overridden per request
159159
credentials = Credentials(
160160
method='api_token',
161-
configuration=CredentialConfiguration(
162-
api_token= OPENFGA_API_TOKEN,
161+
configuration = CredentialConfiguration(
162+
api_token = FGA_API_TOKEN,
163163
)
164164
)
165165
)
@@ -180,17 +180,17 @@ from openfga_sdk.credentials import Credentials, CredentialConfiguration
180180

181181
async def main():
182182
configuration = openfga_sdk.ClientConfiguration(
183-
api_scheme = OPENFGA_API_SCHEME, # optional, defaults to "https"
184-
api_host = OPENFGA_API_HOST, # required, define without the scheme (e.g. api.fga.example instead of https://api.fga.example)
185-
store_id = OPENFGA_STORE_ID, # optional, not needed when calling `CreateStore` or `ListStores`
186-
authorization_model_id = OPENFGA_AUTHORIZATION_MODEL_ID, # Optional, can be overridden per request
183+
api_scheme = FGA_API_SCHEME, # optional, defaults to "https"
184+
api_host = FGA_API_HOST, # required, define without the scheme (e.g. api.fga.example instead of https://api.fga.example)
185+
store_id = FGA_STORE_ID, # optional, not needed when calling `CreateStore` or `ListStores`
186+
authorization_model_id = FGA_AUTHORIZATION_MODEL_ID, # Optional, can be overridden per request
187187
credentials = Credentials(
188-
method='client_credentials',
189-
configuration=CredentialConfiguration(
190-
api_issuer= OPENFGA_API_TOKEN_ISSUER,
191-
api_audience= OPENFGA_API_AUDIENCE,
192-
client_id= OPENFGA_CLIENT_ID,
193-
client_secret= OPENFGA_CLIENT_SECRET,
188+
method = 'client_credentials',
189+
configuration = CredentialConfiguration(
190+
api_issuer = FGA_API_TOKEN_ISSUER,
191+
api_audience = FGA_API_AUDIENCE,
192+
client_id = FGA_CLIENT_ID,
193+
client_secret = FGA_CLIENT_SECRET,
194194
)
195195
)
196196
)
@@ -214,10 +214,10 @@ from openfga_sdk.sync import OpenFgaClient
214214

215215
def main():
216216
configuration = openfga_sdk.ClientConfiguration(
217-
api_scheme=OPENFGA_API_SCHEME, # optional, defaults to "https"
218-
api_host=OPENFGA_API_HOST, # required, define without the scheme (e.g. api.fga.example instead of https://api.fga.example)
219-
store_id=OPENFGA_STORE_ID, # optional, not needed when calling `CreateStore` or `ListStores`
220-
authorization_model_id=OPENFGA_AUTHORIZATION_MODEL_ID, # optional, can be overridden per request
217+
api_scheme = FGA_API_SCHEME, # optional, defaults to "https"
218+
api_host = FGA_API_HOST, # required, define without the scheme (e.g. api.fga.example instead of https://api.fga.example)
219+
store_id = FGA_STORE_ID, # optional, not needed when calling `CreateStore` or `ListStores`
220+
authorization_model_id = FGA_AUTHORIZATION_MODEL_ID, # optional, can be overridden per request
221221
)
222222
# Enter a context with an instance of the OpenFgaClient
223223
with OpenFgaClient(configuration) as fga_client:

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.1
1+
0.3.2

openfga_sdk/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.
1515
"""
1616

17-
__version__ = "0.3.1"
17+
__version__ = "0.3.2"
1818

1919
from openfga_sdk.client.client import OpenFgaClient
2020
from openfga_sdk.client.configuration import ClientConfiguration

openfga_sdk/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from openfga_sdk.exceptions import ApiValueError, ApiException, FgaValidationException, RateLimitExceededError
3535

3636

37-
DEFAULT_USER_AGENT = 'openfga-sdk python/0.3.1'
37+
DEFAULT_USER_AGENT = 'openfga-sdk python/0.3.2'
3838

3939

4040
def random_time(loop_count, min_wait_in_ms):

openfga_sdk/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def to_debug_report(self):
439439
"OS: {env}\n"\
440440
"Python Version: {pyversion}\n"\
441441
"Version of the API: 0.1\n"\
442-
"SDK Package Version: 0.3.1".\
442+
"SDK Package Version: 0.3.2".\
443443
format(env=sys.platform, pyversion=sys.version)
444444

445445
def get_host_settings(self):

openfga_sdk/oauth2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async def _obtain_token(self, client):
5454
'grant_type': "client_credentials",
5555
}
5656
headers = urllib3.response.HTTPHeaderDict(
57-
{'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk (python) 0.3.1'})
57+
{'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk (python) 0.3.2'})
5858
raw_response = await client.POST(token_url, headers=headers, body=body)
5959
if 200 <= raw_response.status <= 299:
6060
try:

openfga_sdk/sync/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from openfga_sdk.exceptions import ApiValueError, ApiException, FgaValidationException, RateLimitExceededError
3535

3636

37-
DEFAULT_USER_AGENT = 'openfga-sdk python/0.3.1'
37+
DEFAULT_USER_AGENT = 'openfga-sdk python/0.3.2'
3838

3939

4040
def random_time(loop_count, min_wait_in_ms):

0 commit comments

Comments
 (0)