{"id":8157,"date":"2023-01-27T01:20:02","date_gmt":"2023-01-27T00:20:02","guid":{"rendered":"https:\/\/smartdatamodels.org\/?p=8157"},"modified":"2023-01-27T01:37:46","modified_gmt":"2023-01-27T00:37:46","slug":"the-data-models-available-for-python-developers-pysmartdatamodels-0-5-40-published-beta-version","status":"publish","type":"post","link":"https:\/\/smartdatamodels.org\/index.php\/the-data-models-available-for-python-developers-pysmartdatamodels-0-5-40-published-beta-version\/","title":{"rendered":"The data models available for python developers. pysmartdatamodels 0.5.40 published. Beta version."},"content":{"rendered":"<p>Now you can find in pypi.org the python package <strong><span style=\"color: #0000ff;\">pysmartdatamodels<\/span><\/strong> with 13 functions for the integrators of the data models (more than 800) in external systems and applications. It is a beta version. There is a function, <em>update_data()<\/em> that whenever is run, it updates the data models to the last version (including adding the new data models). The <a href=\"https:\/\/github.com\/smart-data-models\/data-models\/tree\/master\/pysmartdatamodels\">code is available at the utils directory.<\/a><br \/>\nThis python package includes all the data models and several functions (listed below) to use in your developments.<\/p>\n<p>If you want to be updated on this package you can join this <a href=\"https:\/\/smartdatamodels.org\/index.php\/developers-list\/\">mailing list<\/a> (Announcements are sent only when something relevant happens). We love to get your feedback at info@smartdatamodels.org<\/p>\n<p>There are several online tools to manage and to create the data models, <a href=\"https:\/\/smartdatamodels.org\/index.php\/generate-a-ngsi-ld-keyvalues-payload-compliant-with-a-data-model\/\">generate examples<\/a> or to adapt to <a href=\"https:\/\/smartdatamodels.org\/index.php\/generate-acontext-based-on-external-ontologies-iris\/\">existing ontologies.<\/a> See the tools menu option at the <a href=\"https:\/\/smartdatamodels.org\">home site<\/a>.<\/p>\n<h3>Functions available include:<\/h3>\n<p>1- List all data models. Function list_all_datamodels()<br \/>\n2- List all subjects. Function list_all_subjects()<br \/>\n3- List the data models of a subject. Function datamodels_subject(subject)<br \/>\n4- List description of an attribute. Function description_attribute(subject, datamodel, attribute)<br \/>\n5- List data-type of an attribute. Function datatype_attribute(subject, datamodel, attribute)<br \/>\n6- Give reference model for an attribute. Function model_attribute(subject, datamodel, attribute)<br \/>\n7- Give reference units for an attribute. Function attributes_datamodel(subject, datamodel)<br \/>\n8- List the attributes of a data model. Function attributes_datamodel(subject, datamodel)<br \/>\n9- List the NGSI type (Property, Relationship or Geoproperty) of the attribute. Function ngsi_datatype_attribute(subject, datamodel, attribute)<br \/>\n10- Print a list of data models attributes separated by a separator. Function print_datamodel(subject, datamodel, separator, meta_attributes)<br \/>\n11- Returns the link to the repository of a subject. Function subject_repolink(subject)<br \/>\n12- Returns the links to the repositories of a data model name. Function datamodel_repolink(datamodel)<br \/>\n13- Update the official data model list or the database of attributes from the source. Function update_data()<\/p>\n<h3>Roadmap<\/h3>\n<p>1.- Create a proper documentation<\/p>\n<p>2.- Function to allow submission of improvements (i.e. missing recommended units or model) and comments to the different data models. Currently, you can do it by searching for your data model here<br \/>\n<a href=\"https:\/\/smartdatamodels.org\/index.php\/list-of-data-models-3\/\">https:\/\/smartdatamodels.org\/index.php\/list-of-data-models-3\/<\/a> visiting the github repo and making your PR or raising your issues there.<br \/>\n3.- Function to submit a new data model to an incubation repository. Currently, this is done manually <a href=\"https:\/\/github.com\/smart-data-models\/incubated\/tree\/master\">incubated repository<\/a>. By filling this <a href=\"https:\/\/smartdatamodels.org\/index.php\/new-incubated-data-models\/\">form<\/a> you are granted to contribute with new data models.<br \/>\n4.- Include new functions like search for the subject of a data model or other that you can suggest to us at <a href=\"mailto:info@smartdatamodels.org\">info@smartdatamodels.org<\/a><\/p>\n<pre>### some example code\r\nfrom pysmartdatamodels import pysmartdatamodels as sdm\r\nsubject = \"dataModel.Weather\"\r\ndataModel = \"WeatherForecast\"\r\nattribute = \"precipitation\"\r\nprint(sdm.list_all_datamodels())\r\nprint(sdm.list_all_subjects())\r\nprint(sdm.datamodels_subject(\"dataModel.Weather\"))\r\nprint(sdm.description_attribute(subject, dataModel, attribute))\r\nprint(sdm.datatype_attribute(subject, dataModel, attribute))\r\nprint(sdm.model_attribute(subject, dataModel, attribute))\r\nprint(sdm.units_attribute(subject, dataModel, attribute))\r\nprint(sdm.attributes_datamodel(subject, dataModel))\r\nprint(sdm.subject_repolink(subject))\r\nprint(sdm.datamodel_repolink(dataModel))\r\nprint(sdm.print_datamodel(subject, dataModel, \",\", [\"property\", \"type\", \"dataModel\", \"repoName\", \"description\", \"typeNGSI\", \"modelTags\", \"format\", \"units\", \"model\"]))\r\nsdm.update_data()<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Now you can find in pypi.org the python package pysmartdatamodels with 13 functions for the integrators of the data models (more than 800) in external systems and applications. It is a beta version. There is a function, update_data() that whenever is run, it updates the data models to the last&#8230; <a class=\"continue-reading-link\" href=\"https:\/\/smartdatamodels.org\/index.php\/the-data-models-available-for-python-developers-pysmartdatamodels-0-5-40-published-beta-version\/\">More&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"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}},"categories":[105,84,107,109,113,115,119,117,88,143,111,125,182,201],"tags":[],"class_list":["post-8157","post","type-post","status-publish","format-standard","hentry","category-cross-sector","category-governance","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_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":10356,"url":"https:\/\/smartdatamodels.org\/index.php\/new-version-of-pysmartdatamodels-python-package-0-7-1\/","url_meta":{"origin":8157,"position":0},"title":"New version of pysmartdatamodels python package 0.7.1","author":"maestro","date":"07\/05\/2024","format":false,"excerpt":"The changes in this new version are: - Including new function validate_dcat_ap_distribution_sdm - Updating the comments of most of the functions - Some code improvements by jilin.he@fiware.org - Included a new directory with templates for the creation of a data model. Not used yet but next version they will be\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\/05\/pysmartdatamodels_0.7.1.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":8157,"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":9905,"url":"https:\/\/smartdatamodels.org\/index.php\/new-version-of-the-python-package-pysmartdatamodels-0-6-1\/","url_meta":{"origin":8157,"position":2},"title":"New Version of the Python Package pysmartdatamodels 0.6.1","author":"maestro","date":"09\/10\/2023","format":false,"excerpt":"There is a new version of the python package for pysmartdatamodels 0.6.1. This python package includes all the data models and several functions to use them in your developments. Changelog: - Two updated functions New extension for function update_broker() to allow updating nonexistent attribute into broker Function validate_data_model_schema(), with wider\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\/2023\/10\/Screenshot-2023-10-09-at-13.59.19-1024x685.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-09-at-13.59.19-1024x685.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-09-at-13.59.19-1024x685.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-09-at-13.59.19-1024x685.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":7846,"url":"https:\/\/smartdatamodels.org\/index.php\/draft-of-a-python-package-available\/","url_meta":{"origin":8157,"position":3},"title":"Draft of a python package available","author":"maestro","date":"12\/12\/2022","format":false,"excerpt":"Now we have a draft version of a python package to integrate the smart data models with your developments. It is a beta version so you can expect some issues when using it. We will be glad if you report it at info@smartdatamodels.org or suggest new features. Thanks to Anthony\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\/2022\/11\/python-logo-master-v3-TM-flattened.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2022\/11\/python-logo-master-v3-TM-flattened.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2022\/11\/python-logo-master-v3-TM-flattened.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":23510,"url":"https:\/\/smartdatamodels.org\/index.php\/new-pysmartdatamodels-version-0-8-0-2-enhanced-with-more-models-and-automated-contributor-tools\/","url_meta":{"origin":8157,"position":4},"title":"New pysmartdatamodels Version 0.8.0.2: Enhanced with More Models and Automated Contributor Tools","author":"maestro","date":"13\/08\/2025","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 and, most notably, powerful new validation and testing services. What's New in This Version? An Expanded\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":8157,"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":[]}],"_links":{"self":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/posts\/8157","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/comments?post=8157"}],"version-history":[{"count":3,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/posts\/8157\/revisions"}],"predecessor-version":[{"id":8161,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/posts\/8157\/revisions\/8161"}],"wp:attachment":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/media?parent=8157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/categories?post=8157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/tags?post=8157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}