mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 10:51:13 +00:00
bsdd classes - typing for not required attributes
This commit is contained in:
+240
-242
@@ -24,6 +24,7 @@ import requests
|
|||||||
import webbrowser
|
import webbrowser
|
||||||
import http.server
|
import http.server
|
||||||
from typing import TypedDict, Literal, Optional
|
from typing import TypedDict, Literal, Optional
|
||||||
|
from typing_extensions import NotRequired
|
||||||
|
|
||||||
|
|
||||||
__version__ = version = "0.0.0"
|
__version__ = version = "0.0.0"
|
||||||
@@ -31,9 +32,6 @@ __version__ = version = "0.0.0"
|
|||||||
Status = Literal["Preview", "Active", "Inactive"]
|
Status = Literal["Preview", "Active", "Inactive"]
|
||||||
ClassTypes = Literal["Class", "GroupOfProperties", "AlternativeUse", "Material"]
|
ClassTypes = Literal["Class", "GroupOfProperties", "AlternativeUse", "Material"]
|
||||||
|
|
||||||
# NOTE: Some values in TypedDicts are actually not guaranteed to be provided
|
|
||||||
# and should be typed with NotRequired.
|
|
||||||
|
|
||||||
|
|
||||||
# Use yml_to_classes.py to update classes.
|
# Use yml_to_classes.py to update classes.
|
||||||
class DictionaryContractV1(TypedDict):
|
class DictionaryContractV1(TypedDict):
|
||||||
@@ -46,33 +44,33 @@ class DictionaryContractV1(TypedDict):
|
|||||||
defaultLanguageCode: str
|
defaultLanguageCode: str
|
||||||
isLatestVersion: bool
|
isLatestVersion: bool
|
||||||
isVerified: bool
|
isVerified: bool
|
||||||
license: str
|
license: NotRequired[str]
|
||||||
licenseUrl: str
|
licenseUrl: NotRequired[str]
|
||||||
qualityAssuranceProcedure: str
|
qualityAssuranceProcedure: NotRequired[str]
|
||||||
qualityAssuranceProcedureUrl: str
|
qualityAssuranceProcedureUrl: NotRequired[str]
|
||||||
status: str
|
status: NotRequired[str]
|
||||||
moreInfoUrl: str
|
moreInfoUrl: NotRequired[str]
|
||||||
releaseDate: str
|
releaseDate: NotRequired[str]
|
||||||
lastUpdatedUtc: str
|
lastUpdatedUtc: NotRequired[str]
|
||||||
availableLanguages: list[CodeNameDto]
|
availableLanguages: NotRequired[list[CodeNameDto]]
|
||||||
|
|
||||||
|
|
||||||
class DictionaryResponseContractV1(TypedDict):
|
class DictionaryResponseContractV1(TypedDict):
|
||||||
totalCount: int
|
totalCount: NotRequired[int]
|
||||||
offset: int
|
offset: NotRequired[int]
|
||||||
count: int
|
count: NotRequired[int]
|
||||||
dictionaries: list[DictionaryContractV1]
|
dictionaries: NotRequired[list[DictionaryContractV1]]
|
||||||
|
|
||||||
|
|
||||||
class ClassListItemContractV1(TypedDict):
|
class ClassListItemContractV1(TypedDict):
|
||||||
uri: str
|
uri: NotRequired[str]
|
||||||
code: str
|
code: NotRequired[str]
|
||||||
name: str
|
name: NotRequired[str]
|
||||||
classType: str
|
classType: NotRequired[str]
|
||||||
referenceCode: str
|
referenceCode: NotRequired[str]
|
||||||
parentClassCode: str
|
parentClassCode: NotRequired[str]
|
||||||
descriptionPart: str
|
descriptionPart: NotRequired[str]
|
||||||
children: list[ClassListItemContractV1]
|
children: NotRequired[list[ClassListItemContractV1]]
|
||||||
|
|
||||||
|
|
||||||
class DictionaryClassesResponseContractV1(TypedDict):
|
class DictionaryClassesResponseContractV1(TypedDict):
|
||||||
@@ -85,25 +83,25 @@ class DictionaryClassesResponseContractV1(TypedDict):
|
|||||||
defaultLanguageCode: str
|
defaultLanguageCode: str
|
||||||
isLatestVersion: bool
|
isLatestVersion: bool
|
||||||
isVerified: bool
|
isVerified: bool
|
||||||
license: str
|
license: NotRequired[str]
|
||||||
licenseUrl: str
|
licenseUrl: NotRequired[str]
|
||||||
qualityAssuranceProcedure: str
|
qualityAssuranceProcedure: NotRequired[str]
|
||||||
qualityAssuranceProcedureUrl: str
|
qualityAssuranceProcedureUrl: NotRequired[str]
|
||||||
status: str
|
status: NotRequired[str]
|
||||||
moreInfoUrl: str
|
moreInfoUrl: NotRequired[str]
|
||||||
releaseDate: str
|
releaseDate: NotRequired[str]
|
||||||
lastUpdatedUtc: str
|
lastUpdatedUtc: NotRequired[str]
|
||||||
classes: list[ClassListItemContractV1]
|
classes: NotRequired[list[ClassListItemContractV1]]
|
||||||
classesTotalCount: int
|
classesTotalCount: NotRequired[int]
|
||||||
classesOffset: int
|
classesOffset: NotRequired[int]
|
||||||
classesCount: int
|
classesCount: NotRequired[int]
|
||||||
|
|
||||||
|
|
||||||
class PropertyListItemContractV1(TypedDict):
|
class PropertyListItemContractV1(TypedDict):
|
||||||
uri: str
|
uri: NotRequired[str]
|
||||||
code: str
|
code: NotRequired[str]
|
||||||
name: str
|
name: NotRequired[str]
|
||||||
descriptionPart: str
|
descriptionPart: NotRequired[str]
|
||||||
|
|
||||||
|
|
||||||
class DictionaryPropertiesResponseContractV1(TypedDict):
|
class DictionaryPropertiesResponseContractV1(TypedDict):
|
||||||
@@ -116,234 +114,234 @@ class DictionaryPropertiesResponseContractV1(TypedDict):
|
|||||||
defaultLanguageCode: str
|
defaultLanguageCode: str
|
||||||
isLatestVersion: bool
|
isLatestVersion: bool
|
||||||
isVerified: bool
|
isVerified: bool
|
||||||
license: str
|
license: NotRequired[str]
|
||||||
licenseUrl: str
|
licenseUrl: NotRequired[str]
|
||||||
qualityAssuranceProcedure: str
|
qualityAssuranceProcedure: NotRequired[str]
|
||||||
qualityAssuranceProcedureUrl: str
|
qualityAssuranceProcedureUrl: NotRequired[str]
|
||||||
status: str
|
status: NotRequired[str]
|
||||||
moreInfoUrl: str
|
moreInfoUrl: NotRequired[str]
|
||||||
releaseDate: str
|
releaseDate: NotRequired[str]
|
||||||
lastUpdatedUtc: str
|
lastUpdatedUtc: NotRequired[str]
|
||||||
properties: list[PropertyListItemContractV1]
|
properties: NotRequired[list[PropertyListItemContractV1]]
|
||||||
propertiesTotalCount: int
|
propertiesTotalCount: NotRequired[int]
|
||||||
propertiesOffset: int
|
propertiesOffset: NotRequired[int]
|
||||||
propertiesCount: int
|
propertiesCount: NotRequired[int]
|
||||||
|
|
||||||
|
|
||||||
class ClassReferenceContractV1(TypedDict):
|
class ClassReferenceContractV1(TypedDict):
|
||||||
uri: str
|
uri: str
|
||||||
name: str
|
name: NotRequired[str]
|
||||||
code: str
|
code: NotRequired[str]
|
||||||
|
|
||||||
|
|
||||||
class ClassPropertyValueContractV1(TypedDict):
|
class ClassPropertyValueContractV1(TypedDict):
|
||||||
uri: str
|
uri: NotRequired[str]
|
||||||
code: str
|
code: NotRequired[str]
|
||||||
value: str
|
value: str
|
||||||
description: str
|
description: NotRequired[str]
|
||||||
sortNumber: int
|
sortNumber: NotRequired[int]
|
||||||
|
|
||||||
|
|
||||||
class ClassPropertyContractV1(TypedDict):
|
class ClassPropertyContractV1(TypedDict):
|
||||||
name: str
|
name: str
|
||||||
uri: str
|
uri: NotRequired[str]
|
||||||
description: str
|
description: NotRequired[str]
|
||||||
definition: str
|
definition: NotRequired[str]
|
||||||
dataType: str
|
dataType: NotRequired[str]
|
||||||
dimension: str
|
dimension: NotRequired[str]
|
||||||
dimensionLength: int
|
dimensionLength: NotRequired[int]
|
||||||
dimensionMass: int
|
dimensionMass: NotRequired[int]
|
||||||
dimensionTime: int
|
dimensionTime: NotRequired[int]
|
||||||
dimensionElectricCurrent: int
|
dimensionElectricCurrent: NotRequired[int]
|
||||||
dimensionThermodynamicTemperature: int
|
dimensionThermodynamicTemperature: NotRequired[int]
|
||||||
dimensionAmountOfSubstance: int
|
dimensionAmountOfSubstance: NotRequired[int]
|
||||||
dimensionLuminousIntensity: int
|
dimensionLuminousIntensity: NotRequired[int]
|
||||||
dynamicParameterPropertyCodes: list[str]
|
dynamicParameterPropertyCodes: NotRequired[list[str]]
|
||||||
example: str
|
example: NotRequired[str]
|
||||||
isDynamic: bool
|
isDynamic: NotRequired[bool]
|
||||||
isRequired: bool
|
isRequired: NotRequired[bool]
|
||||||
isWritable: bool
|
isWritable: NotRequired[bool]
|
||||||
maxExclusive: float
|
maxExclusive: NotRequired[float]
|
||||||
maxInclusive: float
|
maxInclusive: NotRequired[float]
|
||||||
minExclusive: float
|
minExclusive: NotRequired[float]
|
||||||
minInclusive: float
|
minInclusive: NotRequired[float]
|
||||||
pattern: str
|
pattern: NotRequired[str]
|
||||||
physicalQuantity: str
|
physicalQuantity: NotRequired[str]
|
||||||
allowedValues: list[ClassPropertyValueContractV1]
|
allowedValues: NotRequired[list[ClassPropertyValueContractV1]]
|
||||||
predefinedValue: str
|
predefinedValue: NotRequired[str]
|
||||||
propertyCode: str
|
propertyCode: NotRequired[str]
|
||||||
propertyDictionaryName: str
|
propertyDictionaryName: NotRequired[str]
|
||||||
propertyDictionaryUri: str
|
propertyDictionaryUri: NotRequired[str]
|
||||||
propertyUri: str
|
propertyUri: NotRequired[str]
|
||||||
propertySet: str
|
propertySet: NotRequired[str]
|
||||||
propertyStatus: str
|
propertyStatus: NotRequired[str]
|
||||||
propertyValueKind: str
|
propertyValueKind: NotRequired[str]
|
||||||
symbol: str
|
symbol: NotRequired[str]
|
||||||
units: list[str]
|
units: NotRequired[list[str]]
|
||||||
qudtCodes: list[str]
|
qudtCodes: NotRequired[list[str]]
|
||||||
|
|
||||||
|
|
||||||
class PropertyContractV4(TypedDict):
|
class PropertyContractV4(TypedDict):
|
||||||
dictionaryUri: str
|
dictionaryUri: NotRequired[str]
|
||||||
activationDateUtc: str
|
activationDateUtc: str
|
||||||
code: str
|
code: str
|
||||||
creatorLanguageCode: str
|
creatorLanguageCode: NotRequired[str]
|
||||||
countriesOfUse: list[str]
|
countriesOfUse: NotRequired[list[str]]
|
||||||
countryOfOrigin: str
|
countryOfOrigin: NotRequired[str]
|
||||||
deActivationDateUtc: str
|
deActivationDateUtc: NotRequired[str]
|
||||||
definition: str
|
definition: NotRequired[str]
|
||||||
deprecationExplanation: str
|
deprecationExplanation: NotRequired[str]
|
||||||
description: str
|
description: NotRequired[str]
|
||||||
documentReference: str
|
documentReference: NotRequired[str]
|
||||||
name: str
|
name: str
|
||||||
uri: str
|
uri: str
|
||||||
replacedObjectCodes: list[str]
|
replacedObjectCodes: NotRequired[list[str]]
|
||||||
replacingObjectCodes: list[str]
|
replacingObjectCodes: NotRequired[list[str]]
|
||||||
revisionDateUtc: str
|
revisionDateUtc: NotRequired[str]
|
||||||
revisionNumber: int
|
revisionNumber: NotRequired[int]
|
||||||
status: str
|
status: str
|
||||||
subdivisionsOfUse: list[str]
|
subdivisionsOfUse: NotRequired[list[str]]
|
||||||
uid: str
|
uid: NotRequired[str]
|
||||||
versionDateUtc: str
|
versionDateUtc: str
|
||||||
versionNumber: int
|
versionNumber: NotRequired[int]
|
||||||
visualRepresentationUri: str
|
visualRepresentationUri: NotRequired[str]
|
||||||
connectedPropertyCodes: list[str]
|
connectedPropertyCodes: NotRequired[list[str]]
|
||||||
dataType: str
|
dataType: NotRequired[str]
|
||||||
dimension: str
|
dimension: NotRequired[str]
|
||||||
dimensionLength: int
|
dimensionLength: NotRequired[int]
|
||||||
dimensionMass: int
|
dimensionMass: NotRequired[int]
|
||||||
dimensionTime: int
|
dimensionTime: NotRequired[int]
|
||||||
dimensionElectricCurrent: int
|
dimensionElectricCurrent: NotRequired[int]
|
||||||
dimensionThermodynamicTemperature: int
|
dimensionThermodynamicTemperature: NotRequired[int]
|
||||||
dimensionAmountOfSubstance: int
|
dimensionAmountOfSubstance: NotRequired[int]
|
||||||
dimensionLuminousIntensity: int
|
dimensionLuminousIntensity: NotRequired[int]
|
||||||
dynamicParameterPropertyCodes: list[str]
|
dynamicParameterPropertyCodes: NotRequired[list[str]]
|
||||||
example: str
|
example: NotRequired[str]
|
||||||
isDynamic: bool
|
isDynamic: NotRequired[bool]
|
||||||
maxExclusive: float
|
maxExclusive: NotRequired[float]
|
||||||
maxInclusive: float
|
maxInclusive: NotRequired[float]
|
||||||
methodOfMeasurement: str
|
methodOfMeasurement: NotRequired[str]
|
||||||
minExclusive: float
|
minExclusive: NotRequired[float]
|
||||||
minInclusive: float
|
minInclusive: NotRequired[float]
|
||||||
pattern: str
|
pattern: NotRequired[str]
|
||||||
physicalQuantity: str
|
physicalQuantity: NotRequired[str]
|
||||||
allowedValues: list[PropertyValueContractV4]
|
allowedValues: NotRequired[list[PropertyValueContractV4]]
|
||||||
propertyValueKind: str
|
propertyValueKind: NotRequired[str]
|
||||||
propertyRelations: list[PropertyRelationContractV4]
|
propertyRelations: NotRequired[list[PropertyRelationContractV4]]
|
||||||
textFormat: str
|
textFormat: NotRequired[str]
|
||||||
units: list[str]
|
units: NotRequired[list[str]]
|
||||||
qudtCodes: list[str]
|
qudtCodes: NotRequired[list[str]]
|
||||||
propertyClasses: list[PropertyClassContractV4]
|
propertyClasses: NotRequired[list[PropertyClassContractV4]]
|
||||||
|
|
||||||
|
|
||||||
class PropertyValueContractV4(TypedDict):
|
class PropertyValueContractV4(TypedDict):
|
||||||
uri: str
|
uri: NotRequired[str]
|
||||||
code: str
|
code: NotRequired[str]
|
||||||
value: str
|
value: str
|
||||||
description: str
|
description: NotRequired[str]
|
||||||
sortNumber: int
|
sortNumber: NotRequired[int]
|
||||||
|
|
||||||
|
|
||||||
class PropertyRelationContractV4(TypedDict):
|
class PropertyRelationContractV4(TypedDict):
|
||||||
uri: str
|
uri: NotRequired[str]
|
||||||
relationType: str
|
relationType: NotRequired[str]
|
||||||
relatedPropertyUri: str
|
relatedPropertyUri: NotRequired[str]
|
||||||
relatedPropertyName: str
|
relatedPropertyName: NotRequired[str]
|
||||||
|
|
||||||
|
|
||||||
class PropertyClassContractV4(TypedDict):
|
class PropertyClassContractV4(TypedDict):
|
||||||
uri: str
|
uri: NotRequired[str]
|
||||||
code: str
|
code: NotRequired[str]
|
||||||
name: str
|
name: str
|
||||||
definition: str
|
definition: NotRequired[str]
|
||||||
description: str
|
description: NotRequired[str]
|
||||||
propertySet: str
|
propertySet: NotRequired[str]
|
||||||
|
|
||||||
|
|
||||||
class ClassRelationContractV1(TypedDict):
|
class ClassRelationContractV1(TypedDict):
|
||||||
uri: str
|
uri: NotRequired[str]
|
||||||
relationType: str
|
relationType: str
|
||||||
relatedClassUri: str
|
relatedClassUri: str
|
||||||
relatedClassName: str
|
relatedClassName: NotRequired[str]
|
||||||
fraction: float
|
fraction: NotRequired[float]
|
||||||
|
|
||||||
|
|
||||||
class TextSearchResponseContractV1(TypedDict):
|
class TextSearchResponseContractV1(TypedDict):
|
||||||
totalCount: int
|
totalCount: NotRequired[int]
|
||||||
offset: int
|
offset: NotRequired[int]
|
||||||
count: int
|
count: NotRequired[int]
|
||||||
classes: list[TextSearchResponseClassContractV1]
|
classes: NotRequired[list[TextSearchResponseClassContractV1]]
|
||||||
dictionaries: list[TextSearchResponseDictionaryContractV1]
|
dictionaries: NotRequired[list[TextSearchResponseDictionaryContractV1]]
|
||||||
properties: list[TextSearchResponsePropertyContractV1]
|
properties: NotRequired[list[TextSearchResponsePropertyContractV1]]
|
||||||
|
|
||||||
|
|
||||||
class TextSearchResponseClassContractV1(TypedDict):
|
class TextSearchResponseClassContractV1(TypedDict):
|
||||||
dictionaryUri: str
|
dictionaryUri: NotRequired[str]
|
||||||
dictionaryName: str
|
dictionaryName: NotRequired[str]
|
||||||
name: str
|
name: NotRequired[str]
|
||||||
referenceCode: str
|
referenceCode: NotRequired[str]
|
||||||
uri: str
|
uri: NotRequired[str]
|
||||||
classType: str
|
classType: NotRequired[str]
|
||||||
description: str
|
description: NotRequired[str]
|
||||||
parentClassName: str
|
parentClassName: NotRequired[str]
|
||||||
relatedIfcEntityNames: list[str]
|
relatedIfcEntityNames: NotRequired[list[str]]
|
||||||
|
|
||||||
|
|
||||||
class TextSearchResponseDictionaryContractV1(TypedDict):
|
class TextSearchResponseDictionaryContractV1(TypedDict):
|
||||||
uri: str
|
uri: NotRequired[str]
|
||||||
name: str
|
name: NotRequired[str]
|
||||||
|
|
||||||
|
|
||||||
class TextSearchResponsePropertyContractV1(TypedDict):
|
class TextSearchResponsePropertyContractV1(TypedDict):
|
||||||
dictionaryUri: str
|
dictionaryUri: NotRequired[str]
|
||||||
dictionaryName: str
|
dictionaryName: NotRequired[str]
|
||||||
uri: str
|
uri: NotRequired[str]
|
||||||
name: str
|
name: NotRequired[str]
|
||||||
description: str
|
description: NotRequired[str]
|
||||||
|
|
||||||
|
|
||||||
class ClassContractV1(TypedDict):
|
class ClassContractV1(TypedDict):
|
||||||
dictionaryUri: str
|
dictionaryUri: NotRequired[str]
|
||||||
activationDateUtc: str
|
activationDateUtc: str
|
||||||
code: str
|
code: str
|
||||||
creatorLanguageCode: str
|
creatorLanguageCode: NotRequired[str]
|
||||||
countriesOfUse: list[str]
|
countriesOfUse: NotRequired[list[str]]
|
||||||
countryOfOrigin: str
|
countryOfOrigin: NotRequired[str]
|
||||||
deActivationDateUtc: str
|
deActivationDateUtc: NotRequired[str]
|
||||||
definition: str
|
definition: NotRequired[str]
|
||||||
deprecationExplanation: str
|
deprecationExplanation: NotRequired[str]
|
||||||
description: str
|
description: NotRequired[str]
|
||||||
documentReference: str
|
documentReference: NotRequired[str]
|
||||||
name: str
|
name: str
|
||||||
uri: str
|
uri: str
|
||||||
replacedObjectCodes: list[str]
|
replacedObjectCodes: NotRequired[list[str]]
|
||||||
replacingObjectCodes: list[str]
|
replacingObjectCodes: NotRequired[list[str]]
|
||||||
revisionDateUtc: str
|
revisionDateUtc: NotRequired[str]
|
||||||
revisionNumber: int
|
revisionNumber: NotRequired[int]
|
||||||
status: str
|
status: str
|
||||||
subdivisionsOfUse: list[str]
|
subdivisionsOfUse: NotRequired[list[str]]
|
||||||
uid: str
|
uid: NotRequired[str]
|
||||||
versionDateUtc: str
|
versionDateUtc: str
|
||||||
versionNumber: int
|
versionNumber: NotRequired[int]
|
||||||
visualRepresentationUri: str
|
visualRepresentationUri: NotRequired[str]
|
||||||
classType: str
|
classType: NotRequired[str]
|
||||||
referenceCode: str
|
referenceCode: NotRequired[str]
|
||||||
synonyms: list[str]
|
synonyms: NotRequired[list[str]]
|
||||||
relatedIfcEntityNames: list[str]
|
relatedIfcEntityNames: NotRequired[list[str]]
|
||||||
parentClassReference: ClassReferenceContractV1
|
parentClassReference: NotRequired[ClassReferenceContractV1]
|
||||||
classProperties: list[ClassPropertyContractV1]
|
classProperties: NotRequired[list[ClassPropertyContractV1]]
|
||||||
classRelations: list[ClassRelationContractV1]
|
classRelations: NotRequired[list[ClassRelationContractV1]]
|
||||||
childClassReferences: list[ClassReferenceContractV1]
|
childClassReferences: NotRequired[list[ClassReferenceContractV1]]
|
||||||
reverseClassRelations: list[ClassReverseRelationContractV1]
|
reverseClassRelations: NotRequired[list[ClassReverseRelationContractV1]]
|
||||||
hierarchy: list[HierarchyItemContractV1]
|
hierarchy: NotRequired[list[HierarchyItemContractV1]]
|
||||||
|
|
||||||
|
|
||||||
class ClassReverseRelationContractV1(TypedDict):
|
class ClassReverseRelationContractV1(TypedDict):
|
||||||
relationType: str
|
relationType: str
|
||||||
classUri: str
|
classUri: str
|
||||||
className: str
|
className: NotRequired[str]
|
||||||
fraction: float
|
fraction: NotRequired[float]
|
||||||
dictionaryUri: str
|
dictionaryUri: NotRequired[str]
|
||||||
|
|
||||||
|
|
||||||
class HierarchyItemContractV1(TypedDict):
|
class HierarchyItemContractV1(TypedDict):
|
||||||
@@ -354,49 +352,49 @@ class HierarchyItemContractV1(TypedDict):
|
|||||||
|
|
||||||
|
|
||||||
class SearchInDictionaryResponseContractV1(TypedDict):
|
class SearchInDictionaryResponseContractV1(TypedDict):
|
||||||
totalCount: int
|
totalCount: NotRequired[int]
|
||||||
offset: int
|
offset: NotRequired[int]
|
||||||
count: int
|
count: NotRequired[int]
|
||||||
dictionary: DictionarySearchResultContractV1
|
dictionary: NotRequired[DictionarySearchResultContractV1]
|
||||||
|
|
||||||
|
|
||||||
class DictionarySearchResultContractV1(TypedDict):
|
class DictionarySearchResultContractV1(TypedDict):
|
||||||
name: str
|
name: NotRequired[str]
|
||||||
uri: str
|
uri: NotRequired[str]
|
||||||
classes: list[ClassSearchResultContractV1]
|
classes: NotRequired[list[ClassSearchResultContractV1]]
|
||||||
|
|
||||||
|
|
||||||
class ClassSearchResultContractV1(TypedDict):
|
class ClassSearchResultContractV1(TypedDict):
|
||||||
name: str
|
name: NotRequired[str]
|
||||||
uri: str
|
uri: NotRequired[str]
|
||||||
referenceCode: str
|
referenceCode: NotRequired[str]
|
||||||
classType: str
|
classType: NotRequired[str]
|
||||||
definition: str
|
definition: NotRequired[str]
|
||||||
synonyms: list[str]
|
synonyms: NotRequired[list[str]]
|
||||||
|
|
||||||
|
|
||||||
class ClassSearchResponseContractV1(TypedDict):
|
class ClassSearchResponseContractV1(TypedDict):
|
||||||
totalCount: int
|
totalCount: NotRequired[int]
|
||||||
offset: int
|
offset: NotRequired[int]
|
||||||
count: int
|
count: NotRequired[int]
|
||||||
classes: list[ClassSearchResponseClassContractV1]
|
classes: NotRequired[list[ClassSearchResponseClassContractV1]]
|
||||||
|
|
||||||
|
|
||||||
class ClassSearchResponseClassContractV1(TypedDict):
|
class ClassSearchResponseClassContractV1(TypedDict):
|
||||||
dictionaryUri: str
|
dictionaryUri: NotRequired[str]
|
||||||
dictionaryName: str
|
dictionaryName: NotRequired[str]
|
||||||
name: str
|
name: NotRequired[str]
|
||||||
referenceCode: str
|
referenceCode: NotRequired[str]
|
||||||
uri: str
|
uri: NotRequired[str]
|
||||||
classType: str
|
classType: NotRequired[str]
|
||||||
description: str
|
description: NotRequired[str]
|
||||||
parentClassName: str
|
parentClassName: NotRequired[str]
|
||||||
relatedIfcEntityNames: list[str]
|
relatedIfcEntityNames: NotRequired[list[str]]
|
||||||
|
|
||||||
|
|
||||||
class CountryContractV1(TypedDict):
|
class CountryContractV1(TypedDict):
|
||||||
code: str
|
code: NotRequired[str]
|
||||||
name: str
|
name: NotRequired[str]
|
||||||
|
|
||||||
|
|
||||||
class LanguageContractV1(TypedDict):
|
class LanguageContractV1(TypedDict):
|
||||||
@@ -405,21 +403,21 @@ class LanguageContractV1(TypedDict):
|
|||||||
|
|
||||||
|
|
||||||
class ReferenceDocumentContractV1(TypedDict):
|
class ReferenceDocumentContractV1(TypedDict):
|
||||||
title: str
|
title: NotRequired[str]
|
||||||
name: str
|
name: NotRequired[str]
|
||||||
date: str
|
date: NotRequired[str]
|
||||||
|
|
||||||
|
|
||||||
class UnitContractV1(TypedDict):
|
class UnitContractV1(TypedDict):
|
||||||
code: str
|
code: NotRequired[str]
|
||||||
name: str
|
name: NotRequired[str]
|
||||||
symbol: str
|
symbol: NotRequired[str]
|
||||||
qudtUri: str
|
qudtUri: NotRequired[str]
|
||||||
|
|
||||||
|
|
||||||
class CodeNameDto(TypedDict):
|
class CodeNameDto(TypedDict):
|
||||||
code: str
|
code: NotRequired[str]
|
||||||
name: str
|
name: NotRequired[str]
|
||||||
|
|
||||||
|
|
||||||
class OAuthReceiver(http.server.BaseHTTPRequestHandler):
|
class OAuthReceiver(http.server.BaseHTTPRequestHandler):
|
||||||
|
|||||||
@@ -23,7 +23,10 @@ classifiers = [
|
|||||||
"Programming Language :: Python :: Implementation :: PyPy",
|
"Programming Language :: Python :: Implementation :: PyPy",
|
||||||
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
|
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
|
||||||
]
|
]
|
||||||
dependencies = ["requests"]
|
dependencies = [
|
||||||
|
"requests",
|
||||||
|
"typing-extensions",
|
||||||
|
]
|
||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
dev = [
|
dev = [
|
||||||
|
|||||||
@@ -59,8 +59,8 @@ if __name__ == "__main__":
|
|||||||
props_str = ""
|
props_str = ""
|
||||||
for prop_name, prop_data in props.items():
|
for prop_name, prop_data in props.items():
|
||||||
python_type = get_python_type(prop_data)
|
python_type = get_python_type(prop_data)
|
||||||
# if prop_name not in required:
|
if prop_name not in required:
|
||||||
# python_type = f"NotRequired[{python_type}]"
|
python_type = f"NotRequired[{python_type}]"
|
||||||
props_str += f" {prop_name}: {python_type}\n"
|
props_str += f" {prop_name}: {python_type}\n"
|
||||||
class_strings[class_header] = props_str
|
class_strings[class_header] = props_str
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user