symphony_bdk_python 2.8.0__py3-none-any.whl → 2.9.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,15 @@
1
1
  """Module containing session handle classes.
2
2
 
3
3
  """
4
+ from datetime import datetime, timezone
4
5
  import logging
5
6
 
6
7
  from symphony.bdk.core.auth.exception import AuthInitializationError
7
8
 
8
9
  logger = logging.getLogger(__name__)
9
10
 
11
+ EXPIRATION_SAFETY_BUFFER_SECONDS = 5
12
+
10
13
 
11
14
  class AuthSession:
12
15
  """RSA Authentication session handle to get session and key manager tokens from.
@@ -21,7 +24,9 @@ class AuthSession:
21
24
  """
22
25
  self._session_token = None
23
26
  self._key_manager_token = None
27
+ self._auth_token = None
24
28
  self._authenticator = authenticator
29
+ self._expire_at = -1
25
30
 
26
31
  async def refresh(self):
27
32
  """Trigger re-authentication to refresh the tokens.
@@ -40,6 +45,26 @@ class AuthSession:
40
45
  self._session_token = await self._authenticator.retrieve_session_token()
41
46
  return self._session_token
42
47
 
48
+ @property
49
+ async def auth_token(self):
50
+ """Auth token request calls the same endpoint that session token.
51
+ Therefore, session token is updated unintentionally,
52
+ since there's no explicit way to update authorization token exclusively
53
+ : return: (str) authorization_token like Bearer eyJh...
54
+ """
55
+
56
+ if (
57
+ self._auth_token
58
+ and self._expire_at
59
+ > datetime.now(timezone.utc).timestamp() + EXPIRATION_SAFETY_BUFFER_SECONDS
60
+ ):
61
+ return self._auth_token
62
+ token, expire_at = await self._authenticator.retrieve_session_token_object()
63
+ self._expire_at = expire_at
64
+ self._auth_token = token.authorization_token
65
+ self._session_token = token.token
66
+ return self._auth_token
67
+
43
68
  @property
44
69
  async def key_manager_token(self):
45
70
  """
@@ -1,8 +1,9 @@
1
1
  """Module containing BotAuthenticator classes.
2
2
  """
3
+ from typing import Optional, Tuple
3
4
  from abc import ABC, abstractmethod
4
5
 
5
- from symphony.bdk.core.auth.jwt_helper import create_signed_jwt
6
+ from symphony.bdk.core.auth.jwt_helper import create_signed_jwt, generate_expiration_time
6
7
  from symphony.bdk.core.config.model.bdk_bot_config import BdkBotConfig
7
8
  from symphony.bdk.core.config.model.bdk_retry_config import BdkRetryConfig
8
9
  from symphony.bdk.core.retry import retry
@@ -11,6 +12,7 @@ from symphony.bdk.gen.api_client import ApiClient
11
12
  from symphony.bdk.gen.auth_api.certificate_authentication_api import CertificateAuthenticationApi
12
13
  from symphony.bdk.gen.login_api.authentication_api import AuthenticationApi
13
14
  from symphony.bdk.gen.login_model.authenticate_request import AuthenticateRequest
15
+ from symphony.bdk.gen.login_model.token import Token
14
16
 
15
17
 
16
18
  class BotAuthenticator(ABC):
@@ -30,6 +32,17 @@ class BotAuthenticator(ABC):
30
32
  """
31
33
  return await self._authenticate_and_get_token(self._session_auth_client)
32
34
 
35
+ async def retrieve_session_token_object(self) -> Tuple[Token, int]:
36
+ """Authenticates and retrieves a new auth token.
37
+
38
+ :return: retrieved token object + expiration date.
39
+ """
40
+ expire_at = generate_expiration_time()
41
+ token = await self._authenticate_and_get_token_object(
42
+ self._session_auth_client, expire_at
43
+ )
44
+ return token, expire_at
45
+
33
46
  async def retrieve_key_manager_token(self) -> str:
34
47
  """Authenticated and retrieved a new key manager session.
35
48
 
@@ -58,11 +71,21 @@ class BotAuthenticatorRsa(BotAuthenticator):
58
71
 
59
72
  @retry(retry=authentication_retry)
