python-materialsdb is an unofficial python library for materialsdb.org an open format and database for building materials.
- serialiser.py :
- from xml : deserialise from materialsdb*.xsd compliant xml file
- to xml : serealise classes to a materialsdb*.xsd compliant xml file
- classes.py : generated classes corresponding to XML elements
- cache.py : cache latest materials data from producers
- config.py : set and get user config as language and country
- ifc/project_library.py : convert deserialised source into IFC (IfcProjectLibrary)
- classes_generator.py : generate classes (dataclasses except for simple type) for materialsdb*.xsd elements
Materials data are often localized. You can set your language and country this way:
from materialsdb import config
config.set_lang("fr")
config.set_country("CH")
Note: in materialsdb standard languages are ISO 639-1 codes and countries are ISO_3166-1_alpha-2 codes.
Check out some examples:
pip install python-materialsdb
- lxml (BSD) : xml parser
- ifcopenshell (LGPL) : ifc read/write
- materialsdb.org (GPL) : materials schema