{"id":178810,"date":"2023-07-25T10:44:59","date_gmt":"2023-07-25T10:44:59","guid":{"rendered":"https:\/\/ded9.com\/?p=178810"},"modified":"2026-01-08T09:13:46","modified_gmt":"2026-01-08T09:13:46","slug":"decorators-in-python-and-how-to-implement-them","status":"publish","type":"post","link":"https:\/\/ded9.com\/tr\/decorators-in-python-and-how-to-implement-them\/","title":{"rendered":"Decorators in Python and How to Implement Them \u2013 Practical Guide"},"content":{"rendered":"<p>Decorators In Python Are A Type Of Functions That Can Be Used To Change The Behavior Of A Function Or Class.<\/p>\n<p>These changes can include adding functionality to a function, modifying a process&#8217;s inputs or outputs, or altering a class&#8217;s behavior. Decorators are applied to a part or type using the @ character. A decorated function can be executed again with a different name. This feature makes decorators useful for modifying the behavior of many tasks in a program.<\/p>\n<p>In\u00a0<strong style=\"font-style: inherit;\">Python<\/strong>, various valuable decorators can be used to change the behavior of functions and classes. These decorators are @staticmethod, @classmethod, @property, @abstractmethod, @asyncio.coroutine and&#8230;<\/p>\n<h2><span style=\"font-size: 18pt;\">When are decorators used in Python?<\/span><\/h2>\n<p>As mentioned, decorators in\u00a0<strong style=\"font-style: inherit;\">Python<\/strong> are used to change the behavior of functions and classes. For example, decorators can add properties to a position that apply to all calls to that function. For example, the `@staticmethod` decorator can be used to define a static function that can be called on its calls like a regular function without creating an instance of the class.<\/p>\n<p>Also, decorators can help define automatic functions. For example, the `@property` decorator can be used to define a <a href=\"https:\/\/vuejs.org\/guide\/essentials\/computed\" target=\"_blank\" rel=\"noopener\">computed property<\/a> (CP), which, when invoked, computes a value and returns it.<\/p>\n<p>Additionally, decorators can be used to validate a function&#8217;s inputs and outputs. For example, the @typing decorator can specify the types of a process&#8217;s inputs and outputs.<\/p>\n<p>In general, decorators are used to change the behavior of functions and classes in Python. They can be used to define automatic functions, specify input and output types, verify information and results, and determine the access level of operations.<\/p>\n<h2><span style=\"font-size: 18pt;\">What capabilities do decorators provide to programmers?<\/span><\/h2>\n<p>Decorators provide programmers with various high-level functionalities, some of which are as follows:<\/p>\n<ul>\n<li>Changing the behavior of functions: Decorators allow programmers to change the behavior of functions. For example, using the `@staticmethod` decorator, you can define a static function that will be called in its calls, like a regular function, without creating an instance of the class.<\/li>\n<li>Defining automatic properties: Decorators allow programmers to constrain the mechanics of properties. For example, by using the `@property` decorator, you can specify a calculated property (Computed property) where a value will be calculated and returned as output by calling it.<\/li>\n<li>Determining the types of inputs and outputs: Decorators allow programmers to specify the inputs and outputs of functions. For example, by using the `@typing` decorator, you can select the type of inputs and outputs of a process.<\/li>\n<li>Inspection of inputs and outputs: Decorators allow programmers to inspect the inputs and outputs of functions. For example, using `@check_arguments` and `@check_return` decorators, you can check the inputs and outputs of a process.<\/li>\n<li>Determining the access level of functions: Decorators allow programmers to choose the access level of operations. For example, using the `@staticmethod` decorator, you can define a static function that can be called without creating an instance of the class.<\/li>\n<\/ul>\n<p>In general, decorators allow programmers to change the behavior of functions and classes, define automatic properties, specify input and output types, inspect inputs and outputs, and specify the access level of operations.<\/p>\n<h2><span style=\"font-size: 18pt;\">An example of how to use decorators in Python<\/span><\/h2>\n<p>An example of how to use decorators in\u00a0<a href=\"https:\/\/ded9.com\/python-uses-and-important-features\/\"><strong style=\"font-style: inherit;\">Python<\/strong> <\/a>is the &#8220;@timing&#8221; decorator, which calculates the execution time of a function.\u00a0For this purpose, the `@timing` decorator can be applied to the process.\u00a0For example, the following code shows an example of this usage:<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">import time\r\n\r\ndef timing_decorator(func):\r\n\r\ndef wrapper(*args, **kwargs):\r\n\r\nstart_time = time.time()\r\n\r\nresult = func(*args, **kwargs)\r\n\r\nend_time = time.time()\r\n\r\nprint(f\"Elapsed time: {end_time - start_time}\")\r\n\r\nreturn result\r\n\r\nreturn wrapper\r\n\r\n@timing_decorator\r\n\r\ndef my_function():\r\n\r\ntime.sleep(2)\r\n\r\nmy_function()<\/pre>\n<\/div>\n<p>In this example, the `@timing_decorator` decorator is defined and applied to the `my_function` function. This decorator records the start time of the function&#8217;s execution and, after the process completes, records the end time and calculates the elapsed time between them. Then, it prints this time as output.<\/p>\n<p>In this example, by using the `@timing_decorator` decorator, there is no need to change the code of the `my_function` function, and by applying this decorator, you can easily calculate its execution time.<\/p>\n<h2>Are there other decorators in Python?<\/h2>\n<p>Yes, there are various valuable decorators in\u00a0<strong style=\"font-style: inherit;\">Python. <\/strong>In the following, I mention some of these decorators:<\/p>\n<ul>\n<li><strong style=\"font-style: inherit;\">`@staticmethod`:<\/strong> This decorator defines static functions that can be called independently of an instance of the class.<\/li>\n<li><strong style=\"font-style: inherit;\">\u00a0`@classmethod`:<\/strong> This decorator defines class functions that are useful for performing operations related to the class.<\/li>\n<li><strong style=\"font-style: inherit;\">`@property`:<\/strong> This decorator defines automatic properties (computed properties) that, when called, calculate a value and return it as output.<\/li>\n<li><strong style=\"font-style: inherit;\">`@abstractmethod`:<\/strong> This decorator defines abstract methods in classes that must be implemented in subclasses.<\/li>\n<li><strong style=\"font-style: inherit;\">`@staticmethod`:<\/strong> This decorator defines static functions that can be called independently of an instance of the course.<\/li>\n<li><strong style=\"font-style: inherit;\">`@typing`:<\/strong>\u00a0This decorator is used to specify the type of inputs and outputs of functions.<\/li>\n<li><strong style=\"font-style: inherit;\">`@wraps`:<\/strong> This decorator keeps information such as the function name and documentation inside another part.<\/li>\n<li><strong style=\"font-style: inherit;\">`@lru_cache`:<\/strong> This decorator is used to save the arithmetic results of the process and prevent them from being recalculated in subsequent calls.<\/li>\n<li><strong style=\"font-style: inherit;\">@asyncio:<\/strong> This decorator defines asynchronous operations widely used in small and large programs.<\/li>\n<li><strong style=\"font-style: inherit;\">`@retry` decorator:<\/strong> This decorator is used to repeat the execution of a process in case of an error. Using this decorator, the execution of the process can be repeated a specified number of times to retry in case of a mistake.<\/li>\n<li><strong style=\"font-style: inherit;\">`@cache` decorator:<\/strong>\u00a0This decorator is used to save the arithmetic results of the function and prevent them from being recalculated in subsequent calls.\u00a0By using this decorator, you can improve the performance of the program and reduce its execution time.<\/li>\n<li><strong style=\"font-style: inherit;\">`@login_required` decorator:<\/strong> This decorator protects content that requires a user login. Using this decorator, it is possible to allow access to specific pages only to users who are logged in.<\/li>\n<li><strong style=\"font-style: inherit;\">`@validate_args` decorator:<\/strong> This decorator is used to validate function inputs.\u00a0Using this decorator, you can verify that the function inputs are correct and complete and return an error if there is a problem.<\/li>\n<li><strong style=\"font-style: inherit;\">`@synchronized` decorator:<\/strong> This decorator locks access to a code section. Using this decorator, avoiding concurrency in the code and ensuring that only one thread has access to one part of the code is possible.<\/li>\n<li><strong style=\"font-style: inherit;\">`@log` decorator:<\/strong> This decorator registers code execution logs. Using this decorator, the activities performed in the program can be recorded and checked if needed.<\/li>\n<li><strong style=\"font-style: inherit;\">`@ @suppress` decorator:<\/strong> This decorator is used to silence errors. Using this decorator, you can ignore these errors and continue running the program from the error to the information level.<\/li>\n<\/ul>\n<p>These are just some examples of decorators in\u00a0<strong style=\"font-style: inherit;\">Python<\/strong>.\u00a0Using decorators, code can be made simpler and more readable, improve program performance, and reduce errors.<\/p>\n<h2>Can decorators be combined?<\/h2>\n<p>Yes,\u00a0decorators can be combined in\u00a0<strong style=\"font-style: inherit;\">Python. <\/strong>This helps to make decorators more useful and expand their capabilities.<\/p>\n<p>To combine two decorators, they can be placed back-to-back. For example, if we want to define a function as a class with the `@staticmethod` decorator and also use the `@cache` decorator to store arithmetic results, we can do as follows:<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">Class MyClass:\r\n\r\n@staticmethod\r\n\r\n@cache\r\n\r\ndef my_static_method(x):<\/pre>\n<\/div>\n<p># This function is defined as a static function, and when called, its calculation result is stored using the cache decorator.<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">return x ** 2<\/pre>\n<\/div>\n<p>With this, the &#8220;my_static_method&#8221; function is defined as a static function, and when called, its arithmetic result, if any, is stored in memory and is not recalculated in subsequent calls.<\/p>\n<p>Also, it is possible to specify more than two decorators for a function and combine them appropriately.\u00a0This can be done directly by using decorators.<\/p>\n<h2>How to combine decorators with functions?<\/h2>\n<p>In\u00a0<strong style=\"font-style: inherit;\">Python<\/strong>, decorators can be combined with other functions. Decorators are considered first-type functions in\u00a0<strong style=\"font-style: inherit;\">Python so that<\/strong> they can be used as arguments for different functions.<\/p>\n<p>For example, suppose we have a function that receives a number as input, and its output is the sum of odd numbers more minor than that. Now we want to define this function as a function with two decorators, &#8220;@memoize&#8221; and &#8220;@timed&#8221;, so that in case of subsequent calls, its arithmetic result will be stored in memory, and its execution time will be accurately recorded.<\/p>\n<h4>We can do as follows:<\/h4>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">import time\r\n\r\ndef memoize(func):\r\n\r\ncache = {}\r\n\r\ndef wrapper(*args):\r\n\r\nif args in cache:\r\n\r\nreturn cache[args]\r\n\r\nOtherwise:\r\n\r\nresult = func(*args)\r\n\r\ncache[args] = result\r\n\r\nreturn result\r\n\r\nreturn wrapper\r\n\r\ndef timed(func):\r\n\r\ndef wrapper(*args):\r\n\r\nstart = time.time()\r\n\r\nresult = func(*args)\r\n\r\nend = time.time()\r\n\r\nprint(f\"Elapsed time: {end-start:.6f} seconds\")\r\n\r\nreturn result\r\n\r\nreturn wrapper\r\n\r\n@memoize\r\n\r\n@timed\r\n\r\ndef sum_of_odd_numbers(n):\r\n\r\nreturn sum(filter(lambda x: x % 2 == 1, range(n)))\r\n\r\nprint(sum_of_odd_numbers(1000000))\r\n\r\nprint(sum_of_odd_numbers(1000000))<\/pre>\n<\/div>\n<p>In this code, the &#8220;memoize&#8221; function is used to save the process&#8217;s arithmetic results, and the &#8220;timed&#8221; function is used to record the execution time of the process in each call. Then, using `memoize` and `timed` decorators, the `sum_of_odd_numbers` function is defined. When calling this function, its arithmetic result, if any, is stored in memory and is not recalculated in subsequent calls.<\/p>\n<p>Also, the execution time of the function is recorded and printed in each call using the `timed&#8217; decorator. This way, you can add more functionality to your functions by combining decorators with other parts.<\/p>\n<h2>How to combine decorators with classes?<\/h2>\n<p>In\u00a0<strong style=\"font-style: inherit;\">Python<\/strong>, decorators can also be combined with classes. Decorators defined for functions are the most supported form of decorators, but decorators can also be defined for types.<\/p>\n<p>For example, suppose we have a style that stores a person&#8217;s characteristics, and we want to use the decorators `@property` and `@classmethod` to define the course&#8217;s properties.<\/p>\n<h3>We can do as follows:<\/h3>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">Class Person:\r\n\r\ndef __init__(self, name, age):\r\n\r\nself._name = name\r\n\r\nself._age = age\r\n\r\n@property\r\n\r\ndef name(self):\r\n\r\nreturn self._name\r\n\r\n@property\r\n\r\ndef age(self):\r\n\r\nreturn self._age\r\n\r\n@classmethod\r\n\r\ndef from_birth_year(cls, name, birth_year):\r\n\r\nage = cls.calculate_age(birth_year)\r\n\r\nreturn cls(name, age)\r\n\r\n@staticmethod\r\n\r\ndef calculate_age(birth_year):\r\n\r\nreturn 2023 - birth_year<\/pre>\n<\/div>\n<p>In this code, `@property` defines the `name` and `age` properties. Also, `@classmethod` represents the `from_birth_year` function, which takes a person&#8217;s birth year and returns their name and age as an object from the class. Also, the &#8220;calculate_age&#8221; function is defined as a static function used to calculate age. In this way, you can add more functionality by combining decorators with styles.<\/p>\n<h2>Can other functions be used as decorators for classes?<\/h2>\n<p>Yes<strong style=\"font-style: inherit;\">,<\/strong> other functions can be used in Python as decorators for classes. Any function that takes a class as input and returns a new class can be used as a decorator for classes. This helps to make classes more practical and expand their capabilities.<\/p>\n<p>For example, suppose we have a class that receives a number as input, and its output is the sum of odd numbers more minor than that number.<\/p>\n<p>Now we want to define this class as a class with two decorators, &#8220;@memoize&#8221; and &#8220;@timed&#8221;, so that in case of subsequent calls, its arithmetic result will be stored in memory, and its execution time will be accurately recorded.<\/p>\n<h4>We can do as follows:<\/h4>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">import time\r\n\r\ndef memoize(cls):\r\n\r\ncache = {}\r\n\r\ninit = cls.__init__\r\n\r\ndef wrapper(self, n):\r\n\r\nif n in cache:\r\n\r\nreturn cache[n]\r\n\r\nOtherwise:\r\n\r\ninstance = cls.__new__(cls)\r\n\r\ninit(instance, n)\r\n\r\nresult = instance.sum_of_odd_numbers()\r\n\r\ncache[n] = result\r\n\r\nreturn result\r\n\r\ncls.__init__ = wrapper\r\n\r\nreturn cls\r\n\r\ndef timed(cls):\r\n\r\nold_sum_of_odd_numbers = cls.sum_of_odd_numbers\r\n\r\ndef new_sum_of_odd_numbers(self):\r\n\r\nstart = time.time()\r\n\r\nresult = old_sum_of_odd_numbers(self)\r\n\r\nend = time.time()\r\n\r\nprint(f\"Elapsed time: {end-start:.6f} seconds\")\r\n\r\nreturn result\r\n\r\nCLS.sum_of_odd_numbers = new_sum_of_odd_numbers\r\n\r\nreturn cls\r\n\r\n@memoize\r\n\r\n@timed\r\n\r\nClass SumOfOddNumbers:\r\n\r\ndef __init__(self, n):\r\n\r\nself.n = n\r\n\r\ndef sum_of_odd_numbers(self):\r\n\r\nreturn sum(filter(lambda x: x % 2 == 1, range(self.n)))\r\n\r\ns = SumOfOddNumbers(1000000)\r\n\r\nprint(s.sum_of_odd_numbers())\r\n\r\nprint(s.sum_of_odd_numbers())<\/pre>\n<\/div>\n<p>In this code, the &#8220;memoize&#8221; function is used to cache the process&#8217;s arithmetic results, and the &#8220;timed&#8221; function is used to record the process&#8217;s execution time for each call. Then, using `memoize` and `timed` decorators, the `SumOfOddNumbers` class is defined.<\/p>\n<p>When calling the `sum_of_odd_numbers&#8217; function in this class, its arithmetic result, if any, is stored in memory and is not recalculated in subsequent calls.<\/p>\n<p>Additionally, the function&#8217;s execution time is recorded and printed with each call using the `timed&#8217; decorator.<\/p>\n<p>In this way, combining other functions with classes as decorators allows you to add more features to types and design them more effectively.<\/p>\n<h2>Are there other decorators available for defining automatic properties?<\/h2>\n<p>Yes,\u00a0there are other decorators in\u00a0<strong style=\"font-style: inherit;\">Python to define automatic properties.\u00a0<\/strong>For example, the `@property&#8217; decorator describes readable properties, `@classmethod&#8217; describes a class method, and `@staticmethod&#8217; defines a static function. Also, `@setter` and `@deleter` decorators portray mutable and deleted properties.<\/p>\n<p>For example, suppose we want to define a class to display a person&#8217;s date of birth. First, we can add a readable property to set the date of birth and then define two properties that are changeable and delete to change and delete the date of delivery.<\/p>\n<h4>We can do as follows:<\/h4>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">Birthday class:\r\n\r\ndef __init__(self, year, month, day):\r\n\r\nself._year = year\r\n\r\nself._month = month\r\n\r\nself._day = day\r\n\r\n@property\r\n\r\ndef year(self):\r\n\r\nreturn self._year\r\n\r\n@property\r\n\r\ndef month(self):\r\n\r\nreturn self._month\r\n\r\n@property\r\n\r\ndef day(self):\r\n\r\nreturn self._day\r\n\r\n@year.setter\r\n\r\ndef year(self, value):\r\n\r\nself._year = value\r\n\r\n@month.setter\r\n\r\ndef month(self, value):\r\n\r\nself._month = value\r\n\r\n@day.setter\r\n\r\ndef day(self, value):\r\n\r\nself._day = value\r\n\r\n@year.deleter\r\n\r\ndef year(self):\r\n\r\ndel self._year\r\n\r\n@month.deleter\r\n\r\ndef month(self):\r\n\r\ndel self._month\r\n\r\n@day.deleter\r\n\r\ndef day(self):\r\n\r\ndel self._day\r\n\r\ndef __str__(self):\r\n\r\nreturn f\"{self._year}\/{self._month}\/{self._day}\"<\/pre>\n<\/div>\n<p>In this code, the decorator `@property` defines the readable properties `year,` `month,` and `day.` Also, the `@setter` decorator is used to determine the mutable attributes `year,` `month,` and `day,` and the `@deleter` decorator defines the delectable attributes `year,` `month,` and `day.` Finally, by overriding the `__str__` method, the date of birth is printed as a string in the format year\/month\/day.<\/p>\n<p>In this way, by using the `@property&#8217;, `@setter`, and `@deleter` decorators, we can add automatic properties to classes and design them more effectively.<\/p>\n<h2>FAQ<\/h2>\n<div id=\"rank-math-rich-snippet-wrapper\"><div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-1\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">What is a Python decorator?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>A decorator is a callable that takes another function or class, adds functionality, and returns a modified version.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-2\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">How do you implement a decorator?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Define a wrapper function inside a decorator that accepts *args and **kwargs, and use the @decorator_name syntax above the target function.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-3\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">Where are decorators commonly used?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Decorators are used for logging, authentication, caching, validation, and method modifiers like @staticmethod or @classmethod.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Decorators In Python Are A Type Of Functions That Can Be Used To Change The Behavior Of A Function Or Class. These changes can include adding functionality to a function, modifying a process&#8217;s inputs or outputs, or altering a class&#8217;s behavior. Decorators are applied to a part or type using the @ character. A decorated [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":178811,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[316],"tags":[320],"class_list":["post-178810","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-python"],"acf":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/posts\/178810","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/comments?post=178810"}],"version-history":[{"count":5,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/posts\/178810\/revisions"}],"predecessor-version":[{"id":266786,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/posts\/178810\/revisions\/266786"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/media\/178811"}],"wp:attachment":[{"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/media?parent=178810"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/categories?post=178810"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/tags?post=178810"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}