60
73
  async def _authenticate_and_get_token(self, api_client: ApiClient) -> str:
61
- jwt = create_signed_jwt(self._bot_config.private_key, self._bot_config.username)
62
- req = AuthenticateRequest(token=jwt)
74
+ token_object = await self._authenticate_and_get_token_object(api_client)
75
+ return token_object.token
63
76
 
64
- token = await AuthenticationApi(api_client).pubkey_authenticate_post(req)
65
- return token.token
77
+ @retry(retry=authentication_retry)
78
+ async def _authenticate_and_get_token_object(
79
+ self, api_client: ApiClient, expire_at: Optional[int] = None
80
+ ) -> Token:
81
+ """Calls pubkey auth endpoint with signed jwt token.
82
+ :return: token object which might contain a few tokens inside
83
+ """
84
+ jwt = create_signed_jwt(
85
+ self._bot_config.private_key, self._bot_config.username, expire_at
86
+ )
87
+ req = AuthenticateRequest(token=jwt)
88
+ return await AuthenticationApi(api_client).pubkey_authenticate_post(req)
66
89
 
67
90
 
68
91
  class BotAuthenticatorCert(BotAuthenticator):
@@ -2,7 +2,7 @@
2
2
  """
3
3
  import datetime
4
4
 
5
- import jwt
5
+ from jwt import PyJWT, DecodeError, ExpiredSignatureError
6
6
  from cryptography.hazmat.primitives.serialization import Encoding, PublicFormat
7
7
  from cryptography.x509 import load_pem_x509_certificate
8
8
 
@@ -13,6 +13,7 @@ JWT_ENCRYPTION_ALGORITHM = "RS512"
13
13
 
14
14
  DEFAULT_EXPIRATION_SECONDS = (5 * 50) - 10
15
15
 
16
+ jwt = PyJWT({"verify_sub": False})
16
17
 
17
18
  def create_signed_jwt(private_key_config: BdkRsaKeyConfig, username: str, expiration: int = None) -> str:
18
19
  """Creates a JWT with the provided user name and expiration date, signed with the provided private key.
@@ -57,10 +58,20 @@ def validate_jwt(jwt_token: str, certificate: str, allowed_audience: str) -> dic
57
58
  try:
58
59
  return jwt.decode(jwt_token, _parse_public_key_from_x509_cert(certificate),
59
60
  algorithms=[JWT_ENCRYPTION_ALGORITHM], audience=allowed_audience)
60
- except (jwt.DecodeError, jwt.ExpiredSignatureError) as exc:
61
+ except (DecodeError, ExpiredSignatureError) as exc:
61
62
  raise AuthInitializationError("Unable to validate the jwt") from exc
62
63
 
63
64
 
65
+ def generate_expiration_time() -> int:
66
+ """Generates integer timestamp value for jwt token
67
+ :return: timestamp value
68
+ """
69
+ return int(
70
+ datetime.datetime.now(datetime.timezone.utc).timestamp()
71
+ + DEFAULT_EXPIRATION_SECONDS
72
+ )
73
+
74
+
64
75
  def _parse_public_key_from_x509_cert(certificate: str) -> str:
