Skip to content

Tags

Tag

Bases: ResponseModel

Represents a tag in CTFd.

Parameters:

Name Type Description Default
id int

The ID of the tag

required
value str

The value of the tag

required
challenge int

Alias for challenge_id

required
challenge_id int

The ID of the challenge the tag is associated with

required

Attributes:

Name Type Description
id int

The ID of the tag, read-only

value str

The value of the tag

challenge_id int

The ID of the challenge the tag is associated with

Source code in ctfdpy\models\tags.py
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
class Tag(ResponseModel):
    """
    Represents a tag in CTFd.

    Parameters
    ----------
    id : int
        The ID of the tag
    value : str
        The value of the tag
    challenge : int
        Alias for `challenge_id`
    challenge_id : int
        The ID of the challenge the tag is associated with

    Attributes
    ----------
    id : int
        The ID of the tag, read-only
    value : str
        The value of the tag
    challenge_id : int
        The ID of the challenge the tag is associated with
    """

    id: int = Field(frozen=True, exclude=True)
    value: str
    challenge_id: int = Field(
        validation_alias=AliasChoices("challenge_id", "challenge")
    )