openapi-python-client 0.24.2__py3-none-any.whl → 0.25.0__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.
Files changed (32) hide show
  1. openapi_python_client/parser/properties/const.py +0 -1
  2. openapi_python_client/parser/properties/enum_property.py +11 -3
  3. openapi_python_client/parser/properties/file.py +2 -2
  4. openapi_python_client/parser/properties/list_property.py +0 -3
  5. openapi_python_client/parser/properties/model_property.py +0 -3
  6. openapi_python_client/parser/properties/protocol.py +0 -4
  7. openapi_python_client/parser/properties/union.py +7 -10
  8. openapi_python_client/templates/endpoint_macros.py.jinja +10 -10
  9. openapi_python_client/templates/endpoint_module.py.jinja +2 -5
  10. openapi_python_client/templates/model.py.jinja +46 -18
  11. openapi_python_client/templates/property_templates/any_property.py.jinja +2 -6
  12. openapi_python_client/templates/property_templates/boolean_property.py.jinja +2 -6
  13. openapi_python_client/templates/property_templates/const_property.py.jinja +4 -0
  14. openapi_python_client/templates/property_templates/date_property.py.jinja +2 -10
  15. openapi_python_client/templates/property_templates/datetime_property.py.jinja +2 -10
  16. openapi_python_client/templates/property_templates/enum_property.py.jinja +3 -11
  17. openapi_python_client/templates/property_templates/file_property.py.jinja +2 -8
  18. openapi_python_client/templates/property_templates/float_property.py.jinja +2 -6
  19. openapi_python_client/templates/property_templates/int_property.py.jinja +2 -6
  20. openapi_python_client/templates/property_templates/list_property.py.jinja +8 -31
  21. openapi_python_client/templates/property_templates/literal_enum_property.py.jinja +3 -11
  22. openapi_python_client/templates/property_templates/model_property.py.jinja +7 -17
  23. openapi_python_client/templates/property_templates/union_property.py.jinja +18 -15
  24. openapi_python_client/templates/property_templates/uuid_property.py.jinja +2 -9
  25. openapi_python_client/templates/pyproject.toml.jinja +2 -2
  26. openapi_python_client/templates/setup.py.jinja +1 -1
  27. openapi_python_client/templates/types.py.jinja +13 -7
  28. {openapi_python_client-0.24.2.dist-info → openapi_python_client-0.25.0.dist-info}/METADATA +36 -3
  29. {openapi_python_client-0.24.2.dist-info → openapi_python_client-0.25.0.dist-info}/RECORD +32 -32
  30. {openapi_python_client-0.24.2.dist-info → openapi_python_client-0.25.0.dist-info}/WHEEL +0 -0
  31. {openapi_python_client-0.24.2.dist-info → openapi_python_client-0.25.0.dist-info}/entry_points.txt +0 -0
  32. {openapi_python_client-0.24.2.dist-info → openapi_python_client-0.25.0.dist-info}/licenses/LICENSE +0 -0
@@ -94,7 +94,6 @@ class ConstProperty(PropertyProtocol):
94
94
  no_optional: bool = False,
95
95
  json: bool = False,
96
96
  *,
97
- multipart: bool = False,
98
97
  quoted: bool = False,
99
98
  ) -> str:
100
99
  lit = f"Literal[{self.value.python_code}]"
@@ -121,7 +121,8 @@ class EnumProperty(PropertyProtocol):
121
121
  if parent_name:
122
122
  class_name = f"{utils.pascal_case(parent_name)}{utils.pascal_case(class_name)}"
123
123
  class_info = Class.from_string(string=class_name, config=config)
124
- values = EnumProperty.values_from_list(value_list, class_info)
124
+ var_names = data.model_extra.get("x-enum-varnames", []) if data.model_extra else []
125
+ values = EnumProperty.values_from_list(value_list, class_info, var_names)
125
126
 
126
127
  if class_info.name in schemas.classes_by_name:
127
128
  existing = schemas.classes_by_name[class_info.name]
@@ -183,14 +184,21 @@ class EnumProperty(PropertyProtocol):
183
184
  return imports
184
185
 
185
186
  @staticmethod
186
- def values_from_list(values: list[str] | list[int], class_info: Class) -> dict[str, ValueType]:
187
+ def values_from_list(
188
+ values: list[str] | list[int], class_info: Class, var_names: list[str]
189
+ ) -> dict[str, ValueType]:
187
190
  """Convert a list of values into dict of {name: value}, where value can sometimes be None"""
188
191
  output: dict[str, ValueType] = {}
192
+ use_var_names = len(var_names) == len(values)
189
193
 
190
194
  for i, value in enumerate(values):
191
195
  value = cast(Union[str, int], value)
192
196
  if isinstance(value, int):
193
- if value < 0:
197
+ if use_var_names:
198
+ key = var_names[i]
199
+ sanitized_key = utils.snake_case(key).upper()
200
+ output[sanitized_key] = value
201
+ elif value < 0:
194
202
  output[f"VALUE_NEGATIVE_{-value}"] = value
195
203
  else:
196
204
  output[f"VALUE_{value}"] = value
@@ -22,7 +22,7 @@ class FileProperty(PropertyProtocol):
22
22
 
23
23
  _type_string: ClassVar[str] = "File"
24
24
  # Return type of File.to_tuple()
25
- _json_type_string: ClassVar[str] = "FileJsonType"
25
+ _json_type_string: ClassVar[str] = "types.FileTypes"
26
26
  template: ClassVar[str] = "file_property.py.jinja"
27
27
 
28
28
  @classmethod
@@ -63,5 +63,5 @@ class FileProperty(PropertyProtocol):
63
63
  back to the root of the generated client.
64
64
  """
65
65
  imports = super().get_imports(prefix=prefix)
66
- imports.update({f"from {prefix}types import File, FileJsonType", "from io import BytesIO"})
66
+ imports.update({f"from {prefix}types import File, FileTypes", "from io import BytesIO"})
67
67
  return imports
@@ -138,7 +138,6 @@ class ListProperty(PropertyProtocol):
138
138
  no_optional: bool = False,
139
139
  json: bool = False,
140
140
  *,
141
- multipart: bool = False,
142
141
  quoted: bool = False,
143
142
  ) -> str:
144
143
  """
@@ -150,8 +149,6 @@ class ListProperty(PropertyProtocol):
150
149
  """
151
150
  if json:
152
151
  type_string = self.get_base_json_type_string()
153
- elif multipart:
154
- type_string = "tuple[None, bytes, str]"
155
152
  else:
156
153
  type_string = self.get_base_type_string()
157
154
 
@@ -189,7 +189,6 @@ class ModelProperty(PropertyProtocol):
189
189
  no_optional: bool = False,
190
190
  json: bool = False,
191
191
  *,
192
- multipart: bool = False,
193
192
  quoted: bool = False,
194
193
  ) -> str:
195
194
  """
@@ -201,8 +200,6 @@ class ModelProperty(PropertyProtocol):
201
200
  """
202
201
  if json:
203
202
  type_string = self.get_base_json_type_string()
204
- elif multipart:
205
- type_string = "tuple[None, bytes, str]"
206
203
  else:
207
204
  type_string = self.get_base_type_string()
208
205
 
@@ -101,7 +101,6 @@ class PropertyProtocol(Protocol):
101
101
  no_optional: bool = False,
102
102
  json: bool = False,
103
103
  *,
104
- multipart: bool = False,
105
104
  quoted: bool = False,
106
105
  ) -> str:
107
106
  """
@@ -110,13 +109,10 @@ class PropertyProtocol(Protocol):
110
109
  Args:
