{"id":10392,"date":"2024-08-18T19:38:06","date_gmt":"2024-08-18T17:38:06","guid":{"rendered":"https:\/\/smartdatamodels.org\/?p=10392"},"modified":"2024-08-18T19:38:06","modified_gmt":"2024-08-18T17:38:06","slug":"pydantic-export-now-available","status":"publish","type":"post","link":"https:\/\/smartdatamodels.org\/index.php\/pydantic-export-now-available\/","title":{"rendered":"pydantic export now available"},"content":{"rendered":"<p>The directory \/code\/ (see image with <a href=\"https:\/\/github.com\/smart-data-models\/dataModel.Energy\/tree\/master\/InverterDevice\/code\">one example<\/a>)\u00a0 in every data model has now a new draft export the <strong>pydantic<\/strong> export.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-10394 size-medium\" src=\"https:\/\/smartdatamodels.org\/wp-content\/uploads\/2024\/08\/pydantic-300x300.jpg\" alt=\"\" width=\"300\" height=\"300\" srcset=\"https:\/\/smartdatamodels.org\/wp-content\/uploads\/2024\/08\/pydantic-300x300.jpg 300w, https:\/\/smartdatamodels.org\/wp-content\/uploads\/2024\/08\/pydantic-150x150.jpg 150w, https:\/\/smartdatamodels.org\/wp-content\/uploads\/2024\/08\/pydantic-350x350.jpg 350w, https:\/\/smartdatamodels.org\/wp-content\/uploads\/2024\/08\/pydantic.jpg 400w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Pydantic is a Python library that provides data validation and settings management using Python type annotations, allowing you to define data models that enforce type constraints and validate data automatically.<\/p>\n<p>Now in most (if not all) data models you have such export to use it freely. Mind that is a first version and errors could happen (It is welcomed if <a href=\"mailto:info@smartdatamodels.org\">you find any error<\/a> or just make a suggestion)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10393\" src=\"https:\/\/smartdatamodels.org\/wp-content\/uploads\/2024\/08\/pydantic_export.png\" alt=\"\" width=\"1200\" height=\"425\" srcset=\"https:\/\/smartdatamodels.org\/wp-content\/uploads\/2024\/08\/pydantic_export.png 1200w, https:\/\/smartdatamodels.org\/wp-content\/uploads\/2024\/08\/pydantic_export-300x106.png 300w, https:\/\/smartdatamodels.org\/wp-content\/uploads\/2024\/08\/pydantic_export-1024x363.png 1024w, https:\/\/smartdatamodels.org\/wp-content\/uploads\/2024\/08\/pydantic_export-768x272.png 768w, https:\/\/smartdatamodels.org\/wp-content\/uploads\/2024\/08\/pydantic_export-900x319.png 900w, https:\/\/smartdatamodels.org\/wp-content\/uploads\/2024\/08\/pydantic_export-150x53.png 150w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The directory \/code\/ (see image with one example)\u00a0 in every data model has now a new draft export the pydantic export. Pydantic is a Python library that provides data validation and settings management using Python type annotations, allowing you to define data models that enforce type constraints and validate data&#8230; <a class=\"continue-reading-link\" href=\"https:\/\/smartdatamodels.org\/index.php\/pydantic-export-now-available\/\">More&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","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":false,"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-10392","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":2522,"url":"https:\/\/smartdatamodels.org\/index.php\/new-export-format-for-data-models\/","url_meta":{"origin":10392,"position":0},"title":"New export format for data models","author":"maestro","date":"01\/06\/2021","format":false,"excerpt":"The README of the different data models now contains a new option, to export the payloads as a geojson feature. It is a new line at the README of every data model. It provides actual results when the data model has Geoproperties. Otherwise, a warning message is replied to the\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\/2021\/05\/geojsonfeature.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2021\/05\/geojsonfeature.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2021\/05\/geojsonfeature.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2021\/05\/geojsonfeature.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":10091,"url":"https:\/\/smartdatamodels.org\/index.php\/new-service-export-you-data-models-to-sql-schema\/","url_meta":{"origin":10392,"position":1},"title":"New service: Export you data models to SQL schema","author":"maestro","date":"30\/10\/2023","format":false,"excerpt":"We provide a service to Generate a PostgreSQL schema SQL script from the model.yaml representation of a Smart Data Model. You can access this service under this link following Tools > SQL service. You need to provide as input the standard GitHub link to the model.yaml file or the raw\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":"https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2023\/10\/Screen-Shot-2023-10-30-at-17.14.41-300x201.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":10392,"position":2},"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":7921,"url":"https:\/\/smartdatamodels.org\/index.php\/sql-export-available-for-postgresql\/","url_meta":{"origin":10392,"position":3},"title":"SQL export available for Postgresql","author":"maestro","date":"21\/12\/2022","format":false,"excerpt":"There is a new file 'schema.sql' in all the directories of the data models. It is a SQL script for PostgreSQL. The script creates the structure of a relational table containing the attributes defined in the data model. It also creates the data types for those attributes with an enumeration\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":2603,"url":"https:\/\/smartdatamodels.org\/index.php\/microsoft-digital-twins-export-dtdl-in-beta\/","url_meta":{"origin":10392,"position":4},"title":"Microsoft digital twins export DTDL in beta","author":"maestro","date":"09\/06\/2021","format":false,"excerpt":"We have created an export of Smart Data Models in DTDL format. You'll see them in the root directory named schemaDTDL.json. A bit more than 500 models have got it because we are in the process of a final complete mapping between the possibilities of JSON schema and DTDL. This\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":1445,"url":"https:\/\/smartdatamodels.org\/index.php\/improved-the-database-of-properties\/","url_meta":{"origin":10392,"position":5},"title":"Improved the database of properties","author":"maestro","date":"26\/01\/2021","format":false,"excerpt":"The database for the searching on data models, properties and their descriptions has been expanded to allow filtering also by : NGSI type (one of Property, Relationship or Geoproperty) data type (string, number, boolean, array, object, etc) Additionally, it has been updated containing more than 11.000 items Accessible from the\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\/2021\/01\/search_database.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2021\/01\/search_database.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2021\/01\/search_database.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2021\/01\/search_database.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/posts\/10392","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=10392"}],"version-history":[{"count":0,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/posts\/10392\/revisions"}],"wp:attachment":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/media?parent=10392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/categories?post=10392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/tags?post=10392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}