{"id":453250,"date":"2019-07-26T11:07:21","date_gmt":"2019-07-26T11:07:21","guid":{"rendered":"https:\/\/nextgenlm.staging.wpengine.com\/?p=453250"},"modified":"2025-10-14T14:21:17","modified_gmt":"2025-10-14T19:21:17","slug":"an-introduction-to-python-3-7-data-classes","status":"publish","type":"post","link":"https:\/\/www.logicmonitor.com\/fr\/blog\/an-introduction-to-python-3-7-data-classes\/","title":{"rendered":"An Introduction to Python 3.7 Data Classes"},"content":{"rendered":"<?xml encoding=\"UTF-8\"><p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">Sometimes it&rsquo;s fun to just nerd out for a moment. Python is one of the most popular scripting languages today and we love it too. That&rsquo;s one reason why LogicMonitor can <\/span><a href=\"https:\/\/logicmonitor.com\/support\/terminology-syntax\/scripting-support\/external-scripting\"><span style=\"font-weight: 400;\">execute any script or programming language supported by your environment<\/span><\/a><span style=\"font-weight: 400;\">. That means you can enjoy the latest features of your favorite languages in your favorite monitoring tool (right?). If Python is your vice, give Python 3.7&rsquo;s Data Classes a try!<\/span><\/p><h2 class=\"wp-block-heading\" id=\"h-understanding-the-past-to-appreciate-the-present\"><span style=\"font-weight: 400;\">Understanding The Past to Appreciate the Present<\/span><\/h2><p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">Groovy, an extension of Java, and PowerShell are two languages that I believe strongly support OOP in a user-friendly way. They let you quickly manipulate custom objects and report their values. Python, while wildly popular and powerful, lagged a bit behind. To see some past examples, search the internet for &ldquo;Python print class attributes&rdquo;. At the time of this article, here are some of the top search results from one of the most popular developer resources, Stack Overflow:<\/span><\/p><ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/stackoverflow.com\/questions\/5969806\/print-all-properties-of-a-python-class\"><span style=\"font-weight: 400;\">Print all properties of a Python class [duplicate]<\/span><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/stackoverflow.com\/questions\/1215408\/how-to-list-all-class-properties\"><span style=\"font-weight: 400;\">How to list all class properties<\/span><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/stackoverflow.com\/questions\/1398022\/looping-over-all-member-variables-of-a-class-in-python\"><span style=\"font-weight: 400;\">Looping over all member variables of a class in python<\/span><\/a><\/li>\n<\/ul><p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">It&rsquo;s not much better if you try to search the <\/span><a href=\"https:\/\/docs.python.org\/2.7\/tutorial\/classes.html\"><span style=\"font-weight: 400;\">official Python 2.7 documentation for classes<\/span><\/a><span style=\"font-weight: 400;\">. Notice every time their examples print information about the classes they assume you already know exactly what you want to show, or, that you&rsquo;re willing to spend the time explicitly printing each class attribute?<\/span><\/p><p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">Based on the search results and answers, as well as my own experiences, I saw two main challenges for working with custom Python objects:<\/span><\/p><ol class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">There was no well-established, baseline method of printing class attributes. This led to users creating their own solutions, which were often incomplete, brittle, slow, or convoluted. Some of the accepted Stack Overflow answers can still leave you scratching your head, even if you&rsquo;re not new to Python.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Effective and clean solutions for printing class attributes, as seen in Stack Overflow answers, depended on knowledge of unnecessarily granular or specific Python features such as vars, dir, an object&rsquo;s internal dictionary, string formatting, or list comprehensions. While all of those things are worth learning, especially string formatting and list comprehensions, none of those should be required in order to print an object class&rsquo; attributes. Users are accustomed to using the simple syntax <\/span><span style=\"font-weight: 400;\">print some_variable<\/span><span style=\"font-weight: 400;\"> in order to display an item&rsquo;s value and it should be no different for classes.<\/span><\/li>\n<\/ol><p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">For those who are less script savvy, let&rsquo;s use an analogy to explain the problem. Let&rsquo;s picture a Python class object as a physical newspaper full of stories. You&rsquo;re the one who printed this newspaper. You already know the stories. You carefully placed each paragraph, story, and headline. In previous Python versions, when you handed the newspaper to Python and, as a sanity check, asked it to read you one of the news reports, it made you specify each paragraph you wanted read instead of just giving you the whole story. Cute when your toddler says that; frustrating and concerning when your 30 year old aspiring journalist says that.<\/span><\/p><h2 class=\"wp-block-heading\" id=\"h-python-starts-adulting\"><span style=\"font-weight: 400;\">Python Starts Adulting<\/span><\/h2><h3 class=\"wp-block-heading\" id=\"h-late-blooming-is-better-than-never-blooming\"><span style=\"font-weight: 400;\">Late Blooming is Better than Never Blooming<\/span><\/h3><p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">In 2017, <\/span><a href=\"https:\/\/www.python.org\/dev\/peps\/pep-0557\/\"><span style=\"font-weight: 400;\">PEP 557<\/span><\/a><span style=\"font-weight: 400;\"> conceptualized Data Classes, which &ldquo;exist primarily to store values which are accessible by attribute lookup&rdquo;, and nearly a year later, the release of Python 3.7.0 officially offered an implementation. Data Classes piggyback off of type hinting (<\/span><a href=\"https:\/\/www.python.org\/dev\/peps\/pep-0484\"><span style=\"font-weight: 400;\">PEP 484<\/span><\/a><span style=\"font-weight: 400;\">) and type annotations (<\/span><a href=\"https:\/\/www.python.org\/dev\/peps\/pep-0526\/\"><span style=\"font-weight: 400;\">PEP 526<\/span><\/a><span style=\"font-weight: 400;\">), respectively introduced in Python 3.5 and 3.6. When it comes to working with objects, people expect to be able to consistently predict data types. While Python still isn&rsquo;t a strictly typed language, the combination of type hinting and annotations helps both users and IDEs know what data types to expect when working through a larger codebase.<\/span><\/p><h3 class=\"wp-block-heading\" id=\"h-laziness-drives-automation\"><span style=\"font-weight: 400;\">Laziness Drives Automation<\/span><\/h3><p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">Another part of maturing is being honest about what you care about and how to spend more time focused on that. It&rsquo;s possible that it&rsquo;s just me, but I feel like DataClasses were undersold, or, someone really enjoys dealing with tedious processes. Exact words from <\/span><a href=\"https:\/\/www.python.org\/dev\/peps\/pep-0557\/#abstract\"><span style=\"font-weight: 400;\">PEP 557<\/span><\/a><span style=\"font-weight: 400;\"> regarding the Data Class are &ldquo;[&hellip;]there&rsquo;s really nothing special about the class: the decorator adds generated methods to the class and returns the same class it was given. [&hellip;] Data Classes save you from writing and maintaining these methods.&rdquo;.<\/span><\/p><p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">What are these &ldquo;generated methods&rdquo;? Fortunately the <\/span><a href=\"https:\/\/www.python.org\/dev\/peps\/pep-0557\/#abstract\"><span style=\"font-weight: 400;\">abstract of PEP 557<\/span><\/a><span style=\"font-weight: 400;\"> gives an example. Let&rsquo;s say you had a Python class defined as follows:<\/span><\/p><pre class=\"wp-block-preformatted\">@dataclass\nclass InventoryItem:\n    '''Class for keeping track of an item in inventory.'''\n    name: str\n    unit_price: float\n    quantity_on_hand: int = 0\n    def total_cost(self) -&gt; float:\n        return self.unit_price * self.quantity_on_hand\n<\/pre><p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">The Data Class decorator (&ldquo;@dataclass&rdquo;), therefore, would automatically generate the following code for you:<\/span><\/p><pre class=\"wp-block-preformatted\">def __init__(self, name: str, unit_price: float, quantity_on_hand: int = 0) -&gt; None:\n    self.name = name\n    self.unit_price = unit_price\n    self.quantity_on_hand = quantity_on_hand\ndef __repr__(self):\n    return f'InventoryItem(name={self.name!r}, unit_price={self.unit_price!r}, quantity_on_hand={self.quantity_on_hand!r})'\ndef __eq__(self, other):\n    if other.__class__ is self.__class__:\n        return (self.name, self.unit_price, self.quantity_on_hand) == (other.name, other.unit_price, other.quantity_on_hand)\n    return NotImplemented\ndef __ne__(self, other):\n    if other.__class__ is self.__class__:\n        return (self.name, self.unit_price, self.quantity_on_hand) != (other.name, other.unit_price, other.quantity_on_hand)\n    return NotImplemented\ndef __lt__(self, other):\n    if other.__class__ is self.__class__:\n        return (self.name, self.unit_price, self.quantity_on_hand) &lt; (other.name, other.unit_price, other.quantity_on_hand)\n    return NotImplemented\ndef __le__(self, other):\n    if other.__class__ is self.__class__:\n        return (self.name, self.unit_price, self.quantity_on_hand) &lt;= (other.name, other.unit_price, other.quantity_on_hand)\n    return NotImplemented\ndef __gt__(self, other):\n    if other.__class__ is self.__class__:\n        return (self.name, self.unit_price, self.quantity_on_hand) &gt; (other.name, other.unit_price, other.quantity_on_hand)\n    return NotImplemented\ndef __ge__(self, other):\n    if other.__class__ is self.__class__:\n        return (self.name, self.unit_price, self.quantity_on_hand) &gt;= (other.name, other.unit_price, other.quantity_on_hand)\n    return NotImplemented\n<\/pre><p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">Those <\/span><i><span style=\"font-weight: 400;\">thirty<\/span><\/i><span style=\"font-weight: 400;\"> lines of automatically generated code were for only <\/span><i><span style=\"font-weight: 400;\">three <\/span><\/i><span style=\"font-weight: 400;\">attributes: name, unit_price, and quantity_on_hand. The reason why I believe this is significantly undersold is because the level of effort to create and maintain those methods yourself becomes incredibly cumbersome as you add more class attributes. Who feels like dealing with that? Well, maybe Python contributor Eric V. Smith does but partially thanks to him, <\/span><i><span style=\"font-weight: 400;\">you<\/span><\/i><span style=\"font-weight: 400;\"> don&rsquo;t have to!<\/span><\/p><h2 class=\"wp-block-heading\" id=\"h-data-class-benefits\"><span style=\"font-weight: 400;\">Data Class Benefits<\/span><\/h2><p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">We can see a number of Data Class benefits based on the information we have thus far:<\/span><\/p><ol class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">Improved code legibility through more concise, declarative class format<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Fast, automatic setup or teardown of &ldquo;dunder&rdquo; (Double Underscore) methods<\/span>\n<ol class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">Initialization: saves the values you give the class when you instantiate it<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Representation: what you use to print a string description of the class and its attributes<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Equal To Comparison<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Not Equal To Comparison<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Less Than Comparison<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Less Than or Equal To Comparison<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Greater Than Comparison<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Greater Than or Equal To Comparison<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Frozen (immutable): what allows you to set and get attributes. With a &ldquo;frozen&rdquo; class, attributes can only be given initial values. Those values cannot be set again after initialization.<\/span><\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Quick, automated filtering of attributes included in string representation. This deserves its own bullet point from a maintainability perspective. As you declare attributes\/fields for the class, you can quickly specify whether it should be included when you print class details. While this doesn&rsquo;t offer any significant security benefit, it does help you reduce visual clutter without sacrificing your ability to save or process data.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Type hinting and annotations help you and your IDE track what methods and properties apply to your variables even as you start to add layers of abstraction. This is especially helpful if you&rsquo;re human like the rest of us and use code autocompletion.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Standard, concise way of printing a class and its attributes using the print statement:<\/span><\/span>\n<pre>print some_variable<\/pre>\n<\/li>\n<\/ol><h2 class=\"wp-block-heading\" id=\"h-data-class-caveats\"><span style=\"font-weight: 400;\">Data Class Caveats<\/span><\/h2><p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">Per <\/span><a href=\"https:\/\/www.python.org\/dev\/peps\/pep-0557\/\"><span style=\"font-weight: 400;\">PEP 557<\/span><\/a><span style=\"font-weight: 400;\">, Data Classes are not meant to be a full replacement of any other Python library. Furthermore, the PEP article states that Data Classes are not appropriate where:<\/span><\/p><ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">API compatibility with tuples or dicts is required.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Type validation beyond that provided by <\/span><a href=\"https:\/\/www.python.org\/dev\/peps\/pep-0484\/\"><span style=\"font-weight: 400;\">PEP 484<\/span><\/a><span style=\"font-weight: 400;\"> and <\/span><a href=\"https:\/\/www.python.org\/dev\/peps\/pep-0526\/\"><span style=\"font-weight: 400;\">526<\/span><\/a><span style=\"font-weight: 400;\"> is required, or value validation or conversion is required.<\/span><\/li>\n<\/ul><h2 class=\"wp-block-heading\" id=\"h-conclusion\"><span style=\"font-weight: 400;\">Conclusion<\/span><\/h2><p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">Python Data Classes combine existing Python features into a concise, declarative syntax in order to bring users an improved experience when managing classes used primarily for data storage. One of the key benefits of Python Data Classes is that you can quickly print string representations of classes and their attributes. Because of LogicMonitor&rsquo;s powerful extensibility, you can leverage Python Data Classes among all the other newest Python features in your <\/span><a href=\"https:\/\/logicmonitor.com\/support\/terminology-syntax\/scripting-support\/external-scripting\"><span style=\"font-weight: 400;\">monitoring<\/span><\/a><span style=\"font-weight: 400;\"> and <\/span><a href=\"https:\/\/logicmonitor.com\/support\/rest-api-developers-guide\"><span style=\"font-weight: 400;\">portal administration<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python is one of the most popular scripting languages today and we love it too. That\u2019s one reason why LogicMonitor can execute any script or programming language supported by your environment. That means can enjoy the latest features of your favorite languages in your favorite monitoring tool (right?). If Python is your vice, give Python 3.7\u2019s Data Classes a try, check out our latest blog to learn more!<\/p>\n","protected":false},"author":13,"featured_media":598240,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"unicorn_plugin_options_block_body_class":"","editor_notices":[],"footnotes":""},"categories":[5059,5035,5060],"tags":[5346,5367,6722],"industry":[6790],"role":[],"lm_strategic_tags":[],"topic":[],"class_list":["post-453250","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","industry-all"],"acf":{"page_language":"english","translated_pages":"","updated_date":null,"author_section_checkbox":true,"author_image":"","author_linkedin":"","author_name":"","author_job_title":"","author_dept":"","author_bio":"","reviewer_name":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.1 (Yoast SEO v28.1) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>An Introduction to Python 3.7 Data Classes - LogicMonitor Inc. French<\/title>\n<meta name=\"description\" content=\"Python is one of the most popular scripting languages today and we love it too. That\u2019s one reason why LogicMonitor can execute any script or programming language supported by your environment. That means can enjoy the latest features of your favorite languages in your favorite monitoring tool (right?).\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.logicmonitor.com\/fr\/blog\/an-introduction-to-python-3-7-data-classes\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"An Introduction to Python 3.7 Data Classes\" \/>\n<meta property=\"og:description\" content=\"Python is one of the most popular scripting languages today and we love it too. That\u2019s one reason why LogicMonitor can execute any script or programming language supported by your environment. That means can enjoy the latest features of your favorite languages in your favorite monitoring tool (right?). If Python is your vice, give Python 3.7\u2019s Data Classes a try, check out our latest blog to learn more!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.logicmonitor.com\/fr\/blog\/an-introduction-to-python-3-7-data-classes\/\" \/>\n<meta property=\"og:site_name\" content=\"LogicMonitor Inc. French\" \/>\n<meta property=\"article:published_time\" content=\"2019-07-26T11:07:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-14T19:21:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.logicmonitor.com\/fr\/wp-content\/uploads\/sites\/4\/2021\/10\/LogicMonitor_Bug_Meta-Tag-1024x568.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"568\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Muhammad Ali\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"An Introduction to Python 3.7 Data Classes\" \/>\n<meta name=\"twitter:description\" content=\"Python is one of the most popular scripting languages today and we love it too. That\u2019s one reason why LogicMonitor can execute any script or programming language supported by your environment. That means can enjoy the latest features of your favorite languages in your favorite monitoring tool (right?). If Python is your vice, give Python 3.7\u2019s Data Classes a try, check out our latest blog to learn more!\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/blog\\\/an-introduction-to-python-3-7-data-classes\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/blog\\\/an-introduction-to-python-3-7-data-classes\\\/\"},\"author\":{\"name\":\"Muhammad Ali\",\"@id\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/#\\\/schema\\\/person\\\/bf5df7726b6e08b72e8364a2064264b8\"},\"headline\":\"An Introduction to Python 3.7 Data Classes\",\"datePublished\":\"2019-07-26T11:07:21+00:00\",\"dateModified\":\"2025-10-14T19:21:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/blog\\\/an-introduction-to-python-3-7-data-classes\\\/\"},\"wordCount\":1201,\"image\":{\"@id\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/blog\\\/an-introduction-to-python-3-7-data-classes\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/wp-content\\\/uploads\\\/sites\\\/4\\\/2021\\\/10\\\/LogicMonitor_Bug_Meta-Tag.png\",\"keywords\":[\"api\",\"APM\",\"python\"],\"articleSection\":[\"Best Practices\",\"Blog\",\"Business Education\"],\"inLanguage\":\"fr-FR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/blog\\\/an-introduction-to-python-3-7-data-classes\\\/\",\"url\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/blog\\\/an-introduction-to-python-3-7-data-classes\\\/\",\"name\":\"An Introduction to Python 3.7 Data Classes - LogicMonitor Inc. French\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/blog\\\/an-introduction-to-python-3-7-data-classes\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/blog\\\/an-introduction-to-python-3-7-data-classes\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/wp-content\\\/uploads\\\/sites\\\/4\\\/2021\\\/10\\\/LogicMonitor_Bug_Meta-Tag.png\",\"datePublished\":\"2019-07-26T11:07:21+00:00\",\"dateModified\":\"2025-10-14T19:21:17+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/#\\\/schema\\\/person\\\/bf5df7726b6e08b72e8364a2064264b8\"},\"description\":\"Python is one of the most popular scripting languages today and we love it too. That\u2019s one reason why LogicMonitor can execute any script or programming language supported by your environment. That means can enjoy the latest features of your favorite languages in your favorite monitoring tool (right?).\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/blog\\\/an-introduction-to-python-3-7-data-classes\\\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/blog\\\/an-introduction-to-python-3-7-data-classes\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/blog\\\/an-introduction-to-python-3-7-data-classes\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/wp-content\\\/uploads\\\/sites\\\/4\\\/2021\\\/10\\\/LogicMonitor_Bug_Meta-Tag.png\",\"contentUrl\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/wp-content\\\/uploads\\\/sites\\\/4\\\/2021\\\/10\\\/LogicMonitor_Bug_Meta-Tag.png\",\"width\":2400,\"height\":1332},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/blog\\\/an-introduction-to-python-3-7-data-classes\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"An Introduction to Python 3.7 Data Classes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/#website\",\"url\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/\",\"name\":\"LogicMonitor Inc. French\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/#\\\/schema\\\/person\\\/bf5df7726b6e08b72e8364a2064264b8\",\"name\":\"Muhammad Ali\",\"url\":\"https:\\\/\\\/www.logicmonitor.com\\\/fr\\\/blog\\\/author\\\/muhammad-ali\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"An Introduction to Python 3.7 Data Classes - LogicMonitor Inc. French","description":"Python is one of the most popular scripting languages today and we love it too. That\u2019s one reason why LogicMonitor can execute any script or programming language supported by your environment. That means can enjoy the latest features of your favorite languages in your favorite monitoring tool (right?).","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.logicmonitor.com\/fr\/blog\/an-introduction-to-python-3-7-data-classes\/","og_locale":"fr_FR","og_type":"article","og_title":"An Introduction to Python 3.7 Data Classes","og_description":"Python is one of the most popular scripting languages today and we love it too. That\u2019s one reason why LogicMonitor can execute any script or programming language supported by your environment. That means can enjoy the latest features of your favorite languages in your favorite monitoring tool (right?). If Python is your vice, give Python 3.7\u2019s Data Classes a try, check out our latest blog to learn more!","og_url":"https:\/\/www.logicmonitor.com\/fr\/blog\/an-introduction-to-python-3-7-data-classes\/","og_site_name":"LogicMonitor Inc. French","article_published_time":"2019-07-26T11:07:21+00:00","article_modified_time":"2025-10-14T19:21:17+00:00","og_image":[{"width":1024,"height":568,"url":"https:\/\/www.logicmonitor.com\/fr\/wp-content\/uploads\/sites\/4\/2021\/10\/LogicMonitor_Bug_Meta-Tag-1024x568.png","type":"image\/png"}],"author":"Muhammad Ali","twitter_card":"summary_large_image","twitter_title":"An Introduction to Python 3.7 Data Classes","twitter_description":"Python is one of the most popular scripting languages today and we love it too. That\u2019s one reason why LogicMonitor can execute any script or programming language supported by your environment. That means can enjoy the latest features of your favorite languages in your favorite monitoring tool (right?). If Python is your vice, give Python 3.7\u2019s Data Classes a try, check out our latest blog to learn more!","twitter_misc":{"Written by":"","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.logicmonitor.com\/fr\/blog\/an-introduction-to-python-3-7-data-classes\/#article","isPartOf":{"@id":"https:\/\/www.logicmonitor.com\/fr\/blog\/an-introduction-to-python-3-7-data-classes\/"},"author":{"name":"Muhammad Ali","@id":"https:\/\/www.logicmonitor.com\/fr\/#\/schema\/person\/bf5df7726b6e08b72e8364a2064264b8"},"headline":"An Introduction to Python 3.7 Data Classes","datePublished":"2019-07-26T11:07:21+00:00","dateModified":"2025-10-14T19:21:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.logicmonitor.com\/fr\/blog\/an-introduction-to-python-3-7-data-classes\/"},"wordCount":1201,"image":{"@id":"https:\/\/www.logicmonitor.com\/fr\/blog\/an-introduction-to-python-3-7-data-classes\/#primaryimage"},"thumbnailUrl":"https:\/\/www.logicmonitor.com\/fr\/wp-content\/uploads\/sites\/4\/2021\/10\/LogicMonitor_Bug_Meta-Tag.png","keywords":["api","APM","python"],"articleSection":["Best Practices","Blog","Business Education"],"inLanguage":"fr-FR"},{"@type":"WebPage","@id":"https:\/\/www.logicmonitor.com\/fr\/blog\/an-introduction-to-python-3-7-data-classes\/","url":"https:\/\/www.logicmonitor.com\/fr\/blog\/an-introduction-to-python-3-7-data-classes\/","name":"An Introduction to Python 3.7 Data Classes - LogicMonitor Inc. French","isPartOf":{"@id":"https:\/\/www.logicmonitor.com\/fr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.logicmonitor.com\/fr\/blog\/an-introduction-to-python-3-7-data-classes\/#primaryimage"},"image":{"@id":"https:\/\/www.logicmonitor.com\/fr\/blog\/an-introduction-to-python-3-7-data-classes\/#primaryimage"},"thumbnailUrl":"https:\/\/www.logicmonitor.com\/fr\/wp-content\/uploads\/sites\/4\/2021\/10\/LogicMonitor_Bug_Meta-Tag.png","datePublished":"2019-07-26T11:07:21+00:00","dateModified":"2025-10-14T19:21:17+00:00","author":{"@id":"https:\/\/www.logicmonitor.com\/fr\/#\/schema\/person\/bf5df7726b6e08b72e8364a2064264b8"},"description":"Python is one of the most popular scripting languages today and we love it too. That\u2019s one reason why LogicMonitor can execute any script or programming language supported by your environment. That means can enjoy the latest features of your favorite languages in your favorite monitoring tool (right?).","breadcrumb":{"@id":"https:\/\/www.logicmonitor.com\/fr\/blog\/an-introduction-to-python-3-7-data-classes\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.logicmonitor.com\/fr\/blog\/an-introduction-to-python-3-7-data-classes\/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/www.logicmonitor.com\/fr\/blog\/an-introduction-to-python-3-7-data-classes\/#primaryimage","url":"https:\/\/www.logicmonitor.com\/fr\/wp-content\/uploads\/sites\/4\/2021\/10\/LogicMonitor_Bug_Meta-Tag.png","contentUrl":"https:\/\/www.logicmonitor.com\/fr\/wp-content\/uploads\/sites\/4\/2021\/10\/LogicMonitor_Bug_Meta-Tag.png","width":2400,"height":1332},{"@type":"BreadcrumbList","@id":"https:\/\/www.logicmonitor.com\/fr\/blog\/an-introduction-to-python-3-7-data-classes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.logicmonitor.com\/fr\/"},{"@type":"ListItem","position":2,"name":"An Introduction to Python 3.7 Data Classes"}]},{"@type":"WebSite","@id":"https:\/\/www.logicmonitor.com\/fr\/#website","url":"https:\/\/www.logicmonitor.com\/fr\/","name":"LogicMonitor Inc. French","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.logicmonitor.com\/fr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Person","@id":"https:\/\/www.logicmonitor.com\/fr\/#\/schema\/person\/bf5df7726b6e08b72e8364a2064264b8","name":"Muhammad Ali","url":"https:\/\/www.logicmonitor.com\/fr\/blog\/author\/muhammad-ali\/"}]}},"_links":{"self":[{"href":"https:\/\/www.logicmonitor.com\/fr\/wp-json\/wp\/v2\/posts\/453250","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.logicmonitor.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.logicmonitor.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.logicmonitor.com\/fr\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.logicmonitor.com\/fr\/wp-json\/wp\/v2\/comments?post=453250"}],"version-history":[{"count":0,"href":"https:\/\/www.logicmonitor.com\/fr\/wp-json\/wp\/v2\/posts\/453250\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.logicmonitor.com\/fr\/wp-json\/wp\/v2\/media\/598240"}],"wp:attachment":[{"href":"https:\/\/www.logicmonitor.com\/fr\/wp-json\/wp\/v2\/media?parent=453250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.logicmonitor.com\/fr\/wp-json\/wp\/v2\/categories?post=453250"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.logicmonitor.com\/fr\/wp-json\/wp\/v2\/tags?post=453250"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.logicmonitor.com\/fr\/wp-json\/wp\/v2\/industry?post=453250"},{"taxonomy":"role","embeddable":true,"href":"https:\/\/www.logicmonitor.com\/fr\/wp-json\/wp\/v2\/role?post=453250"},{"taxonomy":"lm_strategic_tags","embeddable":true,"href":"https:\/\/www.logicmonitor.com\/fr\/wp-json\/wp\/v2\/lm_strategic_tags?post=453250"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.logicmonitor.com\/fr\/wp-json\/wp\/v2\/topic?post=453250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}