html_compose.attributes.meta_attrs

  1from . import BaseAttribute
  2from typing import Literal
  3from ..base_types import StrLike
  4
  5
  6class MetaAttrs:
  7    """
  8    This module contains functions for attributes in the 'meta' element.
  9    Which is inherited by a class so we can generate type hints
 10    """
 11
 12    @staticmethod
 13    def charset(value: Literal["utf-8"]) -> BaseAttribute:
 14        """
 15        "meta" attribute: charset
 16        Character encoding declaration
 17
 18        Args:
 19            value:
 20                ['utf-8']
 21
 22        Returns:
 23            An charset attribute to be added to your element
 24
 25        """
 26
 27        return BaseAttribute("charset", value)
 28
 29    @staticmethod
 30    def content(value: StrLike) -> BaseAttribute:
 31        """
 32        "meta" attribute: content
 33        Value of the element
 34
 35        Args:
 36            value:
 37                Text*
 38
 39        Returns:
 40            An content attribute to be added to your element
 41
 42        """
 43
 44        return BaseAttribute("content", value)
 45
 46    @staticmethod
 47    def http_equiv(
 48        value: Literal[
 49            "content-type",
 50            "default-style",
 51            "refresh",
 52            "x-ua-compatible",
 53            "content-security-policy",
 54        ],
 55    ) -> BaseAttribute:
 56        """
 57        "meta" attribute: http-equiv
 58        Pragma directive
 59
 60        Args:
 61            value:
 62                ['content-type', 'default-style', 'refresh', 'x-ua-compatible', 'content-security-policy']
 63
 64        Returns:
 65            An http-equiv attribute to be added to your element
 66
 67        """
 68
 69        return BaseAttribute("http-equiv", value)
 70
 71    @staticmethod
 72    def media(value) -> BaseAttribute:
 73        """
 74        "meta" attribute: media
 75        Applicable media
 76
 77        Args:
 78            value:
 79                Valid media query list
 80
 81        Returns:
 82            An media attribute to be added to your element
 83
 84        """
 85
 86        return BaseAttribute("media", value)
 87
 88    @staticmethod
 89    def name(value: StrLike) -> BaseAttribute:
 90        """
 91        "meta" attribute: name
 92        Metadata name
 93
 94        Args:
 95            value:
 96                Text*
 97
 98        Returns:
 99            An name attribute to be added to your element
100
101        """
102
103        return BaseAttribute("name", value)
class MetaAttrs:
  7class MetaAttrs:
  8    """
  9    This module contains functions for attributes in the 'meta' element.
 10    Which is inherited by a class so we can generate type hints
 11    """
 12
 13    @staticmethod
 14    def charset(value: Literal["utf-8"]) -> BaseAttribute:
 15        """
 16        "meta" attribute: charset
 17        Character encoding declaration
 18
 19        Args:
 20            value:
 21                ['utf-8']
 22
 23        Returns:
 24            An charset attribute to be added to your element
 25
 26        """
 27
 28        return BaseAttribute("charset", value)
 29
 30    @staticmethod
 31    def content(value: StrLike) -> BaseAttribute:
 32        """
 33        "meta" attribute: content
 34        Value of the element
 35
 36        Args:
 37            value:
 38                Text*
 39
 40        Returns:
 41            An content attribute to be added to your element
 42
 43        """
 44
 45        return BaseAttribute("content", value)
 46
 47    @staticmethod
 48    def http_equiv(
 49        value: Literal[
 50            "content-type",
 51            "default-style",
 52            "refresh",
 53            "x-ua-compatible",
 54            "content-security-policy",
 55        ],
 56    ) -> BaseAttribute:
 57        """
 58        "meta" attribute: http-equiv
 59        Pragma directive
 60
 61        Args:
 62            value:
 63                ['content-type', 'default-style', 'refresh', 'x-ua-compatible', 'content-security-policy']
 64
 65        Returns:
 66            An http-equiv attribute to be added to your element
 67
 68        """
 69
 70        return BaseAttribute("http-equiv", value)
 71
 72    @staticmethod
 73    def media(value) -> BaseAttribute:
 74        """
 75        "meta" attribute: media
 76        Applicable media
 77
 78        Args:
 79            value:
 80                Valid media query list
 81
 82        Returns:
 83            An media attribute to be added to your element
 84
 85        """
 86
 87        return BaseAttribute("media", value)
 88
 89    @staticmethod
 90    def name(value: StrLike) -> BaseAttribute:
 91        """
 92        "meta" attribute: name
 93        Metadata name
 94
 95        Args:
 96            value:
 97                Text*
 98
 99        Returns:
100            An name attribute to be added to your element
101
102        """
103
104        return BaseAttribute("name", value)