111
110
  no_optional: Do not include Optional or Unset even if the value is optional (needed for isinstance checks)
112
111
  json: True if the type refers to the property after JSON serialization
113
- multipart: True if the type should be used in a multipart request
114
112
  quoted: True if the type should be wrapped in quotes (if not a base type)
115
113
  """
116
114
  if json:
117
115
  type_string = self.get_base_json_type_string(quoted=quoted)
118
- elif multipart:
119
- type_string = "tuple[None, bytes, str]"
120
116
  else:
121
117
  type_string = self.get_base_type_string(quoted=quoted)
122
118
 
@@ -106,10 +106,9 @@ class UnionProperty(PropertyProtocol):
106
106
  return value_or_error
107
107
  return value_or_error
108
108
 
109
- def _get_inner_type_strings(self, json: bool, multipart: bool) -> set[str]:
109
+ def _get_inner_type_strings(self, json: bool) -> set[str]:
110
110
  return {
111
- p.get_type_string(no_optional=True, json=json, multipart=multipart, quoted=not p.is_base_type)
112
- for p in self.inner_properties
111
+ p.get_type_string(no_optional=True, json=json, quoted=not p.is_base_type) for p in self.inner_properties
113
112
  }
114
113
 
115
114
  @staticmethod
@@ -119,12 +118,12 @@ class UnionProperty(PropertyProtocol):
119
118
  return f"Union[{', '.join(sorted(inner_types))}]"
120
119
 
121
120
  def get_base_type_string(self, *, quoted: bool = False) -> str:
122
- return self._get_type_string_from_inner_type_strings(self._get_inner_type_strings(json=False, multipart=False))
121
+ return self._get_type_string_from_inner_type_strings(self._get_inner_type_strings(json=False))
123
122
 
124
123
  def get_base_json_type_string(self, *, quoted: bool = False) -> str:
125
- return self._get_type_string_from_inner_type_strings(self._get_inner_type_strings(json=True, multipart=False))
124
+ return self._get_type_string_from_inner_type_strings(self._get_inner_type_strings(json=True))
126
125
 
127
- def get_type_strings_in_union(self, *, no_optional: bool = False, json: bool, multipart: bool) -> set[str]:
126
+ def get_type_strings_in_union(self, *, no_optional: bool = False, json: bool) -> set[str]:
128
127
  """
129
128
  Get the set of all the types that should appear within the `Union` representing this property.
130
129
 
@@ -133,12 +132,11 @@ class UnionProperty(PropertyProtocol):
133
132
  Args:
134
133
  no_optional: Do not include `None` or `Unset` in this set.
135
134
  json: If True, this returns the JSON types, not the Python types, of this property.
136
- multipart: If True, this returns the multipart types, not the Python types, of this property.
137
135
 
138
136
  Returns:
139
137
  A set of strings containing the types that should appear within `Union`.
140
138
  """
141
- type_strings = self._get_inner_type_strings(json=json, multipart=multipart)
139
+ type_strings = self._get_inner_type_strings(json=json)
142
140
  if no_optional:
143
141
  return type_strings
144
142
  if not self.required:
@@ -150,7 +148,6 @@ class UnionProperty(PropertyProtocol):
150
148
  no_optional: bool = False,
151
149
  json: bool = False,
152
150
  *,
153
- multipart: bool = False,
154
151
  quoted: bool = False,
155
152
  ) -> str:
156
153
  """
@@ -158,7 +155,7 @@ class UnionProperty(PropertyProtocol):
158
155
  This implementation differs slightly from `Property.get_type_string` in order to collapse
159
156
  nested union types.
