You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-6Lines changed: 17 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -29,12 +29,13 @@ using it (Python developers).
29
29
30
30
## Installation
31
31
32
-
I recommend you install with [pipx](https://pipxproject.github.io/pipx/) so you don't conflict with any other packages
33
-
you might have: `pipx install openapi-python-client`.
32
+
I recommend you install with [pipx](https://pipxproject.github.io/pipx/) so you don't conflict with any other packages you might have: `pipx install openapi-python-client --include-deps`.
34
33
35
-
Better yet, use `pipx run openapi-python-client <normal params / options>` to always use the latest version of the generator.
34
+
> Note the `--include-deps` option which will also make `black`, `isort`, and `autoflake` available in your path so that `openapi-python-client` can use them to clean up the generated code.
36
35
37
-
You can install with normal pip if you want to though: `pip install openapi-python-client`
36
+
**If you use `pipx run` then the post-generation hooks will not be available unless you install them manually.**
37
+
38
+
You can also install with normal pip: `pip install openapi-python-client`
38
39
39
40
Then, if you want tab completion: `openapi-python-client --install-completion`
40
41
@@ -114,8 +115,7 @@ class_overrides:
114
115
module_name: short_name
115
116
```
116
117
117
-
The easiest way to find what needs to be overridden is probably to generate your client and go look at everything in the
118
-
models folder.
118
+
The easiest way to find what needs to be overridden is probably to generate your client and go look at everything in the models folder.
119
119
120
120
### project_name_override and package_name_override
121
121
@@ -150,5 +150,16 @@ Example:
150
150
package_version_override: 1.2.3
151
151
```
152
152
153
+
### post_hooks
154
+
155
+
In the config file, there's an easy way to tell `openapi-python-client` to run additional commands after generation. Here's an example showing the default commands that will run if you don't override them in config:
0 commit comments