This module contains functions for attributes in the 'meta' element. Which is inherited by a class so we can generate type hints

@staticmethod
def charset(value: Literal['utf-8']) -> html_compose.base_attribute.BaseAttribute:
13    @staticmethod
14    def charset(value: Literal["utf-8"]) -> BaseAttribute:
15        """
16        "meta" attribute: charset
17        Character encoding declaration
18
19        Args:
20            value:
21                ['utf-8']
22
23        Returns:
24            An charset attribute to be added to your element
25
26        """
27
28        return BaseAttribute("charset", value)

"meta" attribute: charset Character encoding declaration

Args: value: ['utf-8']

Returns: An charset attribute to be added to your element

@staticmethod
def content( value: str | float | int | bool) -> html_compose.base_attribute.BaseAttribute:
30    @staticmethod
31    def content(value: StrLike) -> BaseAttribute:
32        """
33        "meta" attribute: content
34        Value of the element
35
36        Args:
37            value:
38                Text*
39
40        Returns:
41            An content attribute to be added to your element
42
43        """
44
45        return BaseAttribute("content", value)

"meta" attribute: content Value of the element

Args: value: Text*

Returns: An content attribute to be added to your element

@staticmethod
def http_equiv( value: Literal['content-type', 'default-style', 'refresh', 'x-ua-compatible', 'content-security-policy']) -> html_compose.base_attribute.BaseAttribute:
47    @staticmethod
48    def http_equiv(
49        value: Literal[
50            "content-type",
51            "default-style",
52            "refresh",
53            "x-ua-compatible",
54            "content-security-policy",
55        ],
56    ) -> BaseAttribute:
57        """
58        "meta" attribute: http-equiv
59        Pragma directive
60
61        Args:
62            value:
63                ['content-type', 'default-style', 'refresh', 'x-ua-compatible', 'content-security-policy']
64
65        Returns:
66            An http-equiv attribute to be added to your element
67
68        """
69
70        return BaseAttribute("http-equiv", value)

"meta" attribute: http-equiv Pragma directive

Args: value: ['content-type', 'default-style', 'refresh', 'x-ua-compatible', 'content-security-policy']

Returns: An http-equiv attribute to be added to your element

@staticmethod
def media(value) -> html_compose.base_attribute.BaseAttribute:
72    @staticmethod
73    def media(value) -> BaseAttribute:
74        """
75        "meta" attribute: media
76        Applicable media
77
78        Args:
79            value:
80                Valid media query list
81
82        Returns:
83            An media attribute to be added to your element
84
85        """
86
87        return BaseAttribute("media", value)

"meta" attribute: media Applicable media

Args: value: Valid media query list

Returns: An media attribute to be added to your element

@staticmethod
def name( value: str | float | int | bool) -> html_compose.base_attribute.BaseAttribute:
 89    @staticmethod
 90    def name(value: StrLike) -> BaseAttribute:
 91        """
 92        "meta" attribute: name
 93        Metadata name
 94
 95        Args:
 96            value:
 97                Text*
 98
 99        Returns:
100            An name attribute to be added to your element
101
102        """
103
104        return BaseAttribute("name", value)

"meta" attribute: name Metadata name

Args: value: Text*

Returns: An name attribute to be added to your element