{"id":7846,"date":"2022-12-12T09:24:42","date_gmt":"2022-12-12T08:24:42","guid":{"rendered":"https:\/\/smartdatamodels.org\/?p=7846"},"modified":"2022-12-12T09:24:42","modified_gmt":"2022-12-12T08:24:42","slug":"draft-of-a-python-package-available","status":"publish","type":"post","link":"https:\/\/smartdatamodels.org\/index.php\/draft-of-a-python-package-available\/","title":{"rendered":"Draft of a python package available"},"content":{"rendered":"<p>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 <span class=\"p-name vcard-fullname d-block overflow-hidden\"><a href=\"https:\/\/github.com\/auphofBSF\">Anthony Uphof<\/a> for his contributions (only a few of them are in this draft, next version will include them)<br \/>\n<\/span><\/p>\n<p>To install<\/p>\n<p><span class=\"css-901oao css-16my406 r-poiln3 r-bcqeeo r-qvutc0\">pip install -i <\/span><a class=\"css-4rbku5 css-18t94o4 css-901oao css-16my406 r-1cvl2hr r-1loqt21 r-poiln3 r-bcqeeo r-qvutc0\" dir=\"ltr\" role=\"link\" href=\"https:\/\/t.co\/GipS7SwJjp\" target=\"_blank\" rel=\"noopener noreferrer nofollow\"><span class=\"css-901oao css-16my406 r-poiln3 r-hiw28u r-qvk6io r-bcqeeo r-qvutc0\" aria-hidden=\"true\">https:\/\/<\/span>test.pypi.org\/simple\/<\/a><span class=\"css-901oao css-16my406 r-poiln3 r-bcqeeo r-qvutc0\"> pysmartdatamodels <\/span><\/p>\n<p>The functions included are:<\/p>\n<p>1- List all data models. Function list_all_datamodels()<\/p>\n<p>2- List all subjects. Function list_all_subjects()<\/p>\n<p>3- List the data models of a subject. Function datamodels_subject(subject)<\/p>\n<p>4- List description of an attribute. Function description_attribute(subject, datamodel, attribute)<\/p>\n<p>5- List data-type of an attribute. Function datatype_attribute(subject, datamodel, attribute)<\/p>\n<p>6- Give reference model for an attribute. Function model_attribute(subject, datamodel, attribute)<\/p>\n<p>7- Give reference units for an attribute. Function attributes_datamodel(subject, datamodel)<\/p>\n<p>8- List the attributes of a data model. Function attributes_datamodel(subject, datamodel)<\/p>\n<p>9- List the NGSI type (Property, Relationship or Geoproperty) of the attribute. Function ngsi_datatype_attribute(subject, datamodel, attribute)<\/p>\n<p>11- Print a list of data models attributes separated by a separator. Function print_datamodel(subject, datamodel, separator, meta_attributes)<\/p>\n<p>12- Update the official data model list or the database of attributes from the source. Function update_data()<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7672\" src=\"https:\/\/smartdatamodels.org\/wp-content\/uploads\/2022\/11\/python-logo-master-v3-TM-flattened.png\" alt=\"\" width=\"601\" height=\"203\" srcset=\"https:\/\/smartdatamodels.org\/wp-content\/uploads\/2022\/11\/python-logo-master-v3-TM-flattened.png 601w, https:\/\/smartdatamodels.org\/wp-content\/uploads\/2022\/11\/python-logo-master-v3-TM-flattened-300x101.png 300w, https:\/\/smartdatamodels.org\/wp-content\/uploads\/2022\/11\/python-logo-master-v3-TM-flattened-150x51.png 150w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8230; <a class=\"continue-reading-link\" href=\"https:\/\/smartdatamodels.org\/index.php\/draft-of-a-python-package-available\/\">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,107,109,113,115,119,117,88,143,111,125,182,201],"tags":[],"class_list":["post-7846","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_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":9905,"url":"https:\/\/smartdatamodels.org\/index.php\/new-version-of-the-python-package-pysmartdatamodels-0-6-1\/","url_meta":{"origin":7846,"position":0},"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":9334,"url":"https:\/\/smartdatamodels.org\/index.php\/new-version-of-the-python-package-pysmartdatamodels-0-6-0\/","url_meta":{"origin":7846,"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":10356,"url":"https:\/\/smartdatamodels.org\/index.php\/new-version-of-pysmartdatamodels-python-package-0-7-1\/","url_meta":{"origin":7846,"position":2},"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":10376,"url":"https:\/\/smartdatamodels.org\/index.php\/version-0-8-of-the-pysmartdatamodels-package\/","url_meta":{"origin":7846,"position":3},"title":"Version 0.8 of the pysmartdatamodels package","author":"maestro","date":"24\/05\/2024","format":false,"excerpt":"Due to the new configuration of files of the package pysmartdatamodels it will be no longer required to use the from clause (initially) Therefore now to import the package in python it will be simply import pysmartdatamodels as sdm Accordingly the examples of code in all data models are being\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\/pysdm0.8.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":10291,"url":"https:\/\/smartdatamodels.org\/index.php\/new-version-of-pysmartdatamodels-package-0-6-4-with-adaptations-to-data-spaces\/","url_meta":{"origin":7846,"position":4},"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":8176,"url":"https:\/\/smartdatamodels.org\/index.php\/new-version-of-pysmartdatamodels-0-5-41\/","url_meta":{"origin":7846,"position":5},"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":[]}],"_links":{"self":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/posts\/7846","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=7846"}],"version-history":[{"count":2,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/posts\/7846\/revisions"}],"predecessor-version":[{"id":7848,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/posts\/7846\/revisions\/7848"}],"wp:attachment":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/media?parent=7846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/categories?post=7846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/tags?post=7846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}