wp_python 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- src/wordpress_api/__init__.py +31 -0
- src/wordpress_api/auth.py +174 -0
- src/wordpress_api/client.py +293 -0
- src/wordpress_api/endpoints/__init__.py +43 -0
- src/wordpress_api/endpoints/application_passwords.py +235 -0
- src/wordpress_api/endpoints/autosaves.py +106 -0
- src/wordpress_api/endpoints/base.py +117 -0
- src/wordpress_api/endpoints/blocks.py +107 -0
- src/wordpress_api/endpoints/categories.py +91 -0
- src/wordpress_api/endpoints/comments.py +127 -0
- src/wordpress_api/endpoints/media.py +164 -0
- src/wordpress_api/endpoints/menus.py +120 -0
- src/wordpress_api/endpoints/pages.py +109 -0
- src/wordpress_api/endpoints/plugins.py +89 -0
- src/wordpress_api/endpoints/post_types.py +61 -0
- src/wordpress_api/endpoints/posts.py +131 -0
- src/wordpress_api/endpoints/revisions.py +121 -0
- src/wordpress_api/endpoints/search.py +81 -0
- src/wordpress_api/endpoints/settings.py +55 -0
- src/wordpress_api/endpoints/statuses.py +56 -0
- src/wordpress_api/endpoints/tags.py +79 -0
- src/wordpress_api/endpoints/taxonomies.py +41 -0
- src/wordpress_api/endpoints/themes.py +51 -0
- src/wordpress_api/endpoints/users.py +129 -0
- src/wordpress_api/exceptions.py +79 -0
- src/wordpress_api/models/__init__.py +49 -0
- src/wordpress_api/models/base.py +65 -0
- src/wordpress_api/models/category.py +41 -0
- src/wordpress_api/models/comment.py +75 -0
- src/wordpress_api/models/media.py +108 -0
- src/wordpress_api/models/menu.py +83 -0
- src/wordpress_api/models/page.py +80 -0
- src/wordpress_api/models/plugin.py +36 -0
- src/wordpress_api/models/post.py +112 -0
- src/wordpress_api/models/settings.py +32 -0
- src/wordpress_api/models/tag.py +38 -0
- src/wordpress_api/models/taxonomy.py +49 -0
- src/wordpress_api/models/theme.py +50 -0
- src/wordpress_api/models/user.py +82 -0
- wp_python-0.1.0.dist-info/METADATA +12 -0
- wp_python-0.1.0.dist-info/RECORD +42 -0
- wp_python-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"""Page models."""
|
|
2
|
+
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from typing import Any
|
|
5
|
+
|
|
6
|
+
from pydantic import Field, field_validator
|
|
7
|
+
|
|
8
|
+
from .base import WordPressModel, RenderedContent, parse_datetime
|
|
9
|
+
from .post import PostStatus
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Page(WordPressModel):
|
|
13
|
+
"""WordPress Page object."""
|
|
14
|
+
|
|
15
|
+
id: int
|
|
16
|
+
date: datetime | None = None
|
|
17
|
+
date_gmt: datetime | None = None
|
|
18
|
+
guid: RenderedContent | None = None
|
|
19
|
+
modified: datetime | None = None
|
|
20
|
+
modified_gmt: datetime | None = None
|
|
21
|
+
slug: str = ""
|
|
22
|
+
status: PostStatus = PostStatus.DRAFT
|
|
23
|
+
type: str = "page"
|
|
24
|
+
link: str = ""
|
|
25
|
+
title: RenderedContent | None = None
|
|
26
|
+
content: RenderedContent | None = None
|
|
27
|
+
excerpt: RenderedContent | None = None
|
|
28
|
+
author: int = 0
|
|
29
|
+
featured_media: int = 0
|
|
30
|
+
parent: int = 0
|
|
31
|
+
menu_order: int = 0
|
|
32
|
+
comment_status: str = "closed"
|
|
33
|
+
ping_status: str = "closed"
|
|
34
|
+
template: str = ""
|
|
35
|
+
meta: dict[str, Any] = Field(default_factory=dict)
|
|
36
|
+
|
|
37
|
+
@field_validator("date", "date_gmt", "modified", "modified_gmt", mode="before")
|
|
38
|
+
@classmethod
|
|
39
|
+
def parse_dates(cls, v: Any) -> datetime | None:
|
|
40
|
+
return parse_datetime(v)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class PageCreate(WordPressModel):
|
|
44
|
+
"""Data for creating a new page."""
|
|
45
|
+
|
|
46
|
+
title: str | None = None
|
|
47
|
+
content: str | None = None
|
|
48
|
+
excerpt: str | None = None
|
|
49
|
+
status: PostStatus = PostStatus.DRAFT
|
|
50
|
+
author: int | None = None
|
|
51
|
+
featured_media: int | None = None
|
|
52
|
+
parent: int | None = None
|
|
53
|
+
menu_order: int | None = None
|
|
54
|
+
comment_status: str | None = None
|
|
55
|
+
ping_status: str | None = None
|
|
56
|
+
template: str | None = None
|
|
57
|
+
meta: dict[str, Any] | None = None
|
|
58
|
+
slug: str | None = None
|
|
59
|
+
date: datetime | str | None = None
|
|
60
|
+
password: str | None = None
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class PageUpdate(WordPressModel):
|
|
64
|
+
"""Data for updating a page."""
|
|
65
|
+
|
|
66
|
+
title: str | None = None
|
|
67
|
+
content: str | None = None
|
|
68
|
+
excerpt: str | None = None
|
|
69
|
+
status: PostStatus | None = None
|
|
70
|
+
author: int | None = None
|
|
71
|
+
featured_media: int | None = None
|
|
72
|
+
parent: int | None = None
|
|
73
|
+
menu_order: int | None = None
|
|
74
|
+
comment_status: str | None = None
|
|
75
|
+
ping_status: str | None = None
|
|
76
|
+
template: str | None = None
|
|
77
|
+
meta: dict[str, Any] | None = None
|
|
78
|
+
slug: str | None = None
|
|
79
|
+
date: datetime | str | None = None
|
|
80
|
+
password: str | None = None
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""Plugin models."""
|
|
2
|
+
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
from pydantic import Field
|
|
6
|
+
|
|
7
|
+
from .base import WordPressModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Plugin(WordPressModel):
|
|
11
|
+
"""WordPress Plugin object."""
|
|
12
|
+
|
|
13
|
+
plugin: str = ""
|
|
14
|
+
status: str = "inactive"
|
|
15
|
+
name: str = ""
|
|
16
|
+
plugin_uri: str = ""
|
|
17
|
+
author: str = ""
|
|
18
|
+
author_uri: str = ""
|
|
19
|
+
description: dict[str, str] = Field(default_factory=dict)
|
|
20
|
+
version: str = ""
|
|
21
|
+
network_only: bool = False
|
|
22
|
+
requires_wp: str = ""
|
|
23
|
+
requires_php: str = ""
|
|
24
|
+
textdomain: str = ""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class PluginActivate(WordPressModel):
|
|
28
|
+
"""Data for activating a plugin."""
|
|
29
|
+
|
|
30
|
+
status: str = "active"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class PluginDeactivate(WordPressModel):
|
|
34
|
+
"""Data for deactivating a plugin."""
|
|
35
|
+
|
|
36
|
+
status: str = "inactive"
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"""Post models."""
|
|
2
|
+
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from enum import Enum
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from pydantic import Field, field_validator
|
|
8
|
+
|
|
9
|
+
from .base import WordPressModel, RenderedContent, parse_datetime
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class PostStatus(str, Enum):
|
|
13
|
+
"""Post status options."""
|
|
14
|
+
|
|
15
|
+
PUBLISH = "publish"
|
|
16
|
+
FUTURE = "future"
|
|
17
|
+
DRAFT = "draft"
|
|
18
|
+
PENDING = "pending"
|
|
19
|
+
PRIVATE = "private"
|
|
20
|
+
TRASH = "trash"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class PostFormat(str, Enum):
|
|
24
|
+
"""Post format options."""
|
|
25
|
+
|
|
26
|
+
STANDARD = "standard"
|
|
27
|
+
ASIDE = "aside"
|
|
28
|
+
CHAT = "chat"
|
|
29
|
+
GALLERY = "gallery"
|
|
30
|
+
LINK = "link"
|
|
31
|
+
IMAGE = "image"
|
|
32
|
+
QUOTE = "quote"
|
|
33
|
+
STATUS = "status"
|
|
34
|
+
VIDEO = "video"
|
|
35
|
+
AUDIO = "audio"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class Post(WordPressModel):
|
|
39
|
+
"""WordPress Post object."""
|
|
40
|
+
|
|
41
|
+
id: int
|
|
42
|
+
date: datetime | None = None
|
|
43
|
+
date_gmt: datetime | None = None
|
|
44
|
+
guid: RenderedContent | None = None
|
|
45
|
+
modified: datetime | None = None
|
|
46
|
+
modified_gmt: datetime | None = None
|
|
47
|
+
slug: str = ""
|
|
48
|
+
status: PostStatus = PostStatus.DRAFT
|
|
49
|
+
type: str = "post"
|
|
50
|
+
link: str = ""
|
|
51
|
+
title: RenderedContent | None = None
|
|
52
|
+
content: RenderedContent | None = None
|
|
53
|
+
excerpt: RenderedContent | None = None
|
|
54
|
+
author: int = 0
|
|
55
|
+
featured_media: int = 0
|
|
56
|
+
comment_status: str = "open"
|
|
57
|
+
ping_status: str = "open"
|
|
58
|
+
sticky: bool = False
|
|
59
|
+
template: str = ""
|
|
60
|
+
format: PostFormat = PostFormat.STANDARD
|
|
61
|
+
meta: dict[str, Any] = Field(default_factory=dict)
|
|
62
|
+
categories: list[int] = Field(default_factory=list)
|
|
63
|
+
tags: list[int] = Field(default_factory=list)
|
|
64
|
+
|
|
65
|
+
@field_validator("date", "date_gmt", "modified", "modified_gmt", mode="before")
|
|
66
|
+
@classmethod
|
|
67
|
+
def parse_dates(cls, v: Any) -> datetime | None:
|
|
68
|
+
return parse_datetime(v)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class PostCreate(WordPressModel):
|
|
72
|
+
"""Data for creating a new post."""
|
|
73
|
+
|
|
74
|
+
title: str | None = None
|
|
75
|
+
content: str | None = None
|
|
76
|
+
excerpt: str | None = None
|
|
77
|
+
status: PostStatus = PostStatus.DRAFT
|
|
78
|
+
author: int | None = None
|
|
79
|
+
featured_media: int | None = None
|
|
80
|
+
comment_status: str | None = None
|
|
81
|
+
ping_status: str | None = None
|
|
82
|
+
format: PostFormat | None = None
|
|
83
|
+
sticky: bool | None = None
|
|
84
|
+
categories: list[int] | None = None
|
|
85
|
+
tags: list[int] | None = None
|
|
86
|
+
meta: dict[str, Any] | None = None
|
|
87
|
+
template: str | None = None
|
|
88
|
+
slug: str | None = None
|
|
89
|
+
date: datetime | str | None = None
|
|
90
|
+
password: str | None = None
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class PostUpdate(WordPressModel):
|
|
94
|
+
"""Data for updating a post."""
|
|
95
|
+
|
|
96
|
+
title: str | None = None
|
|
97
|
+
content: str | None = None
|
|
98
|
+
excerpt: str | None = None
|
|
99
|
+
status: PostStatus | None = None
|
|
100
|
+
author: int | None = None
|
|
101
|
+
featured_media: int | None = None
|
|
102
|
+
comment_status: str | None = None
|
|
103
|
+
ping_status: str | None = None
|
|
104
|
+
format: PostFormat | None = None
|
|
105
|
+
sticky: bool | None = None
|
|
106
|
+
categories: list[int] | None = None
|
|
107
|
+
tags: list[int] | None = None
|
|
108
|
+
meta: dict[str, Any] | None = None
|
|
109
|
+
template: str | None = None
|
|
110
|
+
slug: str | None = None
|
|
111
|
+
date: datetime | str | None = None
|
|
112
|
+
password: str | None = None
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""Settings models."""
|
|
2
|
+
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
from pydantic import Field
|
|
6
|
+
|
|
7
|
+
from .base import WordPressModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Settings(WordPressModel):
|
|
11
|
+
"""WordPress Site Settings."""
|
|
12
|
+
|
|
13
|
+
title: str = ""
|
|
14
|
+
description: str = ""
|
|
15
|
+
url: str = ""
|
|
16
|
+
email: str = ""
|
|
17
|
+
timezone: str = ""
|
|
18
|
+
date_format: str = ""
|
|
19
|
+
time_format: str = ""
|
|
20
|
+
start_of_week: int = 0
|
|
21
|
+
language: str = ""
|
|
22
|
+
use_smilies: bool = True
|
|
23
|
+
default_category: int = 1
|
|
24
|
+
default_post_format: str = ""
|
|
25
|
+
posts_per_page: int = 10
|
|
26
|
+
default_ping_status: str = "open"
|
|
27
|
+
default_comment_status: str = "open"
|
|
28
|
+
show_on_front: str = "posts"
|
|
29
|
+
page_on_front: int = 0
|
|
30
|
+
page_for_posts: int = 0
|
|
31
|
+
site_logo: int | None = None
|
|
32
|
+
site_icon: int | None = None
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"""Tag models."""
|
|
2
|
+
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
from pydantic import Field
|
|
6
|
+
|
|
7
|
+
from .base import WordPressModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Tag(WordPressModel):
|
|
11
|
+
"""WordPress Tag object."""
|
|
12
|
+
|
|
13
|
+
id: int
|
|
14
|
+
count: int = 0
|
|
15
|
+
description: str = ""
|
|
16
|
+
link: str = ""
|
|
17
|
+
name: str = ""
|
|
18
|
+
slug: str = ""
|
|
19
|
+
taxonomy: str = "post_tag"
|
|
20
|
+
meta: dict[str, Any] = Field(default_factory=dict)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class TagCreate(WordPressModel):
|
|
24
|
+
"""Data for creating a new tag."""
|
|
25
|
+
|
|
26
|
+
name: str
|
|
27
|
+
description: str | None = None
|
|
28
|
+
slug: str | None = None
|
|
29
|
+
meta: dict[str, Any] | None = None
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class TagUpdate(WordPressModel):
|
|
33
|
+
"""Data for updating a tag."""
|
|
34
|
+
|
|
35
|
+
name: str | None = None
|
|
36
|
+
description: str | None = None
|
|
37
|
+
slug: str | None = None
|
|
38
|
+
meta: dict[str, Any] | None = None
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"""Taxonomy models."""
|
|
2
|
+
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
from pydantic import Field
|
|
6
|
+
|
|
7
|
+
from .base import WordPressModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class TaxonomyLabels(WordPressModel):
|
|
11
|
+
"""Labels for a taxonomy."""
|
|
12
|
+
|
|
13
|
+
name: str = ""
|
|
14
|
+
singular_name: str = ""
|
|
15
|
+
search_items: str = ""
|
|
16
|
+
popular_items: str | None = None
|
|
17
|
+
all_items: str = ""
|
|
18
|
+
parent_item: str | None = None
|
|
19
|
+
parent_item_colon: str | None = None
|
|
20
|
+
edit_item: str = ""
|
|
21
|
+
view_item: str = ""
|
|
22
|
+
update_item: str = ""
|
|
23
|
+
add_new_item: str = ""
|
|
24
|
+
new_item_name: str = ""
|
|
25
|
+
separate_items_with_commas: str | None = None
|
|
26
|
+
add_or_remove_items: str | None = None
|
|
27
|
+
choose_from_most_used: str | None = None
|
|
28
|
+
not_found: str = ""
|
|
29
|
+
no_terms: str = ""
|
|
30
|
+
items_list_navigation: str = ""
|
|
31
|
+
items_list: str = ""
|
|
32
|
+
most_used: str = ""
|
|
33
|
+
back_to_items: str = ""
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class Taxonomy(WordPressModel):
|
|
37
|
+
"""WordPress Taxonomy object."""
|
|
38
|
+
|
|
39
|
+
name: str = ""
|
|
40
|
+
slug: str = ""
|
|
41
|
+
description: str = ""
|
|
42
|
+
types: list[str] = Field(default_factory=list)
|
|
43
|
+
hierarchical: bool = False
|
|
44
|
+
rest_base: str = ""
|
|
45
|
+
rest_namespace: str = "wp/v2"
|
|
46
|
+
labels: TaxonomyLabels | None = None
|
|
47
|
+
show_cloud: bool = False
|
|
48
|
+
visibility: dict[str, bool] = Field(default_factory=dict)
|
|
49
|
+
capabilities: dict[str, str] = Field(default_factory=dict)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""Theme models."""
|
|
2
|
+
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
from pydantic import Field
|
|
6
|
+
|
|
7
|
+
from .base import WordPressModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ThemeSupports(WordPressModel):
|
|
11
|
+
"""Theme feature support."""
|
|
12
|
+
|
|
13
|
+
align_wide: bool = False
|
|
14
|
+
automatic_feed_links: bool = True
|
|
15
|
+
custom_background: bool | dict = False
|
|
16
|
+
custom_header: bool | dict = False
|
|
17
|
+
custom_logo: bool | dict = False
|
|
18
|
+
customize_selective_refresh_widgets: bool = False
|
|
19
|
+
dark_editor_style: bool = False
|
|
20
|
+
editor_color_palette: bool | list = False
|
|
21
|
+
editor_font_sizes: bool | list = False
|
|
22
|
+
editor_gradient_presets: bool | list = False
|
|
23
|
+
editor_styles: bool = False
|
|
24
|
+
html5: bool | list = False
|
|
25
|
+
formats: list[str] = Field(default_factory=list)
|
|
26
|
+
post_thumbnails: bool | list = True
|
|
27
|
+
responsive_embeds: bool = False
|
|
28
|
+
title_tag: bool = False
|
|
29
|
+
wp_block_styles: bool = False
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class Theme(WordPressModel):
|
|
33
|
+
"""WordPress Theme object."""
|
|
34
|
+
|
|
35
|
+
stylesheet: str = ""
|
|
36
|
+
template: str = ""
|
|
37
|
+
author: dict[str, str] = Field(default_factory=dict)
|
|
38
|
+
author_uri: dict[str, str] = Field(default_factory=dict)
|
|
39
|
+
description: dict[str, str] = Field(default_factory=dict)
|
|
40
|
+
name: dict[str, str] = Field(default_factory=dict)
|
|
41
|
+
requires_php: str = ""
|
|
42
|
+
requires_wp: str = ""
|
|
43
|
+
screenshot: str = ""
|
|
44
|
+
tags: dict[str, list[str]] = Field(default_factory=dict)
|
|
45
|
+
textdomain: str = ""
|
|
46
|
+
theme_supports: ThemeSupports | None = None
|
|
47
|
+
theme_uri: dict[str, str] = Field(default_factory=dict)
|
|
48
|
+
version: str = ""
|
|
49
|
+
status: str = "inactive"
|
|
50
|
+
is_block_theme: bool = False
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""User models."""
|
|
2
|
+
|
|
3
|
+
from enum import Enum
|
|
4
|
+
from typing import Any
|
|
5
|
+
|
|
6
|
+
from pydantic import Field
|
|
7
|
+
|
|
8
|
+
from .base import WordPressModel
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class UserRole(str, Enum):
|
|
12
|
+
"""Default WordPress user roles."""
|
|
13
|
+
|
|
14
|
+
ADMINISTRATOR = "administrator"
|
|
15
|
+
EDITOR = "editor"
|
|
16
|
+
AUTHOR = "author"
|
|
17
|
+
CONTRIBUTOR = "contributor"
|
|
18
|
+
SUBSCRIBER = "subscriber"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class UserCapabilities(WordPressModel):
|
|
22
|
+
"""User capabilities."""
|
|
23
|
+
|
|
24
|
+
pass
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class User(WordPressModel):
|
|
28
|
+
"""WordPress User object."""
|
|
29
|
+
|
|
30
|
+
id: int
|
|
31
|
+
username: str = ""
|
|
32
|
+
name: str = ""
|
|
33
|
+
first_name: str = ""
|
|
34
|
+
last_name: str = ""
|
|
35
|
+
email: str = ""
|
|
36
|
+
url: str = ""
|
|
37
|
+
description: str = ""
|
|
38
|
+
link: str = ""
|
|
39
|
+
locale: str = ""
|
|
40
|
+
nickname: str = ""
|
|
41
|
+
slug: str = ""
|
|
42
|
+
registered_date: str = ""
|
|
43
|
+
roles: list[str] = Field(default_factory=list)
|
|
44
|
+
capabilities: dict[str, bool] = Field(default_factory=dict)
|
|
45
|
+
extra_capabilities: dict[str, bool] = Field(default_factory=dict)
|
|
46
|
+
avatar_urls: dict[str, str] = Field(default_factory=dict)
|
|
47
|
+
meta: dict[str, Any] = Field(default_factory=dict)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class UserCreate(WordPressModel):
|
|
51
|
+
"""Data for creating a new user."""
|
|
52
|
+
|
|
53
|
+
username: str
|
|
54
|
+
email: str
|
|
55
|
+
password: str
|
|
56
|
+
name: str | None = None
|
|
57
|
+
first_name: str | None = None
|
|
58
|
+
last_name: str | None = None
|
|
59
|
+
url: str | None = None
|
|
60
|
+
description: str | None = None
|
|
61
|
+
locale: str | None = None
|
|
62
|
+
nickname: str | None = None
|
|
63
|
+
slug: str | None = None
|
|
64
|
+
roles: list[str] | None = None
|
|
65
|
+
meta: dict[str, Any] | None = None
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class UserUpdate(WordPressModel):
|
|
69
|
+
"""Data for updating a user."""
|
|
70
|
+
|
|
71
|
+
email: str | None = None
|
|
72
|
+
password: str | None = None
|
|
73
|
+
name: str | None = None
|
|
74
|
+
first_name: str | None = None
|
|
75
|
+
last_name: str | None = None
|
|
76
|
+
url: str | None = None
|
|
77
|
+
description: str | None = None
|
|
78
|
+
locale: str | None = None
|
|
79
|
+
nickname: str | None = None
|
|
80
|
+
slug: str | None = None
|
|
81
|
+
roles: list[str] | None = None
|
|
82
|
+
meta: dict[str, Any] | None = None
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: wp_python
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A Python client for interacting with the WordPress REST API.
|
|
5
|
+
Requires-Python: >=3.12
|
|
6
|
+
Requires-Dist: django-wordpress-api>=0.2.0
|
|
7
|
+
Requires-Dist: hatch>=1.16.3
|
|
8
|
+
Requires-Dist: httpx>=0.28.1
|
|
9
|
+
Requires-Dist: pydantic>=2.12.5
|
|
10
|
+
Requires-Dist: pytest-mock>=3.15.1
|
|
11
|
+
Requires-Dist: pytest>=9.0.2
|
|
12
|
+
Requires-Dist: respx>=0.22.0
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
src/wordpress_api/__init__.py,sha256=HSYLjRbRqWU0iBU6paSAZ4KR7Jl3Z8dLtAPTHfvQXuE,643
|
|
2
|
+
src/wordpress_api/auth.py,sha256=s84OZbrr2-Vq9ICGMfr4CCcUQIVis3Cy_8tTh8kVKTM,5358
|
|
3
|
+
src/wordpress_api/client.py,sha256=94JKVfDIcxhKzypjvrlZ5ak4BDMPm4zWF-3T0-ljkfo,9818
|
|
4
|
+
src/wordpress_api/exceptions.py,sha256=lmRbpRT2lC1EK7u1nPCrM4xc96ZNomk7GY7mz7e_x1c,2273
|
|
5
|
+
src/wordpress_api/endpoints/__init__.py,sha256=xxDVw6j_LXgxpfRrBryIcXVcyEyq0fRzoc11oKlkxU0,1230
|
|
6
|
+
src/wordpress_api/endpoints/application_passwords.py,sha256=PrP_a6VV24D3a8zciN4KhJh1GKrXhS7hH53JNIOEvhA,7691
|
|
7
|
+
src/wordpress_api/endpoints/autosaves.py,sha256=YTeE7K6GXDeFTQsIrUm65Wk8uLqS6THt1j-iR2LSup8,3607
|
|
8
|
+
src/wordpress_api/endpoints/base.py,sha256=W0v3g5ZXn_s2N4Y45NRbZuTwFiDEiQj8Uf3JHe5IGWs,3798
|
|
9
|
+
src/wordpress_api/endpoints/blocks.py,sha256=QZ4n8teiNm8lTFGSMGKy5KPsQMC3cBqQesXC-3vF1fk,3609
|
|
10
|
+
src/wordpress_api/endpoints/categories.py,sha256=7NSx1oMu66A3ZDjDfI-Hip_Ca2BpeIDHknu_Yfw61zE,3029
|
|
11
|
+
src/wordpress_api/endpoints/comments.py,sha256=bBdVXsUiBzjceIuIFXehXt3dt8-Gn5wwQ60MXV0_sMo,4473
|
|
12
|
+
src/wordpress_api/endpoints/media.py,sha256=aFFG02eWM-IPk9NhXltgyMQj5DOEtheyc1FQlwQa10I,5456
|
|
13
|
+
src/wordpress_api/endpoints/menus.py,sha256=xFZ902x1z_1-cmNET2ZaWQnErEY0W4qjNRcuoglrVZk,4153
|
|
14
|
+
src/wordpress_api/endpoints/pages.py,sha256=UVcJBHaVQt9fpMe2zxpvpTgQJIT6ATIyOpbYGYp8q50,3666
|
|
15
|
+
src/wordpress_api/endpoints/plugins.py,sha256=W4-LSRw8nYb7soMKJ0kPdiOu22rgBIxk9C0tR6YGTZk,2661
|
|
16
|
+
src/wordpress_api/endpoints/post_types.py,sha256=3Veo1f6qBmdy_4GYq_sF3VG6yS7o9LugUTvK4T_VQ98,1901
|
|
17
|
+
src/wordpress_api/endpoints/posts.py,sha256=5p-gn9257XcQc0QBW6yMmvyTPs7oCEzDfxvEMexeN2o,4947
|
|
18
|
+
src/wordpress_api/endpoints/revisions.py,sha256=KWTf41Nct3cQ5JMHW5XPi_mcmmnYaUrAW6fsgJ7_tx4,3900
|
|
19
|
+
src/wordpress_api/endpoints/search.py,sha256=mtJIKRAoSWHsO18TWGYC4oEnweZW5PzZbhRXXhDEKE8,2540
|
|
20
|
+
src/wordpress_api/endpoints/settings.py,sha256=SSad5CuztEtdDUO3OQ9dddtPqq6BMbwyNi9fTQ5ZSXY,1577
|
|
21
|
+
src/wordpress_api/endpoints/statuses.py,sha256=l0ut-5yNhr7LljdPiyhNTOYnMSimZzPQnygEEZKhsos,1654
|
|
22
|
+
src/wordpress_api/endpoints/tags.py,sha256=MsUUZ5MmYTV3Hqs2hZcMgRE27m-w-Lre_pq3lfJvwLY,2446
|
|
23
|
+
src/wordpress_api/endpoints/taxonomies.py,sha256=tZImMsFuSJFqdOGlea7gOYX6JoFDEEEIu-HoKwuDkgc,1236
|
|
24
|
+
src/wordpress_api/endpoints/themes.py,sha256=JCfe6J_XBH9WvKmUrEa6NCSSwCcgCVZK87y2HLUpGLU,1504
|
|
25
|
+
src/wordpress_api/endpoints/users.py,sha256=ACwCfsElSz_wpjS-jhokOl_NAAV06_JQKr_C__8M0ow,4380
|
|
26
|
+
src/wordpress_api/models/__init__.py,sha256=JE4R3MQcIV-XL2MCwlwSAckfBgtS32dENBxmlMHtCDA,1165
|
|
27
|
+
src/wordpress_api/models/base.py,sha256=FTZXYGo7f7Zqi7IdyfGlkwVjasIDwbCh3-45vg_G6iw,1619
|
|
28
|
+
src/wordpress_api/models/category.py,sha256=ga1ihAfuQPVOIC3pJTj7igJg46A-7wOnj6nrlytqIWg,873
|
|
29
|
+
src/wordpress_api/models/comment.py,sha256=VT9jsDrJ93_XQet7q7T85LB20tSAmjHLU2PaqNrMUFQ,1924
|
|
30
|
+
src/wordpress_api/models/media.py,sha256=TieunrwtKBDTmZv4K3TP1nN2VJvoT5ZK1lEeLzUjSgw,2797
|
|
31
|
+
src/wordpress_api/models/menu.py,sha256=1slp-RxL2wFm1IpPIoleusSg5TpSiDjbYGaR-VTgZ2c,2082
|
|
32
|
+
src/wordpress_api/models/page.py,sha256=EDGDm5yrhUmA9YaL84CIrOvzrw5nWUefeybbz1JBeOI,2294
|
|
33
|
+
src/wordpress_api/models/plugin.py,sha256=fWkvuCtq_vWCAIB7L8MW9TtWPrQfr39_PNpHbHaSQPo,730
|
|
34
|
+
src/wordpress_api/models/post.py,sha256=WDRx16YCNkhkQZsHwNloNttgXBjQtK1CHFFDbIhMJWY,3039
|
|
35
|
+
src/wordpress_api/models/settings.py,sha256=U9U_Qbcr2McYW778YYzVobD8O5QW1VIhjzxljjqVz2o,743
|
|
36
|
+
src/wordpress_api/models/tag.py,sha256=3UzYQb-fO1QEpXTA4X8vIghnKccl5aR8yooaF92gjgE,758
|
|
37
|
+
src/wordpress_api/models/taxonomy.py,sha256=tZ31mBulU8NeSjpclbUVujqlsJB2WR4jjW6bO4ipTW0,1292
|
|
38
|
+
src/wordpress_api/models/theme.py,sha256=lLxbfWkxiHE6Zn4CsiRX8cSCtWmwxJwvgEvD2-KBzec,1552
|
|
39
|
+
src/wordpress_api/models/user.py,sha256=50xMTH8_2g5xLlnNhjXLGf9xrRg3IbkES1nVMblVmHk,1969
|
|
40
|
+
wp_python-0.1.0.dist-info/METADATA,sha256=cHsBOzWybg_DJfwX7rqQBeAbfOkP2pbzr7I6Us9mPRo,373
|
|
41
|
+
wp_python-0.1.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
42
|
+
wp_python-0.1.0.dist-info/RECORD,,
|