Skip to content

Commit d98230e

Browse files
committed
Expose Types
1 parent 7b23bb7 commit d98230e

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,17 +157,17 @@ The generated Python models have been packaged as a proper Python package in the
157157
From the cdk directory, install the models in editable mode:
158158

159159
```bash
160-
pip install -e ../api-model/python
160+
pip install -e file://$MODEL_CODE_PATH/python
161161
```
162162

163163
This creates an editable install that automatically reflects any changes made to the models without needing to reinstall.
164164

165-
### 2. For Production/CI/CD
165+
### 2. Via GH
166166

167167
Add this to your requirements.txt:
168168

169169
```
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
171171
```
172172

173173
### Example Usage

python/api_model/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Top-level package for EqualIQ API models
2-
__version__ = '0.1.0'
2+
__version__ = '0.1.0'
3+
from .types.models import *

python/api_model/types/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
# Package for generated model types
2-
# Import common models for convenience
3-
from .models import PingResponseContent
2+
from .models import *

python/py.typed

Whitespace-only changes.

python/pyproject.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,10 @@ dependencies = [
1818
"Homepage" = "https://github.com/equaliq/api-model"
1919

2020
[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"]

0 commit comments

Comments
 (0)