65
76
  """Returns the public key in PEM format given a X509 certificate content in PEM format
66
77
 
@@ -0,0 +1,116 @@
1
+ Metadata-Version: 2.3
2
+ Name: symphony_bdk_python
3
+ Version: 2.9.1
4
+ Summary: Symphony Bot Development Kit for Python
5
+ License: Apache-2.0
6
+ Author: Symphony Platform Solutions
7
+ Author-email: symphony@finos.org
8
+ Requires-Python: >=3.9, !=2.7.*, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*, !=3.7.*, !=3.8.*
9
+ Classifier: License :: OSI Approved :: Apache Software License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Requires-Dist: PyJWT (>=2.10.0,<3.0.0)
16
+ Requires-Dist: aiohttp (>=3.10.2,<4.0.0)
17
+ Requires-Dist: cryptography (>=44.0.1,<45.0.0)
18
+ Requires-Dist: defusedxml (>=0.7.1,<0.8.0)
19
+ Requires-Dist: docutils (==0.16)
20
+ Requires-Dist: nulltype (>=2.3.1,<3.0.0)
21
+ Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
22
+ Requires-Dist: pyyaml (>=6.0,<7.0)
23
+ Requires-Dist: tenacity (>=8.0.1,<9.0.0)
24
+ Requires-Dist: urllib3 (>=1.26.19,<2.0.0)
25
+ Project-URL: Documentation, https://symphony-bdk-python.finos.org/
26
+ Project-URL: Repository, https://github.com/finos/symphony-bdk-python
27
+ Description-Content-Type: text/markdown
28
+
29
+ [![FINOS - Active](https://cdn.jsdelivr.net/gh/finos/contrib-toolbox@master/images/badge-active.svg)](https://community.finos.org/docs/governance/Software-Projects/stages/active)
30
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
31
+ [![Python](https://img.shields.io/badge/python-3.8%20%7C%203.9-blue)](https://www.python.org/downloads/release/python-3)
32
+ [![Pypi](https://img.shields.io/pypi/v/symphony-bdk-python)](https://pypi.org/project/symphony-bdk-python/)
33
+ ![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/finos/symphony-bdk-python/build/main)
34
+
35
+ # Symphony BDK for Python
36
+
37
+ This is the Symphony BDK for Python to help develop bots and interact with the [Symphony REST APIs](https://developers.symphony.com/restapi/reference).
38
+
39
+ ## Project Overview
40
+
41
+ Symphony BDK for Python provides tools for building bots and integrating with Symphony APIs. This document outlines its usage, installation, and contribution guidelines.
42
+
43
+ ## Prerequisites
44
+
45
+ - Python 3.8 or higher
46
+ - [Poetry](https://python-poetry.org/docs/#installation)
47
+
48
+ ## Installation Steps
49
+
50
+ ### Option 1: Build from Source
51
+ - Install dependencies: `poetry install`
52
+ - Build the package: `poetry build`
53
+ - Run tests: `poetry run pytest`
54
+ - Perform a pylint scan locally: `poetry run pylint <module_name>`
55
+ - Generate documentation locally: `cd docsrc && make html`
56
+
57
+ ### Verification
58
+ Verify the successful installation by running any of the following commands:
59
+ ```
60
+ poetry --version
61
+ ```
62
+
63
+ ## External Documents
64
+
65
+ Refer to the following for additional guidance:
66
+ - [Reference Documentation](https://symphony-bdk-python.finos.org/)
67
+ - [Getting Started Guide](https://symphony-bdk-python.finos.org/markdown/getting_started.html)
68
+
69
+ ## Roadmap
70
+
71
+ The next milestone is the [2.5.x](https://github.com/finos/symphony-bdk-python/milestone/6), focused on delivering improvements and bug fixes.
72
+
73
+ ## Contributing
74
+
75
+ To contribute:
76
+ 1. Fork the repository.
77
+ 2. Create a feature branch: `git checkout -b feature/fooBar`
78
+ 3. Read the [Contribution Guidelines](CONTRIBUTING.md) and [Community Code of Conduct](https://www.finos.org/code-of-conduct)
79
+ 4. Commit changes: `git commit -am 'Add some fooBar'`
80
+ 5. Push changes: `git push origin feature/fooBar`
81
+ 6. Open a Pull Request.
82
+
83
+ _NOTE:_ Ensure you have an active Individual Contributor License Agreement (ICLA) or Corporate Contribution License Agreement (CCLA) with FINOS.
84
+
85
+ For further inquiries, email [help@finos.org](mailto:help@finos.org).
86
+
87
+
88
+ ### Updating Generated Code
89
+
90
+ Python BDK uses [OpenAPITools/openapi-generator](https://github.com/OpenAPITools/openapi-generator/) to generate code.
91
+ To update the generated code, follow these steps:
92
+
93
+ 1. Checkout the latest branch of the fork (e.g., [sym-python-5.5.0](https://github.com/SymphonyPlatformSolutions/openapi-generator/tree/sym-python-5.5.0)).
94
+ 2. Update the fork source code, review, and merge it.
95
+ 3. Generate the JAR file in `openapi-generatormodules/openapi-generator-cli/target/openapi-generator-cli.jar`:
96
+ - Use Maven:
97
+ ```bash
98
+ mvn clean install -Dmaven.test.skip=true && mvn clean package -Dmaven.test.skip=true
99
+ ```
100
+ - Alternatively, use IntelliJ's build button to build the project and generate the JAR file.
101
+ 4. Copy the JAR file to the Python BDK repository: `symphony-api-client-python/api_client_generation/openapi-generator-cli.jar`.
102
+ 5. Execute the generation script:
103
+ ```bash
104
+ ./generate.sh
105
+ ```
106
+ 6. Commit and push the newly generated code along with the updated JAR file.
107
+
108
+
109
+ ## License
110
+
111
+ Copyright 2021 Symphony LLC
112
+
113
+ Distributed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).
114
+
115
+ SPDX-License-Identifier: [Apache-2.0](https://spdx.org/licenses/Apache-2.0).
116
+
@@ -16,12 +16,12 @@ symphony/bdk/core/activity/parsing/slash_command_pattern.py,sha256=YdfIPBEf6PS1h
16
16
  symphony/bdk/core/activity/registry.py,sha256=xmIj5xOKUZXmwYhQvwKBFeMoyHyovpdhEiTImzXnSaM,5231
17
17
  symphony/bdk/core/activity/user_joined_room.py,sha256=EGqzkBEIydyXPpbrRLeP7xjcP6TcFMIn2RHMm_P4avM,1203
18
18
  symphony/bdk/core/auth/__init__.py,sha256=_SFMiBBGKIdOxsdll7v1idhSznwoXVMcgWOcVNss69A,64
19
- symphony/bdk/core/auth/auth_session.py,sha256=QzH7YlepeCa7TZTLiNEscOZwzYkRxPNtBKCfAz5UdMY,5518
19
+ symphony/bdk/core/auth/auth_session.py,sha256=wxaG2tRdegxG9fuUWg-VqPbOgNjz2phVtOVn_AaHtO8,6455
20
20
  symphony/bdk/core/auth/authenticator_factory.py,sha256=-YxFLWqkw6k73DfCEg2atdVuLdRWtgNGaDXJ1aNFqnA,5367
21
- symphony/bdk/core/auth/bot_authenticator.py,sha256=kI4OeZYqgXe2q-CVN-BgKRUrS2ARodWX56eHjAU0jl4,3007
21
+ symphony/bdk/core/auth/bot_authenticator.py,sha256=XL5gdVNMhK2d0tPOImsNvffdyiOZf_3KTVMr0a0ZgIE,3961
22
22
  symphony/bdk/core/auth/exception.py,sha256=gZPaRKEz_IHX9cS2m6xa2779MxWwgp2mVxpQW_9NIZo,576
23
23
  symphony/bdk/core/auth/ext_app_authenticator.py,sha256=LT-ZArwPVgailF2io9eRrXfW5K41ynIIs04rqP8nA0A,7493
24
- symphony/bdk/core/auth/jwt_helper.py,sha256=5EPSSBr3b_Wg4khkNerrSnOIHR8OSN7v-9lYS3LbjL4,3470
24
+ symphony/bdk/core/auth/jwt_helper.py,sha256=Fsct1VPuCrqTIKrFximOkPgJfsfA52oPmpndGCaRbXE,3801
25
25
  symphony/bdk/core/auth/obo_authenticator.py,sha256=Fc-R2DSN7umY8dtjo56kPI4sULSdY3EWLKgP2qzFkX0,6183
26
26
  symphony/bdk/core/auth/tokens_repository.py,sha256=EUA9vs2yIhtJlBZxOgqwmxKshZD-yaoG1vnMjk8gdAk,1186
27
27
  symphony/bdk/core/client/__init__.py,sha256=LFwaYF5dwBZWHB1grmQCyYXwrMBrZ7MT1bzCBKtD1fg,171
@@ -531,8 +531,8 @@ symphony/bdk/gen/pod_model/v3_room_attributes.py,sha256=BF0j4_tDSHIOoFcHnjoRdIPL
531
531
  symphony/bdk/gen/pod_model/v3_room_detail.py,sha256=WwHIaF3hgkoNooc8WJwu-NUFhrpqIVx5iHBiMuAozK4,12809
532
532
  symphony/bdk/gen/pod_model/v3_room_search_results.py,sha256=xFNgxOkePANkFE8LeYk2PBrTzYWAfmezMhOVSBkQ2vM,13851
533
533
  symphony/bdk/gen/rest.py,sha256=APEYcmiEKg1g7-usLVm3NoHvhlbN_Lu4fIpW3jk8nhc,10209
534
- symphony_bdk_python-2.8.0.dist-info/LICENSE,sha256=onGBgTTRUvMlypBDH1BOc19i38qjwU8J8dQwwF7rXxk,11342
535
- symphony_bdk_python-2.8.0.dist-info/METADATA,sha256=Vhdc1nzXPnmVT-kKXUy-obADbYkh1uoOHi2Otg2itJo,5958
536
- symphony_bdk_python-2.8.0.dist-info/NOTICE,sha256=SdZKoAgL2VymrQOOOG1fQDiKb-cnlzg21UvVbhPRe2c,174
537
- symphony_bdk_python-2.8.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
538
- symphony_bdk_python-2.8.0.dist-info/RECORD,,
534
+ symphony_bdk_python-2.9.1.dist-info/LICENSE,sha256=onGBgTTRUvMlypBDH1BOc19i38qjwU8J8dQwwF7rXxk,11342
535
+ symphony_bdk_python-2.9.1.dist-info/METADATA,sha256=VvR5dk4-64CQJMFIIlQf96K7zbb1wmi8eY4y6bWD8M0,4967
536
+ symphony_bdk_python-2.9.1.dist-info/NOTICE,sha256=SdZKoAgL2VymrQOOOG1fQDiKb-cnlzg21UvVbhPRe2c,174
537
+ symphony_bdk_python-2.9.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
538
+ symphony_bdk_python-2.9.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.1
2
+ Generator: poetry-core 2.1.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,103 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: symphony_bdk_python
3
- Version: 2.8.0
4
- Summary: Symphony Bot Development Kit for Python
5
- Home-page: https://github.com/finos/symphony-bdk-python
6
- License: Apache-2.0
7
- Author: Symphony Platform Solutions
8
- Author-email: symphony@finos.org
9
- Requires-Python: >=3.8,<4.0
10
- Classifier: License :: OSI Approved :: Apache Software License
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.8
13
- Classifier: Programming Language :: Python :: 3.9
14
- Classifier: Programming Language :: Python :: 3.10
15
- Classifier: Programming Language :: Python :: 3.11
16
- Classifier: Programming Language :: Python :: 3.12
17
- Classifier: Programming Language :: Python :: 3.13
18
- Requires-Dist: PyJWT (>=2.3.0,<3.0.0)
19
- Requires-Dist: aiohttp (>=3.10.2,<4.0.0)
20
- Requires-Dist: cryptography (>=43.0.1,<44.0.0)
21
- Requires-Dist: defusedxml (>=0.7.1,<0.8.0)
22
- Requires-Dist: docutils (==0.16)
23
- Requires-Dist: nulltype (>=2.3.1,<3.0.0)
24
- Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
25
- Requires-Dist: pyyaml (>=6.0,<7.0)
26
- Requires-Dist: tenacity (>=8.0.1,<9.0.0)
27
- Requires-Dist: urllib3 (>=1.26.19,<2.0.0)
28
- Project-URL: Documentation, https://symphony-bdk-python.finos.org/
29
- Project-URL: Repository, https://github.com/finos/symphony-bdk-python
30
- Description-Content-Type: text/markdown
31
-
32
- [![FINOS - Incubating](https://cdn.jsdelivr.net/gh/finos/contrib-toolbox@master/images/badge-incubating.svg)](https://finosfoundation.atlassian.net/wiki/display/FINOS/Incubating)
33
- [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
34
- [![Python](https://img.shields.io/badge/python-3.8%20%7C%203.9-blue)](https://www.python.org/downloads/release/python-3)
35
- [![Pypi](https://img.shields.io/pypi/v/symphony-bdk-python)](https://pypi.org/project/symphony-bdk-python/)
36
- ![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/finos/symphony-bdk-python/build/main)
37
-
38
- # Symphony BDK for Python
39
-
40
- This is the Symphony BDK for Python to help develop bots and interact with the [Symphony REST APIs](https://developers.symphony.com/restapi/reference).
41
-
42
- ## Installation and getting started
43
- The [reference documentation](https://symphony-bdk-python.finos.org/) includes detailed
44
- installation instructions as well as a comprehensive
45
- [getting started](https://symphony-bdk-python.finos.org/markdown/getting_started.html)
46
- guide.
47
-
48
- ## Build from source
49
-
50
- The Symphony BDK uses and requires Python 3.8 or higher. Be sure you have it installed before going further.
51
-
52
- We use [poetry](https://python-poetry.org/) in order to manage dependencies, build, run tests and publish.
53
- To install poetry, follow instructions [here](https://python-poetry.org/docs/#installation).
54
-
55
- On the first time, run `poetry install`. Then run `poetry build` to build the sdist and wheel packages.
56
- To run the tests, use `poetry run pytest`.
57
-
58
- It is possible to run pylint scan locally (on a specific file or package) executing the following command:
59
- `poetry run pylint <module_name>`.
60
-
61
- To generate locally the Sphinx documentation, run: `cd docsrc && make html`.
62
-
63
- ## Roadmap
64
-
65
- Our next milestone is the [2.5.x](https://github.com/finos/symphony-bdk-python/milestone/6) one.
66
- It will only consist in delivering the next improvements and bug fixes of the BDK.
67
-
68
-
69
- ## Contributing
70
- In order to get in touch with the project team, please open a [GitHub Issue](https://github.com/finos/symphony-bdk-python/issues).
71
- Alternatively, you can email/subscribe to [symphony@finos.org](https://groups.google.com/a/finos.org/g/symphony).
72
-
73
- 1. Fork it
74
- 2. Create your feature branch (`git checkout -b feature/fooBar`)
75
- 3. Read our [contribution guidelines](CONTRIBUTING.md) and [Community Code of Conduct](https://www.finos.org/code-of-conduct)
76
- 4. Commit your changes (`git commit -am 'Add some fooBar'`)
77
- 5. Push to the branch (`git push origin feature/fooBar`)
78
- 6. Create a new Pull Request
79
-
80
- _NOTE:_ Commits and pull requests to FINOS repositories will only be accepted from those contributors with an active,
81
- executed Individual Contributor License Agreement (ICLA) with FINOS OR who are covered under an existing and active
82
- Corporate Contribution License Agreement (CCLA) executed with FINOS.
83
- Commits from individuals not covered under an ICLA or CCLA will be flagged and blocked by the FINOS Clabot tool.
84
- Please note that some CCLAs require individuals/employees to be explicitly named on the CCLA.
85
-
86
- *Need an ICLA? Unsure if you are covered under an existing CCLA? Email [help@finos.org](mailto:help@finos.org)*
87
-
88
- ### Update generated code
89
- While contributing to the project, you might need to update the generated code.
90
- Python BDK uses [OpenAPITools/openapi-generator](https://github.com/OpenAPITools/openapi-generator/) to generate code. In order to customise the templates, a fork has been created in [https://github.com/SymphonyPlatformSolutions/openapi-generator/tree/sym-python-5.5.0](https://github.com/SymphonyPlatformSolutions/openapi-generator/tree/sym-python-5.5.0).
91
- Here are the steps to follow:
92
- - Checkout the latest branch of the fork (currently [sym-python-5.5.0](https://github.com/SymphonyPlatformSolutions/openapi-generator/tree/sym-python-5.5.0))
93
- - Update the fork source code, review and merge it
94
- - Generate a jar file in `openapi-generatormodules/openapi-generator-cli/target/openapi-generator-cli.jar`:
95
- - Using maven: `mvn clean install -Dmaven.test.skip=true && mvn clean package -Dmaven.test.skip=true`. _You can also use IntelliJ's build button to build the project and generate the jar_
96
- - Copy the jar in Python BDK repository `symphony-api-client-python/api_client_generation/openapi-generator-cli.jar`
97
- - Execute the generation script `./generate.sh` and commit and push you new code along with the new jar file.
98
- ## License
99
- Copyright 2021 Symphony LLC
100
-
101
- Distributed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).
102
-
103
- SPDX-License-Identifier: [Apache-2.0](https://spdx.org/licenses/Apache-2.0)