File tree Expand file tree Collapse file tree 5 files changed +13
-7
lines changed Expand file tree Collapse file tree 5 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -157,17 +157,17 @@ The generated Python models have been packaged as a proper Python package in the
157
157
From the cdk directory, install the models in editable mode:
158
158
159
159
``` bash
160
- pip install -e ../api-model /python
160
+ pip install -e file:// $MODEL_CODE_PATH /python
161
161
```
162
162
163
163
This creates an editable install that automatically reflects any changes made to the models without needing to reinstall.
164
164
165
- ### 2. For Production/CI/CD
165
+ ### 2. Via GH
166
166
167
167
Add this to your requirements.txt:
168
168
169
169
```
170
- git+https://github.com/Equal-IQ/api-model.git@main#subdirectory=python&egg=api_model
170
+ git+https://$GITHUB_READ_TOKEN@ github.com/Equal-IQ/api-model.git@main#subdirectory=python&egg=api_model
171
171
```
172
172
173
173
### Example Usage
Original file line number Diff line number Diff line change 1
1
# Top-level package for EqualIQ API models
2
- __version__ = '0.1.0'
2
+ __version__ = '0.1.0'
3
+ from .types .models import *
Original file line number Diff line number Diff line change 1
1
# Package for generated model types
2
- # Import common models for convenience
3
- from .models import PingResponseContent
2
+ from .models import *
Original file line number Diff line number Diff line change @@ -18,4 +18,10 @@ dependencies = [
18
18
"Homepage" = " https://github.com/equaliq/api-model"
19
19
20
20
[tool .setuptools ]
21
- packages = [" api_model" , " api_model.types" ]
21
+ packages = [" api_model" , " api_model.types" ]
22
+
23
+ [tool .setuptools .package-data ]
24
+ api_model = [" py.typed" ]
25
+
26
+ [tool .mypy ]
27
+ plugins = [" pydantic.mypy" ]
You can’t perform that action at this time.
0 commit comments