bsdd

Module Contents

class bsdd.ClassContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

activationDateUtc: str
childClassReferences: list[ClassReferenceContractV1]
classProperties: list[ClassPropertyContractV1]
classRelations: list[ClassRelationContractV1]
classType: str
code: str
countriesOfUse: list[str]
countryOfOrigin: str
creatorLanguageCode: str
deActivationDateUtc: str
definition: str
deprecationExplanation: str
description: str
dictionaryUri: str
documentReference: str
name: str
parentClassReference: ClassReferenceContractV1
referenceCode: str
relatedIfcEntityNames: list[str]
replacedObjectCodes: list[str]
replacingObjectCodes: list[str]
revisionDateUtc: str
revisionNumber: int
status: str
subdivisionsOfUse: list[str]
synonyms: list[str]
uid: str
uri: str
versionDateUtc: str
versionNumber: int
visualRepresentationUri: str
class bsdd.ClassListItemContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

children: list[ClassListItemContractV1]
classType: str
code: str
name: str
parentClassCode: str
referenceCode: str
uri: str
class bsdd.ClassPropertyContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

allowedValues: list[ClassPropertyValueContractV1]
dataType: str
description: str
dimension: str
dimensionAmountOfSubstance: int
dimensionElectricCurrent: int
dimensionLength: int
dimensionLuminousIntensity: int
dimensionMass: int
dimensionThermodynamicTemperature: int
dimensionTime: int
dynamicParameterPropertyCodes: list[str]
example: str
isDynamic: bool
isRequired: bool
isWritable: bool
maxExclusive: float
maxInclusive: float
minExclusive: float
minInclusive: float
name: str
pattern: str
physicalQuantity: str
predefinedValue: str
propertyCode: str
propertyDictionaryName: str
propertySet: str
propertyStatus: str
propertyUri: str
propertyValueKind: str
qudtCodes: list[str]
symbol: str
units: list[str]
uri: str
class bsdd.ClassPropertyValueContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

code: str
description: str
sortNumber: int
uri: str
value: str
class bsdd.ClassReferenceContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

code: str
name: str
uri: str
class bsdd.ClassRelationContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

fraction: float
relatedClassName: str
relatedClassUri: str
relationType: str
uri: str
class bsdd.ClassSearchResponseClassContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

classType: str
description: str
dictionaryName: str
dictionaryUri: str
name: str
parentClassName: str
referenceCode: str
relatedIfcEntityNames: list[str]
uri: str
class bsdd.ClassSearchResponseContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

classes: list[ClassSearchResponseClassContractV1]
count: int
offset: int
totalCount: int
class bsdd.ClassSearchResultContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

classType: str
definition: str
name: str
referenceCode: str
synonyms: list[str]
uri: str
class bsdd.Client
Classification(namespaceUri, version='v3', languageCode='', includeChildClassificationReferences=True)
ClassificationSearchOpen(SearchText, version='v1', DomainNamespaceUris=None, RelatedIfcEntities=None)
Country(version='v1')
Domain(version='v2')
Language(version='v1')
Property(namespaceUri, version='v2', languageCode='')
PropertyValue(namespaceUri, version='v1', languageCode='')
ReferenceDocument(version='v1')
SearchList(DomainNamespaceUri, version='v2', SearchText='', LanguageCode='', RelatedIfcEntity='')
SearchListOpen(DomainNamespaceUri, version='v2', SearchText='', LanguageCode='', RelatedIfcEntity='')
Unit(version='v1')
get(endpoint, params=None, is_auth_required=False)
get_access_token()
get_class(class_uri: str, include_class_properties: bool = True, include_child_class_reference: bool = True, include_class_relations: bool = True, include_reverse_relations: bool = False, reverse_relation_dictionary_uris: list[str] | None = None, language_code: str = '', version: int = 1) ClassContractV1

Get Class details this API replaces Classification

get_classes(dictionary_uri: str, use_nested_classes: bool = True, class_type: ClassTypes = 'Class', language_code: str = '', version: int = 1, offset=0, limit=1000) DictionaryClassesResponseContractV1

Get Dictionary with tree of classes This API replaces Domain

get_countries(version: int = 1) list[CountryContractV1]

Get list of all Countries this API replaces Country

get_dictionary(dictionary_uri: str = '', version: int = 1) DictionaryResponseContractV1

Get list of available Dictionaries This API replaces Domain

get_languages(version: int = 1) list[LanguageContractV1]

Get list of available Languages this API replaces Language

get_new_access_token()
get_properties(dictionary_uri: str, offset: int = 0, limit: int = 100, language_code: str = '', version: int = 1) DictionaryPropertiesResponseContractV1

Get Dictionary with its properties

get_property(uri, include_classes=False, language_code='', version: int = 4) PropertyContractV4

Get Property Detail this API replaces Property

