|
| 1 | +# STACKIT Python SDK Generator |
| 2 | + |
| 3 | +## Quick Update Guide |
| 4 | + |
| 5 | +| File | Action | |
| 6 | +|------------------------------------|-----------------------------------------| |
| 7 | +| `configuration.mustache` | do nothing | |
| 8 | +| `readme.mustache` | do nothing | |
| 9 | +| `pyproject.mustache` | check dependencies, adjust if necessary | |
| 10 | +| `rest.mustache` | port changes | |
| 11 | +| `api.mustache` | port changes | |
| 12 | +| `api_client.mustache` | port changes | |
| 13 | +| `model_generic.mustache` | port changes | |
| 14 | +| `model_oneof.mustache` | port changes | |
| 15 | +| `exceptions.mustache` | port changes | |
| 16 | +| `__init__package.mustache` | port changes | |
| 17 | +| `README_onlypackage.mustache` | do nothing, unchanged | |
| 18 | +| `api_doc.mustache` | do nothing, unchanged | |
| 19 | +| `api_doc_example.mustache` | do nothing, unchanged | |
| 20 | +| `api_response.mustache` | do nothing, unchanged | |
| 21 | +| `api_test.mustache` | do nothing, unchanged | |
| 22 | +| `asyncio` | do nothing, unchanged | |
| 23 | +| `common_README.mustache` | do nothing, unchanged | |
| 24 | +| `__init__.mustache` | do nothing, unchanged | |
| 25 | +| `__init__api.mustache` | do nothing, unchanged | |
| 26 | +| `__init__model.mustache` | do nothing, unchanged | |
| 27 | +| `git_push.sh.mustache` | do nothing, unchanged | |
| 28 | +| `github-workflow.mustache` | do nothing, unchanged | |
| 29 | +| `gitignore.mustache` | do nothing, unchanged | |
| 30 | +| `gitlab-ci.mustache` | do nothing, unchanged | |
| 31 | +| `model.mustache` | do nothing, unchanged | |
| 32 | +| `model_anyof.mustache` | do nothing, unchanged | |
| 33 | +| `model_doc.mustache` | do nothing, unchanged | |
| 34 | +| `model_enum.mustache` | do nothing, unchanged | |
| 35 | +| `model_test.mustache` | do nothing, unchanged | |
| 36 | +| `partial_api.mustache` | do nothing, unchanged | |
| 37 | +| `partial_api_args.mustache` | do nothing, unchanged | |
| 38 | +| `partial_header.mustache` | do nothing, unchanged | |
| 39 | +| `py.typed.mustache` | do nothing, unchanged | |
| 40 | +| `python_doc_auth_partial.mustache` | do nothing, unchanged | |
| 41 | +| `requirements.mustache` | do nothing, unchanged | |
| 42 | +| `rest.mustache` | do nothing, unchanged | |
| 43 | +| `setup.mustache` | do nothing, unchanged | |
| 44 | +| `setup_cfg.mustache` | do nothing, unchanged | |
| 45 | +| `signing.mustache` | do nothing, unchanged | |
| 46 | +| `test-requirements.mustache` | do nothing, unchanged | |
| 47 | +| `tornado` | do nothing, unchanged | |
| 48 | +| `tox.mustache` | do nothing, unchanged | |
| 49 | +| `travis.mustache` | do nothing, unchanged | |
| 50 | +| `exports_api.mustache` | do nothing, unchanged | |
| 51 | +| `exports_model.mustache` | do nothing, unchanged | |
| 52 | +| `exports_package.mustache` | do nothing, unchanged | |
| 53 | + |
| 54 | + |
| 55 | +If upstream contains a template, not listed here, adjust the table accordingly. |
| 56 | + |
| 57 | +## Template adjustments |
| 58 | + |
| 59 | +The following templates were customized but don't need to be adjusted when updating the Python SDK generator to a newer |
| 60 | +upstream version: |
| 61 | + |
| 62 | +- `configuration.mustache`: This template was entirely overwritten to provide a custom `HostConfiguration`. The |
| 63 | + `Configuration` from `core` is used instead of generating a new one for each service. |
| 64 | +- `readme.mustache`: it's the readme |
| 65 | +- `pyproject.mustache`: heavily customized to use `uv`, just check the dependencies |
| 66 | + |
| 67 | +The following templates were customized and need to be checked for adjustments when updating the Python SDK generator to |
| 68 | +a newer upstream version: |
| 69 | + |
| 70 | +- `rest.mustache`: |
| 71 | + - uses `requests` instead of `urllib3` for making HTTP requests. This is done to use the same library as `core` does. |
| 72 | + `core` uses `requests` because of an ADR: "HTTP Client for Python Core Implementation" (internal link). |
| 73 | + - upstream also configures a `urllib3.PoolManager` for each API client. In `requests` this is done by using |
| 74 | + `requests.Session()` for doing requests. A global pool can be used by setting `custom_http_session` on `Config`. |
| 75 | +- `api.mustache`: |
| 76 | + - customized to use `core`'s `Configuration` |
| 77 | +- `api_client.mustache`: |
| 78 | + - customized to use `core`'s `Configuration` |
| 79 | + - `update_params_for_auth` and `_apply_auth_params` removed, authentication is done in `core` |
| 80 | +- `model_generic.mustache`: |
| 81 | + - contains a temporary workaround for the year 0 issue |
| 82 | +- `model_oneof.mustache`: |
| 83 | + - workaround for pattern containing leading and trailing `/` |
| 84 | + - removal of `ValueError` if multiple matches are found |
| 85 | +- `exceptions.mustache`: |
| 86 | + - use `requests` instead of `urllib3` |
| 87 | +- `__init__package.mustache`: |
| 88 | + - customized imports |
0 commit comments