{"id":43057,"date":"2026-10-09T19:52:47","date_gmt":"2026-10-09T17:52:47","guid":{"rendered":"https:\/\/smartdatamodels.org\/?p=43057"},"modified":"2026-10-09T19:52:47","modified_gmt":"2026-10-09T17:52:47","slug":"new-pysmartdatamodels-version-0-8-2-0-semantic-identification-for-data-spaces","status":"publish","type":"post","link":"https:\/\/smartdatamodels.org\/index.php\/new-pysmartdatamodels-version-0-8-2-0-semantic-identification-for-data-spaces\/","title":{"rendered":"New pysmartdatamodels Version 0.8.2.0: Semantic Identification for Data Spaces"},"content":{"rendered":"<p>We are happy to announce a new release of our Python package, <code>pysmartdatamodels<\/code>, version 0.8.2.0. The headline feature is aimed squarely at <b>data spaces<\/b>: a new function that can give semantic meaning to a payload even when the party who sent it never provided one.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-42965\" src=\"https:\/\/smartdatamodels.org\/wp-content\/uploads\/2026\/10\/pysmartdatamodels-300x67.jpg\" alt=\"\" width=\"300\" height=\"67\" srcset=\"https:\/\/smartdatamodels.org\/wp-content\/uploads\/2026\/10\/pysmartdatamodels-300x67.jpg 300w, https:\/\/smartdatamodels.org\/wp-content\/uploads\/2026\/10\/pysmartdatamodels-768x171.jpg 768w, https:\/\/smartdatamodels.org\/wp-content\/uploads\/2026\/10\/pysmartdatamodels-150x33.jpg 150w, https:\/\/smartdatamodels.org\/wp-content\/uploads\/2026\/10\/pysmartdatamodels.jpg 837w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<h3>What\u2019s New in This Version?<\/h3>\n<h4><b>Semantic identification for data spaces: identify_or_draft_datamodel()<\/b><\/h4>\n<p>In a data space, you routinely receive payloads from other participants with no guarantee they follow any particular standard. <code>identify_or_draft_datamodel()<\/code> takes any such payload and does one of two things:<\/p>\n<ul>\n<li>If it recognizes the payload as an existing Smart Data Model, it returns that model\u2019s real schema, together with a full validation of the payload against it.<\/li>\n<li>If it doesn\u2019t, it drafts a brand new schema.json on the spot \u2014 following the same structural conventions as a real Smart Data Model \u2014 so you have a ready-to-review starting point instead of nothing at all.<\/li>\n<\/ul>\n<p>It accepts the payload in any of the three formats actually used in practice \u2014 plain key-values, NGSI-v2 normalized, or NGSI-LD normalized \u2014 detecting and handling the right one automatically:<\/p>\n<pre lang=\"python3\">from pysmartdatamodels import pysmartdatamodels as sdm\r\n\r\npayload = {\r\n    \"id\": \"urn:ngsi-ld:WeatherObserved:station-042\",\r\n    \"type\": \"WeatherObserved\",\r\n    \"temperature\": 21.5,\r\n    \"relativeHumidity\": 0.6\r\n}\r\n\r\nresult = sdm.identify_or_draft_datamodel(payload)\r\nprint(result[\"schema\"][\"source\"])   # \"existing\" -- it recognized WeatherObserved\r\nprint(result[\"schema\"][\"validation\"][\"result\"])  # True<\/pre>\n<p>When the payload\u2019s own \u201ctype\u201d doesn\u2019t match anything, you can optionally ask it to try a softer, attribute-based match against the whole catalog before giving up and drafting a new schema:<\/p>\n<pre lang=\"python3\">result = sdm.identify_or_draft_datamodel(payload, fuzzy=True, fuzzy_threshold=0.3)<\/pre>\n<p>And when nothing matches at all, the drafted schema isn\u2019t just a bare shape guess \u2014 any attribute whose name is already established elsewhere in the catalog (over 160,000 attribute definitions) gets its real description, model reference, and units reused automatically, so only genuinely new attributes are left with a plain TODO placeholder.<\/p>\n<h4><b>A real validate_payload()<\/b><\/h4>\n<p><code>validate_payload(datamodel, subject, payload)<\/code> existed before but didn\u2019t actually validate anything. It now runs full JSON Schema validation against the live schema of the data model you name, confirms the payload\u2019s \u201ctype\u201d matches, and separately flags \u2013 without failing \u2013 any attribute that isn\u2019t part of the official definition.<\/p>\n<h4><b>Reliability and performance fixes<\/b><\/h4>\n<ul>\n<li><code>generate_sql_schema()<\/code> no longer crashes on attributes that can hold more than one type (e.g. a Property that can also be a Relationship), and no longer generates colliding enum type names when two unrelated models happen to share an attribute name.<\/li>\n<li><code>validate_data_model_schema()<\/code> no longer terminates your entire Python process on a bad input \u2014 it returns an error result like every other function in the package.<\/li>\n<li>The ~160,000-entry attribute database is now cached in memory instead of being re-read from disk on every single function call \u2014 noticeably faster for any code calling the per-attribute lookup functions in a loop.<\/li>\n<\/ul>\n<h3>Get the Latest Version<\/h3>\n<p>Update your installation with:<\/p>\n<pre lang=\"bash\">pip install --upgrade pysmartdatamodels<\/pre>\n<p><b>\u2794\ufe0f <a href=\"https:\/\/pypi.org\/project\/pysmartdatamodels\/0.8.2.0\/\" target=\"_blank\" rel=\"noopener\">Get the package on PyPI<\/a><\/b><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are happy to announce a new release of our Python package, pysmartdatamodels, version 0.8.2.0. The headline feature is aimed squarely at data spaces: a new function that can give semantic meaning to a payload even when the party who sent it never provided one. What\u2019s New in This Version?&#8230; <a class=\"continue-reading-link\" href=\"https:\/\/smartdatamodels.org\/index.php\/new-pysmartdatamodels-version-0-8-2-0-semantic-identification-for-data-spaces\/\">More&#8230;<\/a><\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[105,107,109,113,115,119,117,88,143,111,125,182,201],"tags":[],"class_list":["post-43057","post","type-post","status-publish","format-standard","hentry","category-cross-sector","category-smart-cities","category-smart-energy-domain","category-smart-environment","category-smart-manufacturing","category-smart-robotics","category-smart-water","category-smart-sensoring","category-smartaeronautics","category-smart-agrifood","category-smartdestinations","category-smarthealth","category-smartlogistics"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":10291,"url":"https:\/\/smartdatamodels.org\/index.php\/new-version-of-pysmartdatamodels-package-0-6-4-with-adaptations-to-data-spaces\/","url_meta":{"origin":43057,"position":0},"title":"New version of pysmartdatamodels package 0.6.4 with adaptations to Data Spaces","author":"maestro","date":"26\/02\/2024","format":false,"excerpt":"There is a new version of the python package pysmartdatamodels to use it you have just to type pip install pysmartdatamodels in your system Besides the update in the list of data models it includes two new functions - look_for_data_model that allows approximate searches for a data model based on\u2026","rel":"","context":"In &quot;Cross Sector&quot;","block_context":{"text":"Cross Sector","link":"https:\/\/smartdatamodels.org\/index.php\/category\/cross-sector\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2024\/02\/pysmartdatamodels_0.6.4.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":9334,"url":"https:\/\/smartdatamodels.org\/index.php\/new-version-of-the-python-package-pysmartdatamodels-0-6-0\/","url_meta":{"origin":43057,"position":1},"title":"New Version of the Python Package pysmartdatamodels 0.6.0","author":"maestro","date":"01\/08\/2023","format":false,"excerpt":"There is a new version of the python package for pysmartdatamodels 0.6.0. This python package includes all the data models and several functions to use them in your developments. Changelog: - Four new functions New functions to generate fake example files given the schema payload of the data model in\u2026","rel":"","context":"In &quot;Cross Sector&quot;","block_context":{"text":"Cross Sector","link":"https:\/\/smartdatamodels.org\/index.php\/category\/cross-sector\/"},"img":{"alt_text":"pysmartdatamodels 0.6.0","src":"https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2023\/08\/Screenshot-2023-08-01-at-09.34.53-300x162.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2023\/08\/Screenshot-2023-08-01-at-09.34.53-300x162.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2023\/08\/Screenshot-2023-08-01-at-09.34.53-300x162.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":10012,"url":"https:\/\/smartdatamodels.org\/index.php\/dcat-ap-catalogue-service-in-beta-version\/","url_meta":{"origin":43057,"position":2},"title":"DCAT-AP catalogue service in beta version","author":"maestro","date":"20\/10\/2023","format":false,"excerpt":"DCAT-AP is, possibly, the most relevant standard of a catalogue of datasets (even resources as well). A data spaces' data models' building block needs a semantic catalogue of resources in DCAT-AP format. Here you have the beta version of a service providing a DCAT-AP catalogue containing all semantic resources of\u2026","rel":"","context":"In &quot;Smart Cities domain&quot;","block_context":{"text":"Smart Cities domain","link":"https:\/\/smartdatamodels.org\/index.php\/category\/smart-cities\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10310,"url":"https:\/\/smartdatamodels.org\/index.php\/pysmartdatamodels-updated-to-0-7\/","url_meta":{"origin":43057,"position":3},"title":"pysmartdatamodels updated to 0.7","author":"maestro","date":"07\/03\/2024","format":false,"excerpt":"The new version does not provide new functionalities but an indication, including drafted code, about what is missing or in progress to the package can grow according to your needs. The source code for the new version 0.7.0 is here at the data-models repository There are 4 new functions drafted\u2026","rel":"","context":"In &quot;Cross Sector&quot;","block_context":{"text":"Cross Sector","link":"https:\/\/smartdatamodels.org\/index.php\/category\/cross-sector\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2024\/03\/Selection_515.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":8176,"url":"https:\/\/smartdatamodels.org\/index.php\/new-version-of-pysmartdatamodels-0-5-41\/","url_meta":{"origin":43057,"position":4},"title":"New version of pysmartdatamodels 0.5.41","author":"maestro","date":"30\/01\/2023","format":false,"excerpt":"There is a new version of the python package for smart data models\u00a0 pysmartdatamodels 0.5.41 Changelog: - The README include now the basic documentation of each function New function to load in a dictionary all subjects and their data models, with their repository link, and related domains New function to\u2026","rel":"","context":"In &quot;Cross Sector&quot;","block_context":{"text":"Cross Sector","link":"https:\/\/smartdatamodels.org\/index.php\/category\/cross-sector\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":32544,"url":"https:\/\/smartdatamodels.org\/index.php\/new-pysmartdatamodels-version-0-8-0-9-updated-to-1066-data-models\/","url_meta":{"origin":43057,"position":5},"title":"New pysmartdatamodels Version 0.8.0.9. Updated to 1066 data models","author":"maestro","date":"09\/03\/2026","format":false,"excerpt":"We are thrilled to announce a significant new release of our Python package, pysmartdatamodels, designed to empower developers and streamline the contribution process for our community. This update is packed with new data models till 6-3-26. Yo do not need to update the package if you use the function it\u2026","rel":"","context":"In &quot;Cross Sector&quot;","block_context":{"text":"Cross Sector","link":"https:\/\/smartdatamodels.org\/index.php\/category\/cross-sector\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2026\/03\/Screenshot-from-2026-03-07-20-55-08.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2026\/03\/Screenshot-from-2026-03-07-20-55-08.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2026\/03\/Screenshot-from-2026-03-07-20-55-08.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/posts\/43057","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/comments?post=43057"}],"version-history":[{"count":1,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/posts\/43057\/revisions"}],"predecessor-version":[{"id":43058,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/posts\/43057\/revisions\/43058"}],"wp:attachment":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/media?parent=43057"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/categories?post=43057"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/tags?post=43057"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}