get_property_value(uri, language_code='', version: int = 2) PropertyValueContractV4

Get Property Value details this API replaces PropertyValue

get_reference_documents(version: int = 1) list[ReferenceDocumentContractV1]

Get list of all ReferenceDocuments this API replaces Country

get_units(version: int = 1) list[UnitContractV1]

Get list of all Units this API replaces Unit

login()
post()
search_class(search_text: str, dictionary_uris: list[str] | None = None, related_ifc_entities: list[str] | None = None, version: int = 1, offset: int = 0, limit: int = 100) ClassSearchResponseContractV1

Search the bSDD database using free text, get list of Classes matching the text and optional additional filters. this API replaces ClassificationSearch

search_in_dictionary(dictionary_uri: str, search_text: str = '', language_code: str = '', related_ifc_entity: str = '', version: int = 1, offset: int = 0, limit: int = 100) SearchInDictionaryResponseContractV1

Search the bSDD database, get list of Classes without details. This version uses new naming and returns one Dictionary instead of a list with always one Dictionary. This API replaces SearchList.

search_text(search_text: str, type_filter='All', dictionary_uris=None, version: int = 1, offset: int = 0, limit: int = 100) TextSearchResponseContractV1

Search the bSDD database using free text, get list of Classes and/or Properties matching the text. Pagination options are for Classes and Properties combined. So if result consists of 10 classes and 5 properties, TotalCount will be 15. Classes will be listed first, so if you then use Offset=10 and Limit=5, you will get the 5 properties.

set_tokens_from_response(response)
access_token = ''
access_token_expires_on
auth_endpoint = 'https://buildingsmartservices.b2clogin.com/tfp/buildingsmartservices.onmicrosoft.com/b2c_1_signu...
baseurl = 'https://api.bsdd.buildingsmart.org/api/'
client_id = '4aba821f-d4ff-498b-a462-c2837dbbba70'
refresh_token = ''
refresh_token_expires_on
token_endpoint = 'https://buildingsmartservices.b2clogin.com/tfp/buildingsmartservices.onmicrosoft.com/b2c_1_signu...
class bsdd.CountryContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

code: str
name: str
class bsdd.DictionaryClassesResponseContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

classes: list[ClassListItemContractV1]
classesCount: int
classesOffset: int
classesTotalCount: int
defaultLanguageCode: str
lastUpdatedUtc: str
license: str
licenseUrl: str
moreInfoUrl: str
name: str
organizationCodeOwner: str
organizationNameOwner: str
qualityAssuranceProcedure: str
qualityAssuranceProcedureUrl: str
releaseDate: str
status: str
uri: str
version: str
class bsdd.DictionaryContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

defaultLanguageCode: str
lastUpdatedUtc: str
license: str
licenseUrl: str
moreInfoUrl: str
name: str
organizationCodeOwner: str
organizationNameOwner: str
qualityAssuranceProcedure: str
qualityAssuranceProcedureUrl: str
releaseDate: str
status: str
uri: str
version: str
class bsdd.DictionaryPropertiesResponseContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

defaultLanguageCode: str
lastUpdatedUtc: str
license: str
licenseUrl: str
moreInfoUrl: str
name: str
organizationCodeOwner: str
organizationNameOwner: str
properties: list[PropertyListItemContractV1]
propertiesCount: int
propertiesOffset: int
propertiesTotalCount: int
qualityAssuranceProcedure: str
qualityAssuranceProcedureUrl: str
releaseDate: str
status: str
uri: str
version: str
class bsdd.DictionaryResponseContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

count: int
dictionaries: list[DictionaryContractV1]
offset: int
totalCount: int
class bsdd.DictionarySearchResultContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

classes: list[ClassSearchResultContractV1]
name: str
uri: str
class bsdd.LanguageContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

isoCode: str
name: str
class bsdd.OAuthReceiver

Bases: http.server.BaseHTTPRequestHandler

HTTP request handler base class.

The following explanation of HTTP serves to guide you through the code as well as to expose any misunderstandings I may have about HTTP (so you don’t need to read the code to figure out I’m wrong :-).

HTTP (HyperText Transfer Protocol) is an extensible protocol on top of a reliable stream transport (e.g. TCP/IP). The protocol recognizes three parts to a request:

  1. One line identifying the request type and path

  2. An optional set of RFC-822-style headers

  3. An optional data part

The headers and data are separated by a blank line.

The first line of the request has the form

<command> <path> <version>

where <command> is a (case-sensitive) keyword such as GET or POST, <path> is a string containing path information for the request, and <version> should be the string “HTTP/1.0” or “HTTP/1.1”. <path> is encoded using the URL encoding scheme (using %xx to signify the ASCII character with hex code xx).

The specification specifies that lines are separated by CRLF but for compatibility with the widest range of clients recommends servers also handle LF. Similarly, whitespace in the request line is treated sensibly (allowing multiple spaces between components and allowing trailing whitespace).

