mphapi 0.1.0__tar.gz → 0.2.0__tar.gz

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.
@@ -1,13 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mphapi
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: A Python interface to the MyPriceHealth API
5
5
  Author: David Archibald
6
6
  Author-email: davidarchibald@myprice.health
7
- Requires-Python: >=3.10,<4.0
7
+ Requires-Python: >=3.12,<4.0
8
8
  Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.10
10
- Classifier: Programming Language :: Python :: 3.11
11
9
  Classifier: Programming Language :: Python :: 3.12
12
10
  Requires-Dist: pydantic (>=2.6.4,<3.0.0)
13
11
  Requires-Dist: requests (>=2.31.0,<3.0.0)
@@ -144,7 +144,7 @@ class Service(BaseModel):
144
144
  procedure_code: Optional[str] = None
145
145
  """Procedure code (from SV101_02 / SV202_02)"""
146
146
 
147
- procedure_modifiers: Optional[str] = None
147
+ procedure_modifiers: Optional[list[str]] = None
148
148
  """Procedure modifiers (from SV101_03, 4, 5, 6 / SV202_03, 4, 5, 6)"""
149
149
 
150
150
  drug_code: Optional[str] = None
@@ -1,8 +1,7 @@
1
1
  from enum import Enum
2
- from typing import Any, Optional
2
+ from typing import Optional
3
3
 
4
- from pydantic import BaseModel, Field, GetCoreSchemaHandler
5
- from pydantic_core import core_schema
4
+ from pydantic import BaseModel, Field
6
5
 
7
6
  from .claim import Service, camel_case_model_config
8
7
  from .response import ResponseError
@@ -115,51 +114,6 @@ class RuralIndicator(str, Enum):
115
114
  SUPER_RURAL = "B"
116
115
  URBAN = ""
117
116
 
118
- @classmethod
119
- def __get_pydantic_core_schema__(
120
- cls,
121
- _source_type: Any,
122
- _handler: GetCoreSchemaHandler,
123
- ) -> core_schema.CoreSchema:
124
- def from_int(value: int) -> RuralIndicator:
125
- if value == 82:
126
- return RuralIndicator.RURAL
127
- elif value == 66:
128
- return RuralIndicator.SUPER_RURAL
129
- elif value == 32:
130
- return RuralIndicator.URBAN
131
- else:
132
- raise ValueError(f"Unknown rural indicator value: {value}")
133
-
134
- def to_int(instance: RuralIndicator) -> int:
135
- if instance == RuralIndicator.RURAL:
136
- return 82
137
- elif instance == RuralIndicator.SUPER_RURAL:
138
- return 66
139
- elif instance == RuralIndicator.URBAN:
140
- return 32
141
- else:
142
- raise ValueError(f"Unknown rural indicator: {instance}")
143
-
144
- from_int_schema = core_schema.chain_schema(
145
- [
146
- core_schema.int_schema(),
147
- core_schema.no_info_plain_validator_function(from_int),
148
- ]
149
- )
150
-
151
- return core_schema.json_or_python_schema(
152
- json_schema=from_int_schema,
153
- python_schema=core_schema.union_schema(
154
- [
155
- # check if it's an instance first before doing any further work
156
- core_schema.is_instance_schema(RuralIndicator),
157
- from_int_schema,
158
- ]
159
- ),
160
- serialization=core_schema.plain_serializer_function_ser_schema(to_int),
161
- )
162
-
163
117
 
164
118
  class ProviderDetail(BaseModel):
165
119
  """
@@ -1,11 +1,11 @@
1
1
  [tool.poetry]
2
2
  name = "mphapi"
3
- version = "0.1.0"
3
+ version = "0.2.0"
4
4
  description = "A Python interface to the MyPriceHealth API"
5
5
  authors = ["David Archibald <davidarchibald@myprice.health>"]
6
6
 
7
7
  [tool.poetry.dependencies]
8
- python = "^3.10"
8
+ python = "^3.12"
9
9
  pydantic = "^2.6.4"
10
10
  requests = "^2.31.0"
11
11
 
File without changes
File without changes
File without changes
File without changes