160
157
  """
161
- type_strings_in_union = self.get_type_strings_in_union(no_optional=no_optional, json=json, multipart=multipart)
158
+ type_strings_in_union = self.get_type_strings_in_union(no_optional=no_optional, json=json)
162
159
  return self._get_type_string_from_inner_type_strings(type_strings_in_union)
163
160
 
164
161
  def get_imports(self, *, prefix: str) -> set[str]:
@@ -58,33 +58,33 @@ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
58
58
  {% endif %}
59
59
  {% endmacro %}
60
60
 
61
- {% macro body_to_kwarg(body, destination) %}
61
+ {% macro body_to_kwarg(body) %}
62
62
  {% if body.body_type == "data" %}
63
- {{ destination }} = body.to_dict()
63
+ _kwargs["data"] = body.to_dict()
64
64
  {% elif body.body_type == "files"%}
65
- {{ multipart_body(body, destination) }}
65
+ {{ multipart_body(body) }}
66
66
  {% elif body.body_type == "json" %}
67
- {{ json_body(body, destination) }}
67
+ {{ json_body(body) }}
68
68
  {% elif body.body_type == "content" %}
69
- {{ destination }} = body.payload
69
+ _kwargs["content"] = body.payload
70
70
  {% endif %}
71
71
  {% endmacro %}
72
72
 
73
- {% macro json_body(body, destination) %}
73
+ {% macro json_body(body) %}
74
74
  {% set property = body.prop %}
75
75
  {% import "property_templates/" + property.template as prop_template %}
76
76
  {% if prop_template.transform %}
77
- {{ prop_template.transform(property, property.python_name, destination) }}
77
+ {{ prop_template.transform(property, property.python_name, "_kwargs[\"json\"]") }}
78
78
  {% else %}
79
- {{ destination }} = {{ property.python_name }}
79
+ _kwargs["json"] = {{ property.python_name }}
80
80
  {% endif %}
81
81
  {% endmacro %}
82
82
 
83
- {% macro multipart_body(body, destination) %}
83
+ {% macro multipart_body(body) %}
84
84
  {% set property = body.prop %}
85
85
  {% import "property_templates/" + property.template as prop_template %}
86
86
  {% if prop_template.transform_multipart_body %}
87
- {{ prop_template.transform_multipart_body(property, property.python_name, destination) }}
87
+ {{ prop_template.transform_multipart_body(property) }}
88
88
  {% endif %}
89
89
  {% endmacro %}
90
90
 
@@ -48,15 +48,12 @@ def _get_kwargs(
48
48
  {% if endpoint.bodies | length > 1 %}
49
49
  {% for body in endpoint.bodies %}
50
50
  if isinstance(body, {{body.prop.get_type_string() }}):
51
- {% set destination = "_" + body.body_type + "_body" %}
52
- {{ body_to_kwarg(body, destination) | indent(8) }}
53
- _kwargs["{{ body.body_type.value }}"] = {{ destination }}
51
+ {{ body_to_kwarg(body) | indent(8) }}
54
52
  headers["Content-Type"] = "{{ body.content_type }}"
55
53
  {% endfor %}
56
54
  {% elif endpoint.bodies | length == 1 %}
57
55
  {% set body = endpoint.bodies[0] %}
58
- {{ body_to_kwarg(body, "_body") | indent(4) }}
59
- _kwargs["{{ body.body_type.value }}"] = _body
56
+ {{ body_to_kwarg(body) | indent(4) }}
60
57
  {% if body.content_type != "multipart/form-data" %}{# Need httpx to set the boundary automatically #}
61
58
  headers["Content-Type"] = "{{ body.content_type }}"
62
59
  {% endif %}
@@ -1,10 +1,11 @@
1
1
  from collections.abc import Mapping
2
- from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING
2
+ from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
3
3
 
4
4
  from attrs import define as _attrs_define
5
5
  from attrs import field as _attrs_field
6
6
  {% if model.is_multipart_body %}
7
7
  import json
8
+ from .. import types
8
9
  {% endif %}
9
10
 
10
11
  from ..types import UNSET, Unset
@@ -82,32 +83,45 @@ class {{ class_name }}:
82
83
  additional_properties: dict[str, {{ additional_property_type }}] = _attrs_field(init=False, factory=dict)
83
84
  {% endif %}
84
85
 
85
- {% macro _to_dict(multipart=False) %}
86
- {% for property in model.required_properties + model.optional_properties %}
86
+ {% macro _transform_property(property, content) %}
87
87
  {% import "property_templates/" + property.template as prop_template %}
88
- {% if multipart %}
89
- {{ prop_template.transform_multipart(property, "self." + property.python_name, property.python_name) }}
90
- {% elif prop_template.transform %}
91
- {{ prop_template.transform(property=property, source="self." + property.python_name, destination=property.python_name) }}
88
+ {%- if prop_template.transform -%}
89
+ {{ prop_template.transform(property=property, source=content, destination=property.python_name) }}
90
+ {%- else -%}
91
+ {{ property.python_name }} = {{ content }}
92
+ {%- endif -%}
93
+ {% endmacro %}
94
+
95
+ {% macro multipart(property, source, destination) %}
96
+ {% import "property_templates/" + property.template as prop_template %}
97
+ {% if not property.required %}
98
+ if not isinstance({{source}}, Unset):
99
+ {{ prop_template.multipart(property, source, destination) | indent(4) }}
92
100
  {% else %}
93
- {{ property.python_name }} = self.{{ property.python_name }}
101
+ {{ prop_template.multipart(property, source, destination) }}
94
102
  {% endif %}
103
+ {% endmacro %}
95
104
 
96
- {% endfor %}
97
-
105
+ {% macro _prepare_field_dict() %}
98
106
  field_dict: dict[str, Any] = {}
99
107
  {% if model.additional_properties %}
100
108
  {% import "property_templates/" + model.additional_properties.template as prop_template %}
101
- {% if multipart %}
102
- for prop_name, prop in self.additional_properties.items():
103
- {{ prop_template.transform_multipart(model.additional_properties, "prop", "field_dict[prop_name]") | indent(4) }}
104
- {% elif prop_template.transform %}
109
+ {% if prop_template.transform %}
105
110
  for prop_name, prop in self.additional_properties.items():
106
111
  {{ prop_template.transform(model.additional_properties, "prop", "field_dict[prop_name]", declare_type=false) | indent(4) }}
107
112
  {% else %}
108
113
  field_dict.update(self.additional_properties)
109
- {% endif %}
110
- {% endif %}
114
+ {%- endif -%}
115
+ {%- endif -%}
116
+ {% endmacro %}
117
+
118
+ {% macro _to_dict() %}
119
+ {% for property in model.required_properties + model.optional_properties -%}
120
+ {{ _transform_property(property, "self." + property.python_name) }}
121
+
122
+ {% endfor %}
123
+
124
+ {{ _prepare_field_dict() }}
111
125
  {% if model.required_properties | length > 0 or model.optional_properties | length > 0 %}
112
126
  field_dict.update({
113
127
  {% for property in model.required_properties + model.optional_properties %}
@@ -134,8 +148,22 @@ return field_dict
134
148
  {{ _to_dict() | indent(8) }}
135
149
 
136
150
  {% if model.is_multipart_body %}
137
- def to_multipart(self) -> dict[str, Any]:
138
- {{ _to_dict(multipart=True) | indent(8) }}
151
+ def to_multipart(self) -> types.RequestFiles:
152
+ files: types.RequestFiles = []
153
+
154
+ {% for property in model.required_properties + model.optional_properties %}
155
+ {% set destination = "\"" + property.name + "\"" %}
156
+ {{ multipart(property, "self." + property.python_name, destination) | indent(8) }}
157
+
158
+ {% endfor %}
159
+
160
+ {% if model.additional_properties %}
161
+ for prop_name, prop in self.additional_properties.items():
162
+ {{ multipart(model.additional_properties, "prop", "prop_name") | indent(4) }}
163
+ {% endif %}
164
+
165
+ return files
166
+
139
167
  {% endif %}
140
168
 
141
169
  @classmethod
@@ -1,7 +1,3 @@
1
- {% macro transform_multipart(property, source, destination) %}
2
- {% if not property.required %}
3
- {{ destination }} = {{source}} if isinstance({{source}}, Unset) else (None, str({{source}}).encode(), "text/plain")
4
- {% else %}
5
- {{ destination }} = (None, str({{ source }}).encode(), "text/plain")
6
- {% endif %}
1
+ {% macro multipart(property, source, name) %}
2
+ files.append(({{ name }}, (None, str({{source}}).encode(), "text/plain")))
7
3
  {% endmacro %}
@@ -2,10 +2,6 @@
2
2
  "true" if {{ source }} else "false"
3
3
  {% endmacro %}
4
4
 
5
- {% macro transform_multipart(property, source, destination) %}
6
- {% if not property.required %}
7
- {{ destination }} = {{source}} if isinstance({{source}}, Unset) else (None, str({{source}}).encode(), "text/plain")
8
- {% else %}
9
- {{ destination }} = (None, str({{ source }}).encode(), "text/plain")
10
- {% endif %}
5
+ {% macro multipart(property, source, name) %}
6
+ files.append(({{ name }}, (None, str({{source}}).encode(), "text/plain")))
11
7
  {% endmacro %}
@@ -3,3 +3,7 @@
3
3
  if {{ property.python_name }} != {{ property.value.python_code }}{% if not property.required %}and not isinstance({{ property.python_name }}, Unset){% endif %}:
4
4
  raise ValueError(f"{{ property.name }} must match const {{ property.value.python_code }}, got '{{'{' + property.python_name + '}' }}'")
5
5
  {%- endmacro %}
6
+
7
+ {% macro multipart(property, source, name) %}
8
+ files.append(({{ name }}, (None, {{ source }}, "text/plain")))
9
+ {% endmacro %}
@@ -26,14 +26,6 @@ if not isinstance({{ source }}, Unset):
26
26
  {%- endif %}
27
27
  {% endmacro %}
28
28
 
29
- {% macro transform_multipart(property, source, destination) %}
30
- {% set transformed = source + ".isoformat().encode()" %}
31
- {% if property.required %}
32
- {{ destination }} = {{ transformed }}
33
- {%- else %}
34
- {% set type_annotation = property.get_type_string(json=True) | replace("str", "bytes") %}
35
- {{ destination }}: {{ type_annotation }} = UNSET
36
- if not isinstance({{ source }}, Unset):
37
- {{ destination }} = {{ transformed }}
38
- {%- endif %}
29
+ {% macro multipart(property, source, name) %}
30
+ files.append(({{ name }}, (None, {{ source }}.isoformat().encode(), "text/plain")))
39
31
  {% endmacro %}
@@ -26,14 +26,6 @@ if not isinstance({{ source }}, Unset):
26
26
  {%- endif %}
27
27
  {% endmacro %}
28
28
 
29
- {% macro transform_multipart(property, source, destination) %}
30
- {% set transformed = source + ".isoformat().encode()" %}
31
- {% if property.required %}
32
- {{ destination }} = {{ transformed }}
33
- {%- else %}
34
- {% set type_annotation = property.get_type_string(json=True) | replace("str", "bytes") %}
35
- {{ destination }}: {{ type_annotation }} = UNSET
36
- if not isinstance({{ source }}, Unset):
37
- {{ destination }} = {{ transformed }}
38
- {%- endif %}
29
+ {% macro multipart(property, source, name) %}
30
+ files.append(({{ name }}, (None, {{ source }}.isoformat().encode(), "text/plain")))
39
31
  {% endmacro %}
@@ -10,7 +10,7 @@
10
10
 
11
11
  {% macro check_type_for_construct(property, source) %}isinstance({{ source }}, {{ property.value_type.__name__ }}){% endmacro %}
12
12
 
13
- {% macro transform(property, source, destination, declare_type=True, multipart=False) %}
13
+ {% macro transform(property, source, destination, declare_type=True) %}
14
14
  {% set transformed = source + ".value" %}
15
15
  {% set type_string = property.get_type_string(json=True) %}
16
16
  {% if property.required %}
@@ -22,16 +22,8 @@ if not isinstance({{ source }}, Unset):
22
22
  {% endif %}
23
23
  {% endmacro %}
24
24
 
25
- {% macro transform_multipart(property, source, destination) %}
26
- {% set transformed = "(None, str(" + source + ".value" + ").encode(), \"text/plain\")" %}
27
- {% set type_string = "Union[Unset, tuple[None, bytes, str]]" %}
28
- {% if property.required %}
29
- {{ destination }} = {{ transformed }}
30
- {%- else %}
31
- {{ destination }}: {{ type_string }} = UNSET
32
- if not isinstance({{ source }}, Unset):
33
- {{ destination }} = {{ transformed }}
34
- {% endif %}
25
+ {% macro multipart(property, source, name) %}
26
+ files.append(({{ name }}, (None, str({{ source }}.value).encode(), "text/plain")))
35
27
  {% endmacro %}
36
28
 
37
29
  {% macro transform_header(source) %}
@@ -22,12 +22,6 @@ if not isinstance({{ source }}, Unset):
22
22
  {% endif %}
23
23
  {% endmacro %}
24
24
 
25
- {% macro transform_multipart(property, source, destination) %}
26
- {% if property.required %}
27
- {{ destination }} = {{ source }}.to_tuple()
28
- {% else %}
29
- {{ destination }}: {{ property.get_type_string(json=True) }} = UNSET
30
- if not isinstance({{ source }}, Unset):
31
- {{ destination }} = {{ source }}.to_tuple()
32
- {% endif %}
25
+ {% macro multipart(property, source, name) %}
26
+ files.append(({{ name }}, {{ source }}.to_tuple()))
33
27
  {% endmacro %}
@@ -2,10 +2,6 @@
2
2
  str({{ source }})
3
3
  {% endmacro %}
4
4
 
5
- {% macro transform_multipart(property, source, destination) %}
6
- {% if not property.required %}
7
- {{ destination }} = {{source}} if isinstance({{source}}, Unset) else (None, str({{source}}).encode(), "text/plain")
8
- {% else %}
9
- {{ destination }} = (None, str({{ source }}).encode(), "text/plain")
10
- {% endif %}
5
+ {% macro multipart(property, source, name) %}
6
+ files.append(({{ name }}, (None, str({{source}}).encode(), "text/plain")))
11
7
  {% endmacro %}
@@ -2,10 +2,6 @@
2
2
  str({{ source }})
3
3
  {% endmacro %}
4
4
 
5
- {% macro transform_multipart(property, source, destination) %}
6
- {% if not property.required %}
7
- {{ destination }} = {{source}} if isinstance({{source}}, Unset) else (None, str({{source}}).encode(), "text/plain")
8
- {% else %}
9
- {{ destination }} = (None, str({{ source }}).encode(), "text/plain")
10
- {% endif %}
5
+ {% macro multipart(property, source, name) %}
6
+ files.append(({{ name }}, (None, str({{source}}).encode(), "text/plain")))
11
7
  {% endmacro %}
@@ -17,12 +17,8 @@ for {{ inner_source }} in (_{{ property.python_name }} or []):
17
17
  {% endif %}
18
18
  {% endmacro %}
19
19
 
20
- {% macro _transform(property, source, destination, multipart, transform_method) %}
20
+ {% macro _transform(property, source, destination, transform_method) %}
21
21
  {% set inner_property = property.inner_property %}
22
- {% if multipart %}
23
- {% set multipart_destination = destination %}
24
- {% set destination = "_temp_" + destination %}
25
- {% endif %}
26
22
  {% import "property_templates/" + inner_property.template as inner_template %}
27
23
  {% if inner_template.transform %}
28
24
  {% set inner_source = inner_property.python_name + "_data" %}
@@ -33,9 +29,6 @@ for {{ inner_source }} in {{ source }}:
33
29
  {% else %}
34
30
  {{ destination }} = {{ source }}
35
31
  {% endif %}
36
- {% if multipart %}
37
- {{ multipart_destination }} = (None, json.dumps({{ destination }}).encode(), 'application/json')
38
- {% endif %}
39
32
  {% endmacro %}
40
33
 
41
34
  {% macro check_type_for_construct(property, source) %}isinstance({{ source }}, list){% endmacro %}
@@ -44,34 +37,18 @@ for {{ inner_source }} in {{ source }}:
44
37
  {% set inner_property = property.inner_property %}
45
38
  {% set type_string = property.get_type_string(json=True) %}
46
39
  {% if property.required %}
47
- {{ _transform(property, source, destination, False, "to_dict") }}
40
+ {{ _transform(property, source, destination, "to_dict") }}
48
41
  {% else %}
49
42
  {{ destination }}{% if declare_type %}: {{ type_string }}{% endif %} = UNSET
50
43
  if not isinstance({{ source }}, Unset):
51
- {{ _transform(property, source, destination, False, "to_dict") | indent(4)}}
52
- {% endif %}
53
- {% endmacro %}
54
-
55
- {% macro transform_multipart(property, source, destination) %}
56
- {% set inner_property = property.inner_property %}
57
- {% set type_string = "Union[Unset, tuple[None, bytes, str]]" %}
58
- {% if property.required %}
59
- {{ _transform(property, source, destination, True, "to_dict") }}
60
- {% else %}
61
- {{ destination }}: {{ type_string }} = UNSET
62
- if not isinstance({{ source }}, Unset):
63
- {{ _transform(property, source, destination, True, "to_dict") | indent(4)}}
44
+ {{ _transform(property, source, destination, "to_dict") | indent(4)}}
64
45
  {% endif %}
65
46
  {% endmacro %}
66
47
 
67
- {% macro transform_multipart_body(property, source, destination) %}
48
+ {% macro multipart(property, source, destination) %}
68
49
  {% set inner_property = property.inner_property %}
69
- {% set type_string = property.get_type_string(json=True) %}
70
- {% if property.required %}
71
- {{ _transform(property, source, destination, False, "to_multipart") }}
72
- {% else %}
73
- {{ destination }}: {{ type_string }} = UNSET
74
- if not isinstance({{ source }}, Unset):
75
- {{ _transform(property, source, destination, False, "to_multipart") | indent(4)}}
76
- {% endif %}
50
+ {% import "property_templates/" + inner_property.template as inner_template %}
51
+ {% set inner_source = inner_property.python_name + "_element" %}
52
+ for {{ inner_source }} in {{ source }}:
53
+ {{ inner_template.multipart(inner_property, inner_source, destination) | indent(4) }}
77
54
  {% endmacro %}
@@ -10,7 +10,7 @@ check_{{ property.get_class_name_snake_case() }}({{ source }})
10
10
 
11
11
  {% macro check_type_for_construct(property, source) %}isinstance({{ source }}, {{ property.get_instance_type_string() }}){% endmacro %}
12
12
 
13
- {% macro transform(property, source, destination, declare_type=True, multipart=False) %}
13
+ {% macro transform(property, source, destination, declare_type=True) %}
14
14
  {% set type_string = property.get_type_string(json=True) %}
15
15
  {% if property.required %}
16
16
  {{ destination }}{% if declare_type %}: {{ type_string }}{% endif %} = {{ source }}
@@ -21,16 +21,8 @@ if not isinstance({{ source }}, Unset):
21
21
  {% endif %}
22
22
  {% endmacro %}
23
23
 
24
- {% macro transform_multipart(property, source, destination) %}
25
- {% set transformed = "(None, str(" + source + ").encode(), \"text/plain\")" %}
26
- {% set type_string = "Union[Unset, tuple[None, bytes, str]]" %}
27
- {% if property.required %}
28
- {{ destination }} = {{ transformed }}
29
- {%- else %}
30
- {{ destination }}: {{ type_string }} = UNSET
31
- if not isinstance({{ source }}, Unset):
32
- {{ destination }} = {{ transformed }}
33
- {% endif %}
24
+ {% macro multipart(property, source, name) %}
25
+ files.append(({{ name }}, (None, str({{ source }}).encode(), "text/plain")))
34
26
  {% endmacro %}
35
27
 
36
28
  {% macro transform_header(source) %}
@@ -22,26 +22,16 @@ if not isinstance({{ source }}, Unset):
22
22
  {%- endif %}
23
23
  {% endmacro %}
24
24
 
25
- {% macro transform_multipart_body(property, source, destination) %}
26
- {% set transformed = source + ".to_multipart()" %}
27
- {% set type_string = property.get_type_string(multipart=True) %}
25
+ {% macro transform_multipart_body(property) %}
26
+ {% set transformed = property.python_name + ".to_multipart()" %}
28
27
  {% if property.required %}
29
- {{ destination }} = {{ transformed }}
28
+ _kwargs["files"] = {{ transformed }}
30
29
  {%- else %}
31
- {{ destination }}: {{ type_string }} = UNSET
32
- if not isinstance({{ source }}, Unset):
33
- {{ destination }} = {{ transformed }}
30
+ if not isinstance({{ property.python_name }}, Unset):
31
+ _kwargs["files"] = {{ transformed }}
34
32
  {%- endif %}
35
33
  {% endmacro %}
36
34
 
37
- {% macro transform_multipart(property, source, destination) %}
38
- {% set transformed = "(None, json.dumps(" + source + ".to_dict()" + ").encode(), 'application/json')" %}
39
- {% set type_string = property.get_type_string(multipart=True) %}
40
- {% if property.required %}
41
- {{ destination }} = {{ transformed }}
42
- {%- else %}
43
- {{ destination }}: {{ type_string }} = UNSET
44
- if not isinstance({{ source }}, Unset):
45
- {{ destination }} = {{ transformed }}
46
- {%- endif %}
35
+ {% macro multipart(property, source, name) %}
36
+ files.append(({{ name }}, (None, json.dumps( {{source}}.to_dict()).encode(), "application/json")))
47
37
  {% endmacro %}
@@ -1,10 +1,10 @@
1
1
  {% macro construct(property, source) %}
2
2
  def _parse_{{ property.python_name }}(data: object) -> {{ property.get_type_string() }}:
3
- {% if "None" in property.get_type_strings_in_union(json=True, multipart=False) %}
3
+ {% if "None" in property.get_type_strings_in_union(json=True) %}
4
4
  if data is None:
5
5
  return data
6
6
  {% endif %}
7
- {% if "Unset" in property.get_type_strings_in_union(json=True, multipart=False) %}
7
+ {% if "Unset" in property.get_type_strings_in_union(json=True) %}
8
8
  if isinstance(data, Unset):
9
9
  return data
10
10
  {% endif %}
@@ -41,7 +41,7 @@ def _parse_{{ property.python_name }}(data: object) -> {{ property.get_type_stri
41
41
 
42
42
  {% macro transform(property, source, destination, declare_type=True) %}
43
43
  {% set ns = namespace(contains_properties_without_transform = false, contains_modified_properties = not property.required, has_if = false) %}
44
- {% if declare_type %}{{ destination }}: {{ property.get_type_string(json=True, multipart=False) }}{% endif %}
44
+ {% if declare_type %}{{ destination }}: {{ property.get_type_string(json=True) }}{% endif %}
45
45
 
46
46
  {% if not property.required %}
47
47
  if isinstance({{ source }}, Unset):
@@ -75,25 +75,28 @@ else:
75
75
  {% endmacro %}
76
76
 
77
77
 
78
- {% macro transform_multipart(property, source, destination) %}
79
- {% set ns = namespace(has_if = false) %}
80
- {{ destination }}: {{ property.get_type_string(json=False, multipart=True) }}
81
-
82
- {% if not property.required %}
83
- if isinstance({{ source }}, Unset):
84
- {{ destination }} = UNSET
85
- {% set ns.has_if = true %}
78
+ {% macro instance_check(inner_property, source) %}
79
+ {% if inner_property.get_instance_type_string() == "None" %}
80
+ if {{ source }} is None:
81
+ {% else %}
82
+ if isinstance({{ source }}, {{ inner_property.get_instance_type_string() }}):
86
83
  {% endif %}
84
+ {% endmacro %}
85
+
86
+ {% macro multipart(property, source, destination) %}
87
+ {% set ns = namespace(has_if = false) %}
87
88
  {% for inner_property in property.inner_properties %}
88
89
  {% if not ns.has_if %}
89
- if isinstance({{ source }}, {{ inner_property.get_instance_type_string() }}):
90
+ {{ instance_check(inner_property, source) }}
90
91
  {% set ns.has_if = true %}
91
92
  {% elif not loop.last %}
92
- elif isinstance({{ source }}, {{ inner_property.get_instance_type_string() }}):
93
+
94
+ el{{ instance_check(inner_property, source) }}
93
95
  {% else %}
96
+
94
97
  else:
95
98
  {% endif %}
96
99
  {% import "property_templates/" + inner_property.template as inner_template %}
97
- {{ inner_template.transform_multipart(inner_property, source, destination) | indent(4) | trim }}
98
- {% endfor %}
100
+ {{ inner_template.multipart(inner_property, source, destination) | indent(4) | trim }}
101
+ {%- endfor -%}
99
102
  {% endmacro %}
@@ -26,13 +26,6 @@ if not isinstance({{ source }}, Unset):
26
26
  {%- endif %}
27
27
  {% endmacro %}
28
28
 
29
- {% macro transform_multipart(property, source, destination) %}
30
- {% if property.required %}
31
- {{ destination }} = str({{ source }})
32
- {%- else %}
33
- {% set type_annotation = property.get_type_string(json=True) | replace("str", "bytes") %}
34
- {{ destination }}: {{ type_annotation }} = UNSET
35
- if not isinstance({{ source }}, Unset):
36
- {{ destination }} = str({{ source }})
37
- {%- endif %}
29
+ {% macro multipart(property, source, name) %}
30
+ files.append(({{ name }}, (None, str({{ source }}), "text/plain"))
38
31
  {% endmacro %}
@@ -19,7 +19,7 @@ include = ["CHANGELOG.md", "{{ package_name }}/py.typed"]
19
19
 
20
20
  {% if pdm %}
21
21
  dependencies = [
22
- "httpx>=0.20.0,<0.29.0",
22
+ "httpx>=0.23.0,<0.29.0",
23
23
  "attrs>=22.2.0",
24
24
  "python-dateutil>=2.8.0",
25
25
  ]
@@ -31,7 +31,7 @@ distribution = true
31
31
 
32
32
  [tool.poetry.dependencies]
33
33
  python = "^3.9"
34
- httpx = ">=0.20.0,<0.29.0"
34
+ httpx = ">=0.23.0,<0.29.0"
35
35
  attrs = ">=22.2.0"
36
36
  python-dateutil = "^2.8.0"
37
37
  {% endif %}
@@ -13,6 +13,6 @@ setup(
13
13
  long_description_content_type="text/markdown",
14
14
  packages=find_packages(),
15
15
  python_requires=">=3.9, <4",
16
- install_requires=["httpx >= 0.20.0, < 0.29.0", "attrs >= 22.2.0", "python-dateutil >= 2.8.0, < 3"],
16
+ install_requires=["httpx >= 0.23.0, < 0.29.0", "attrs >= 22.2.0", "python-dateutil >= 2.8.0, < 3"],
17
17
  package_data={"{{ package_name }}": ["py.typed"]},
18
18
  )
@@ -1,8 +1,8 @@
1
1
  """ Contains some shared types for properties """
2
2
 
3
- from collections.abc import MutableMapping
3
+ from collections.abc import Mapping, MutableMapping
4
4
  from http import HTTPStatus
5
- from typing import BinaryIO, Generic, Optional, TypeVar, Literal
5
+ from typing import BinaryIO, Generic, Optional, TypeVar, Literal, Union, IO
6
6
 
7
7
  from attrs import define
8
8
 
@@ -14,9 +14,15 @@ class Unset:
14
14
 
15
15
  UNSET: Unset = Unset()
16
16
 
17
- {# Used as `FileProperty._json_type_string` #}
18
- FileJsonType = tuple[Optional[str], BinaryIO, Optional[str]]
19
-
17
+ # The types that `httpx.Client(files=)` can accept, copied from that library.
18
+ FileContent = Union[IO[bytes], bytes, str]
19
+ FileTypes = Union[
20
+ # (filename, file (or bytes), content_type)
21
+ tuple[Optional[str], FileContent, Optional[str]],
22
+ # (filename, file (or bytes), content_type, headers)
23
+ tuple[Optional[str], FileContent, Optional[str], Mapping[str, str]],
24
+ ]
25
+ RequestFiles = list[tuple[str, FileTypes]]
20
26
 
21
27
  @define
22
28
  class File:
@@ -26,7 +32,7 @@ class File:
26
32
  file_name: Optional[str] = None
27
33
  mime_type: Optional[str] = None
28
34
 
29
- def to_tuple(self) -> FileJsonType:
35
+ def to_tuple(self) -> FileTypes:
30
36
  """ Return a tuple representation that httpx will accept for multipart/form-data """
31
37
  return self.file_name, self.payload, self.mime_type
32
38
 
@@ -44,4 +50,4 @@ class Response(Generic[T]):
44
50
  parsed: Optional[T]
45
51
 
46
52
 
47
- __all__ = ["UNSET", "File", "FileJsonType", "Response", "Unset"]
53
+ __all__ = ["UNSET", "File", "FileTypes", "RequestFiles", "Response", "Unset"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openapi-python-client
3
- Version: 0.24.2
3
+ Version: 0.25.0
4
4
  Summary: Generate modern Python clients from OpenAPI
5
5
  Project-URL: repository, https://github.com/openapi-generators/openapi-python-client
6
6
  Author-email: Dylan Anthony <contact@dylananthony.com>
@@ -21,14 +21,14 @@ Classifier: Typing :: Typed
21
21
  Requires-Python: <4.0,>=3.9
22
22
  Requires-Dist: attrs>=22.2.0
23
23
  Requires-Dist: colorama>=0.4.3; sys_platform == 'win32'
24
- Requires-Dist: httpx<0.29.0,>=0.20.0
24
+ Requires-Dist: httpx<0.29.0,>=0.23.0
25
25
  Requires-Dist: jinja2<4.0.0,>=3.0.0
26
26
  Requires-Dist: pydantic<3.0.0,>=2.10
27
27
  Requires-Dist: python-dateutil<3.0.0,>=2.8.1
28
28
  Requires-Dist: ruamel-yaml<0.19.0,>=0.18.6
29
29
  Requires-Dist: ruff<0.12,>=0.2
30
30
  Requires-Dist: shellingham<2.0.0,>=1.3.2
31
- Requires-Dist: typer<0.16,>0.6
31
+ Requires-Dist: typer<0.17,>0.6
32
32
  Requires-Dist: typing-extensions<5.0.0,>=4.8.0
33
33
  Description-Content-Type: text/markdown
34
34
 
@@ -226,6 +226,39 @@ content_type_overrides:
226
226
  application/zip: application/octet-stream
227
227
  ```
228
228
 
229
+ ## Supported Extensions
230
+
231
+ ### x-enum-varnames
232
+
233
+ This extension has been adopted by similar projects such as [OpenAPI Tools](https://github.com/OpenAPITools/openapi-generator/pull/917).
234
+ It is intended to provide user-friendly names for integer Enum members that get generated.
235
+ It is critical that the length of the array matches that of the enum values.
236
+
237
+ ```
238
+ "Colors": {
239
+ "type": "integer",
240
+ "format": "int32",
241
+ "enum": [
242
+ 0,
243
+ 1,
244
+ 2
245
+ ],
246
+ "x-enum-varnames": [
247
+ "Red",
248
+ "Green",
249
+ "Blue"
250
+ ]
251
+ }
252
+ ```
253
+
254
+ Results in:
255
+ ```
256
+ class Color(IntEnum):
257
+ RED = 0
258
+ GREEN = 1
259
+ BLUE = 2
260
+ ```
261
+
229
262
  [changelog.md]: CHANGELOG.md
230
263
  [poetry]: https://python-poetry.org/
231
264
  [PDM]: https://pdm-project.org/latest/
@@ -12,23 +12,23 @@ openapi_python_client/parser/responses.py,sha256=AqKP2dEE9CyvY7I0OMEPfHXQm0DeiZg
12
12
  openapi_python_client/parser/properties/__init__.py,sha256=DL6miAjN2XhEvi7DkAaZrTD4p7ej_waD8AaIySjhRBM,16376
13
13
  openapi_python_client/parser/properties/any.py,sha256=ZkBan9M4uvgRy0JHnzBFLGzLzIDsnjyaHPVVrS2Nvck,1322
14
14
  openapi_python_client/parser/properties/boolean.py,sha256=xdkZyiUvdhKmEmGmaT88biPGoocsgbjxbqzv_2mlkv8,2042
15
- openapi_python_client/parser/properties/const.py,sha256=KwZ8t4lAzoUTXtmYNpqIBeyJm4XMedfIfV0xafczpTw,3804
15
+ openapi_python_client/parser/properties/const.py,sha256=dEw07zPA6xcizt6N0ElXm4_taZ4AEAt8OJ3BXTdCkyQ,3771
16
16
  openapi_python_client/parser/properties/date.py,sha256=1OzUNLJef3V6uWswM_Z_H3TjULDaN9xGWFNSk2ZCnLk,2354
17
17
  openapi_python_client/parser/properties/datetime.py,sha256=J9BWgoZE1jK0Td625SrBUdThch6vgKAR-Iox2aUQBcE,2382
18
- openapi_python_client/parser/properties/enum_property.py,sha256=V2CNV7KBQldHSz8Z0YRkIRcWgHoy-VYKysuikrqc2JI,8434
19
- openapi_python_client/parser/properties/file.py,sha256=tMEeg2-WFWBi5HVfusl7HvNaI6_DWA6Qx_8imVZ3jFM,2000
18
+ openapi_python_client/parser/properties/enum_property.py,sha256=60LuqJRELlpUVJ4A3kRJlncoVVCIVae-A-lnbn91xnQ,8818
19
+ openapi_python_client/parser/properties/file.py,sha256=1lw6pzo92sgNL_7_ezLVd1DYoGMGGqurgKhHNDhfikk,2000
20
20
  openapi_python_client/parser/properties/float.py,sha256=Ent7smCPFPBZAmxVykD2NgHXv6uCZxabAsenYB_AuSA,2201
21
21
  openapi_python_client/parser/properties/int.py,sha256=O455r8xjI4e6KHjhoblHHNHZYi6tWu-c2KBTCguKmbM,2200
22
- openapi_python_client/parser/properties/list_property.py,sha256=wYtJliY3nHDNy3F9f1Bz3cRGBu_LQ8tDffCy4DwcI6s,5864
22
+ openapi_python_client/parser/properties/list_property.py,sha256=kH1fleXWLhgXky_EO13vhwMZgTWxLWbTol1tTUQmv7c,5755
23
23
  openapi_python_client/parser/properties/literal_enum_property.py,sha256=eVF9oMUUeXGNcqJOQ7H3s3ol7tXTTYdt_xG44B_fWwY,7514
24
24
  openapi_python_client/parser/properties/merge_properties.py,sha256=2xu9dMs7Zohg84iu-MND1X3jX-M2QzMfjABPDcWOsO0,9655
25
- openapi_python_client/parser/properties/model_property.py,sha256=LBabMcxniV5J6qsut6_4uW623QAzpt6dqoH1LrLodvQ,16991
25
+ openapi_python_client/parser/properties/model_property.py,sha256=6vrkmZkhsIJ5XTtdd1WKB-o-S0HhSr6_yRqPPo9nfWs,16882
26
26
  openapi_python_client/parser/properties/none.py,sha256=BPx6lDyEicMyiWnxcVIuKPZrm0zsoGGUDbrEXJdDizA,1754
27
27
  openapi_python_client/parser/properties/property.py,sha256=O4j0s0Wxawrd7pPxJScCZqSqs9iOOxXBBojhD63e-8c,998
28
- openapi_python_client/parser/properties/protocol.py,sha256=x-vCbhnuduTOVqFplhvRg4Ru72piZlANIZCa9NwQ85E,7354
28
+ openapi_python_client/parser/properties/protocol.py,sha256=nCUNPnX6R4mWiLXd1VdCiGysu4X7inFSuUUg3o4SBfc,7167
29
29
  openapi_python_client/parser/properties/schemas.py,sha256=EZXwb4_xt8DEhV7wTi-Pd8W8cJHyBPQBDraXyfmgK1k,8605
30
30
  openapi_python_client/parser/properties/string.py,sha256=G4Apny6OXkjVQd-SUjBUe5i2pBL7VaVxE2aGDTXGmpM,1895
31
- openapi_python_client/parser/properties/union.py,sha256=SjvnzPsA1jvKWw1JZEPUSNysdsZbzy8WaqcTmi-h7dk,8086
31
+ openapi_python_client/parser/properties/union.py,sha256=U_qv5ek-UdRbnR1qNcjuheEkR8Ik8-oqGr09UPcapx4,7804
32
32
  openapi_python_client/parser/properties/uuid.py,sha256=kuVZDs0VytchgfmNYRr5trlhU3uyWWdChyta3C9LDTE,2452
33
33
  openapi_python_client/schema/3.0.3.md,sha256=0a25-q_HFDVcsxOnMOGeTo67K4FtLHqMfI5U8VwneJg,126244
34
34
  openapi_python_client/schema/3.1.0.md,sha256=O4SlQ2wux5Sa68Q9jrCcZYEJ5RcqXniJ9pSixtR15Rc,131397
@@ -73,38 +73,38 @@ openapi_python_client/templates/README.md.jinja,sha256=Ht7n3bEff22HtCt892wqZf9xC
73
73
  openapi_python_client/templates/api_init.py.jinja,sha256=87ApBzKyGb5zsgTMOkQXDqsLZCmaSFoJMwbGzCDQZMw,47
74
74
  openapi_python_client/templates/client.py.jinja,sha256=M8mSxfo5slqDb3vZNl4lLzKfIRZKrJz3hn27CcLzNC8,8347
75
75
  openapi_python_client/templates/endpoint_init.py.jinja,sha256=wYN6A3_bvYW13B1J9YvYCmcv5Els-q-E07kZJwJ7Vto,58
76
- openapi_python_client/templates/endpoint_macros.py.jinja,sha256=Z2nnEQcLOpJAHkIuGYBVaNyTIZ7Bxw2jOMmQLPuQ4lU,6165
77
- openapi_python_client/templates/endpoint_module.py.jinja,sha256=DkJIArm92XxF5N06S6K37AgXdLDVyC32ZjNmvPt2hrc,5098
76
+ openapi_python_client/templates/endpoint_macros.py.jinja,sha256=jBN3F9CE94ZDzYpigTZNJfLnckMCWnie3LXChhGe8Eg,6070
77
+ openapi_python_client/templates/endpoint_module.py.jinja,sha256=aqIL6A7sGRF--lFx00ekaJmo2dPrHDW6HLri1KWIuGY,4897
78
78
  openapi_python_client/templates/errors.py.jinja,sha256=trp-p5qn1_JLRxGZhdHtICaNPaCrcDCe4TgIihBravk,546
79
79
  openapi_python_client/templates/helpers.jinja,sha256=sgspXEG683IhJ0hdcnWx9M9S7-Wgrdev7YuAxf_rZ0k,339
80
80
  openapi_python_client/templates/int_enum.py.jinja,sha256=z4d2hVsdgmlxUB1fbVs4w8tJaq2SdmhLjs4mjbZ5GLw,224
81
81
  openapi_python_client/templates/literal_enum.py.jinja,sha256=KY2aadYZYFjIMAFXDX8ZsUCGmKiiPR36GmFSBqXWEk8,658
82
- openapi_python_client/templates/model.py.jinja,sha256=EpAQzzgVk89nAgj7NVAWzizS0UUiLK1WPoYr6xXSvKo,7588
82
+ openapi_python_client/templates/model.py.jinja,sha256=h9hsM_5SQYQ3h1QPhOK2L2Dq4CAUAL-JxrDd1wKwKG8,8332
83
83
  openapi_python_client/templates/models_init.py.jinja,sha256=T2Sj1uGxWlYb5Vc8G3cC65KMDk-mtnEH0g5Xp0xE1Ro,233
84
84
  openapi_python_client/templates/package_init.py.jinja,sha256=EMOU4q7ceaoKJItVKu52vrRTD-BzhrNBjB8VZHN5LgY,196
85
- openapi_python_client/templates/pyproject.toml.jinja,sha256=XdF0lbtYI75XggzzouwpeQmmF7HHzLF9KM-1KX1GTcI,1053
85
+ openapi_python_client/templates/pyproject.toml.jinja,sha256=UQuY9fVMPRAmzNpo3adgcdVpBBhVoewl-IAEOUCCIek,1053
86
86
  openapi_python_client/templates/pyproject_ruff.toml.jinja,sha256=OgFfCd9Ca3YsU8WdCxqJoJdCJEtzADpxAxfMghqzn80,74
87
- openapi_python_client/templates/setup.py.jinja,sha256=VFgPgU84ubycyPOPP7gFtXi-6CBkPSnk87_2l2UCdfc,611
87
+ openapi_python_client/templates/setup.py.jinja,sha256=aHZJXkKS0-sFhK0OH3THvRoUMVAkIo_Lt3OtUPJj1nI,611
88
88
  openapi_python_client/templates/str_enum.py.jinja,sha256=5SxGRu_sZxEILC425D45YSu8s12vJGM2PWwYWjOUl8M,232
89
- openapi_python_client/templates/types.py.jinja,sha256=3eH9a48zNRudjjUcz39Qss5U_BW14IZ7L9RzAlvXNig,1060
90
- openapi_python_client/templates/property_templates/any_property.py.jinja,sha256=D80AUCZZBF7QCky3rqkyP2dJiVYKQUKRmtHusH-pyv0,317
91
- openapi_python_client/templates/property_templates/boolean_property.py.jinja,sha256=44nrqKHrpsvdvtHIgImefW5CbZ0UIQYrjQDyahVNtck,407
92
- openapi_python_client/templates/property_templates/const_property.py.jinja,sha256=BGyrfsdqXb7qf_uS7_x3gUY65cglECY2xBg5XmWxyzE,440
93
- openapi_python_client/templates/property_templates/date_property.py.jinja,sha256=DRzSXUeWFEvqBx2NmDo9saqKuCMts4imaHUHh88y4tg,1335
94
- openapi_python_client/templates/property_templates/datetime_property.py.jinja,sha256=PBdL64s_L9XjDM39TcgDd2qPjseWCdA4Ldrib_OlKAw,1328
95
- openapi_python_client/templates/property_templates/enum_property.py.jinja,sha256=WBzjzlpzQYZXWmgmUG_abw-Vn62EbcMVUDtITXQVhBc,1417
96
- openapi_python_client/templates/property_templates/file_property.py.jinja,sha256=FedS_1ZD60QH67boy0K3wHdEAPvcZG9kBh6yqNlNkQY,1114
97
- openapi_python_client/templates/property_templates/float_property.py.jinja,sha256=PbA98daEpQDzjrtbhmXh0hD5nQRKWMnAfiCW4cXZf-s,389
89
+ openapi_python_client/templates/types.py.jinja,sha256=hEuJx--jICd2FIQy390JC7wcmZgGuB-uFzp3_mouNdo,1398
90
+ openapi_python_client/templates/property_templates/any_property.py.jinja,sha256=H1-aMl9Mxs9z-gXQUw9MCNNrGYewG1p0s43flY4YHtA,135
91
+ openapi_python_client/templates/property_templates/boolean_property.py.jinja,sha256=3xghrbqSeUh-Qk1vdaWb_RxGOBNjhfKFf9EBOmMOBzU,225
92
+ openapi_python_client/templates/property_templates/const_property.py.jinja,sha256=KW71ytG-Tnx-v7ZptxtTu5Ek-xXYNiybBEwFNd6ewYw,565
93
+ openapi_python_client/templates/property_templates/date_property.py.jinja,sha256=CkAnqzoEVg1dxppPrw1dGzQLLEVL-_S8AmAO1W4qe4Q,1034
94
+ openapi_python_client/templates/property_templates/datetime_property.py.jinja,sha256=gRE9mG_7lRTiawTxecTlvZQISk4GOamBW_KcnYb4Sg0,1027
95
+ openapi_python_client/templates/property_templates/enum_property.py.jinja,sha256=c5P07DLKBHsOP306icsz0ZzjmoeBEtQIiV72xxadVY4,1097
96
+ openapi_python_client/templates/property_templates/file_property.py.jinja,sha256=1o8i9dOnEzKmBgHQFFS-iA0vniOf1bmkTJw8Z7WIG1E,898
97
+ openapi_python_client/templates/property_templates/float_property.py.jinja,sha256=vMZbRtomIEPvnKy95fT4QNQRrufv5xgdSnZ97xSN38U,207
98
98
  openapi_python_client/templates/property_templates/helpers.jinja,sha256=oyHJU9cQGhsY7Xf1Q7OapX6G4mW3qRNUX2wFKhK2Mxs,395
99
- openapi_python_client/templates/property_templates/int_property.py.jinja,sha256=PbA98daEpQDzjrtbhmXh0hD5nQRKWMnAfiCW4cXZf-s,389
100
- openapi_python_client/templates/property_templates/list_property.py.jinja,sha256=Ib4RwxPQzDrcCImgl27UlUdLwAasosxQZAhj2r37m2Q,3252
101
- openapi_python_client/templates/property_templates/literal_enum_property.py.jinja,sha256=IiOqDPzsWcIArUMxy0f3gZU1wkboyHrZFgcw6hetqVA,1430
102
- openapi_python_client/templates/property_templates/model_property.py.jinja,sha256=vYApdD8pEJlcNs0LV6_cGVMjTsTKJGHTtVGI4d2JtVs,1748
99
+ openapi_python_client/templates/property_templates/int_property.py.jinja,sha256=vMZbRtomIEPvnKy95fT4QNQRrufv5xgdSnZ97xSN38U,207
100
+ openapi_python_client/templates/property_templates/list_property.py.jinja,sha256=C6nXN0PiEtWcUOwcjseoNREokUcHJ1rVKhkrDpSbtVA,2408
101
+ openapi_python_client/templates/property_templates/literal_enum_property.py.jinja,sha256=rVV_Z2DlMC1H_YiN_rObPQoLxsUAMuMZWn6g2RqrQ0E,1114
102
+ openapi_python_client/templates/property_templates/model_property.py.jinja,sha256=R9V_IhLxB__i9jCRTIjdpXSOzAMXgzMGd5mVxLbTIQw,1338
103
103
  openapi_python_client/templates/property_templates/property_macros.py.jinja,sha256=s0DqGOc8rbEKptUtH1tAht08wahN3xXpaGfyzVa3Kog,580
104
- openapi_python_client/templates/property_templates/union_property.py.jinja,sha256=5Ccbj4ceGEap48NO08cVFCwUli0Rdh-xqbT1Rte4bEw,4186
105
- openapi_python_client/templates/property_templates/uuid_property.py.jinja,sha256=132WXSoRPqZRkactw-QPdjpaGV4Mbbbu2mRqXh2c8Nc,1265
106
- openapi_python_client-0.24.2.dist-info/METADATA,sha256=ZfEUNh7PvCne0adDaCdfTtUnR-U25KgmW2ap1fpHKMM,11113
107
- openapi_python_client-0.24.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
108
- openapi_python_client-0.24.2.dist-info/entry_points.txt,sha256=iRfSdN2foASZXr8GghkYa6KRXkDgO0EFfLut5IXoBTU,72
109
- openapi_python_client-0.24.2.dist-info/licenses/LICENSE,sha256=4dpxQYqY0DB3aTauRrqYRuu6BVNsPSJdYeUT3sH6pQY,1075
110
- openapi_python_client-0.24.2.dist-info/RECORD,,
104
+ openapi_python_client/templates/property_templates/union_property.py.jinja,sha256=Xi-5XAbyRH65eYz6G1RNdchjKiYl99J4JyhvLqdR9h0,4088
105
+ openapi_python_client/templates/property_templates/uuid_property.py.jinja,sha256=g1YZFkrC7PXX_r8Cbf5z_yJRzQoViow4yFWvBqUxj2o,1004
106
+ openapi_python_client-0.25.0.dist-info/METADATA,sha256=vYPBky1K1EqGuNDLfjMVBmDJa5yTJEhUMDSqDBaJk2M,11732
107
+ openapi_python_client-0.25.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
108
+ openapi_python_client-0.25.0.dist-info/entry_points.txt,sha256=iRfSdN2foASZXr8GghkYa6KRXkDgO0EFfLut5IXoBTU,72
109
+ openapi_python_client-0.25.0.dist-info/licenses/LICENSE,sha256=4dpxQYqY0DB3aTauRrqYRuu6BVNsPSJdYeUT3sH6pQY,1075
110
+ openapi_python_client-0.25.0.dist-info/RECORD,,