Similarly, for output, lines ought to be separated by CRLF pairs but most clients grok LF characters just fine.

If the first line of the request has the form

<command> <path>

(i.e. <version> is left out) then this is assumed to be an HTTP 0.9 request; this form has no optional headers and data part and the reply consists of just the data.

The reply form of the HTTP 1.x protocol again has three parts:

  1. One line giving the response code

  2. An optional set of RFC-822-style headers

  3. The data

Again, the headers and data are separated by a blank line.

The response code line has the form

<version> <responsecode> <responsestring>

where <version> is the protocol version (“HTTP/1.0” or “HTTP/1.1”), <responsecode> is a 3-digit response code indicating success or failure of the request, and <responsestring> is an optional human-readable string explaining what the response code means.

This server parses the request and the headers, and then calls a function specific to the request type (<command>). Specifically, a request SPAM will be handled by a method do_SPAM(). If no such method exists the server sends an error response to the client. If it exists, it is called with no arguments:

do_SPAM()

Note that the request name is case sensitive (i.e. SPAM and spam are different requests).

The various request details are stored in instance variables:

  • client_address is the client IP address in the form (host,

port);

  • command, path and version are the broken-down request line;

  • headers is an instance of email.message.Message (or a derived

class) containing the header information;

  • rfile is a file object open for reading positioned at the

start of the optional input data part;

  • wfile is a file object open for writing.

IT IS IMPORTANT TO ADHERE TO THE PROTOCOL FOR WRITING!

The first thing to be written must be the response line. Then follow 0 or more header lines, then a blank line, and then the actual data (if any). The meaning of the header lines depends on the command executed by the server; in most cases, when data is returned, there should be at least one header line of the form

Content-type: <type>/<subtype>

where <type> and <subtype> should be registered MIME types, e.g. “text/html” or “text/plain”.

do_GET()
class bsdd.PropertyClassContractV4

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

code: str
definition: str
description: str
name: str
propertySet: str
uri: str
class bsdd.PropertyContractV4

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

activationDateUtc: str
allowedValues: list[PropertyValueContractV4]
code: str
connectedPropertyCodes: list[str]
countriesOfUse: list[str]
countryOfOrigin: str
creatorLanguageCode: str
dataType: str
deActivationDateUtc: str
definition: str
deprecationExplanation: str
description: str
dictionaryUri: str
dimension: str
dimensionAmountOfSubstance: int
dimensionElectricCurrent: int
dimensionLength: int
dimensionLuminousIntensity: int
dimensionMass: int
dimensionThermodynamicTemperature: int
dimensionTime: int
documentReference: str
dynamicParameterPropertyCodes: list[str]
example: str
isDynamic: bool
maxExclusive: float
maxInclusive: float
methodOfMeasurement: str
minExclusive: float
minInclusive: float
name: str
pattern: str
physicalQuantity: str
propertyClasses: list[PropertyClassContractV4]
propertyRelations: list[PropertyRelationContractV4]
propertyValueKind: str
qudtCodes: list[str]
replacedObjectCodes: list[str]
replacingObjectCodes: list[str]
revisionDateUtc: str
revisionNumber: int
status: str
subdivisionsOfUse: list[str]
textFormat: str
uid: str
units: list[str]
uri: str
versionDateUtc: str
versionNumber: int
visualRepresentationUri: str
class bsdd.PropertyListItemContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

code: str
name: str
uri: str
class bsdd.PropertyRelationContractV4

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

relatedPropertyName: str
relatedPropertyUri: str
relationType: str
uri: str
class bsdd.PropertyValueContractV4

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

code: str
description: str
sortNumber: int
uri: str
value: str
class bsdd.ReferenceDocumentContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

date: str
name: str
title: str
class bsdd.SearchInDictionaryResponseContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

count: int
dictionary: DictionarySearchResultContractV1
offset: int
totalCount: int
class bsdd.TextSearchResponseClassContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

classType: str
description: str
dictionaryName: str
dictionaryUri: str
name: str
parentClassName: str
referenceCode: str
relatedIfcEntityNames: list[str]
uri: str
class bsdd.TextSearchResponseContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

classes: list[TextSearchResponseClassContractV1]
count: int
dictionaries: list[TextSearchResponseDictionaryContractV1]
offset: int
properties: list[TextSearchResponsePropertyContractV1]
totalCount: int
class bsdd.TextSearchResponseDictionaryContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

name: str
uri: str
class bsdd.TextSearchResponsePropertyContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

description: str
dictionaryName: str
dictionaryUri: str
name: str
uri: str
class bsdd.UnitContractV1

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

code: str
name: str
qudtUri: str
symbol: str
bsdd.apply_ifc_classification_properties(ifc_file, element, classificationProperties)
bsdd.ClassTypes
bsdd.Status