pyyapper 1.0.0__tar.gz

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.
pyyapper-1.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 PyYapper contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,108 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyyapper
3
+ Version: 1.0.0
4
+ Summary: An intuitive, async Python library for the Yapper bot API.
5
+ Author: PyYapper contributors
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/pyyapper/pyyapper
8
+ Project-URL: Documentation, https://www.yapper.website/developers/
9
+ Project-URL: Repository, https://github.com/pyyapper/pyyapper
10
+ Project-URL: Issues, https://github.com/pyyapper/pyyapper/issues
11
+ Keywords: yapper,bot,api,chat,discord-like
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Communications :: Chat
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Requires-Python: >=3.9
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: aiohttp>=3.9
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest; extra == "dev"
28
+ Requires-Dist: pytest-asyncio; extra == "dev"
29
+ Requires-Dist: build; extra == "dev"
30
+ Requires-Dist: twine; extra == "dev"
31
+ Provides-Extra: docs
32
+ Requires-Dist: mkdocs; extra == "docs"
33
+ Requires-Dist: mkdocs-material; extra == "docs"
34
+ Dynamic: license-file
35
+
36
+ # PyYapper
37
+
38
+ An intuitive, async Python library for the [Yapper](https://www.yapper.website) bot API.
39
+ Designed to feel familiar to `discord.py` users while staying small and dependency-light.
40
+
41
+ ## Install
42
+
43
+ ```bash
44
+ pip install pyyapper
45
+ ```
46
+
47
+ Requires Python 3.9+ and `aiohttp`.
48
+
49
+ ## Quick start
50
+
51
+ ```python
52
+ from pyyapper import Bot
53
+
54
+ bot = Bot("yb_...") # your token from Settings -> Developer
55
+
56
+
57
+ @bot.command("ping", description="Is the bot alive?")
58
+ async def ping(ctx):
59
+ await ctx.reply("pong")
60
+
61
+
62
+ @bot.event
63
+ async def on_ready(me):
64
+ print("online as", me.username)
65
+
66
+
67
+ bot.run()
68
+ ```
69
+
70
+ ## Features
71
+
72
+ - Async-first, with a synchronous `bot.run()` entry point.
73
+ - Decorator-based commands and events (`@bot.command`, `@bot.event`, `@bot.button`).
74
+ - Rich message context: `ctx.reply`, `ctx.say`, `ctx.author_mention`, `ctx.argv`.
75
+ - Button/interaction helpers: `i.reply`, `i.ephemeral`, `i.update`, `i.ack`.
76
+ - `Embed`, `Button`, `Row` builders with chaining.
77
+ - Typed data models (`User`, `Message`, `Channel`, ...) and a full exception hierarchy.
78
+ - Automatic retry on `429` with `Retry-After`, exponential backoff, timeouts.
79
+ - Long-polling event loop with cursor tracking (nothing lost on reconnect).
80
+
81
+ ## Error handling
82
+
83
+ ```python
84
+ from pyyapper import Bot, NotFound, Forbidden, RateLimited
85
+
86
+ bot = Bot("yb_...")
87
+
88
+ async def main():
89
+ try:
90
+ await bot.delete("some-channel", "some-message")
91
+ except NotFound:
92
+ print("message already gone")
93
+ except Forbidden:
94
+ print("missing Manage messages permission")
95
+ except RateLimited as e:
96
+ print("slow down, retry after", e.retry_after)
97
+
98
+ import asyncio
99
+ asyncio.run(main())
100
+ ```
101
+
102
+ ## Documentation
103
+
104
+ See the Yapper developer docs: https://www.yapper.website/developers
105
+
106
+ ## License
107
+
108
+ MIT
@@ -0,0 +1,73 @@
1
+ # PyYapper
2
+
3
+ An intuitive, async Python library for the [Yapper](https://www.yapper.website) bot API.
4
+ Designed to feel familiar to `discord.py` users while staying small and dependency-light.
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ pip install pyyapper
10
+ ```
11
+
12
+ Requires Python 3.9+ and `aiohttp`.
13
+
14
+ ## Quick start
15
+
16
+ ```python
17
+ from pyyapper import Bot
18
+
19
+ bot = Bot("yb_...") # your token from Settings -> Developer
20
+
21
+
22
+ @bot.command("ping", description="Is the bot alive?")
23
+ async def ping(ctx):
24
+ await ctx.reply("pong")
25
+
26
+
27
+ @bot.event
28
+ async def on_ready(me):
29
+ print("online as", me.username)
30
+
31
+
32
+ bot.run()
33
+ ```
34
+
35
+ ## Features
36
+
37
+ - Async-first, with a synchronous `bot.run()` entry point.
38
+ - Decorator-based commands and events (`@bot.command`, `@bot.event`, `@bot.button`).
39
+ - Rich message context: `ctx.reply`, `ctx.say`, `ctx.author_mention`, `ctx.argv`.
40
+ - Button/interaction helpers: `i.reply`, `i.ephemeral`, `i.update`, `i.ack`.
41
+ - `Embed`, `Button`, `Row` builders with chaining.
42
+ - Typed data models (`User`, `Message`, `Channel`, ...) and a full exception hierarchy.
43
+ - Automatic retry on `429` with `Retry-After`, exponential backoff, timeouts.
44
+ - Long-polling event loop with cursor tracking (nothing lost on reconnect).
45
+
46
+ ## Error handling
47
+
48
+ ```python
49
+ from pyyapper import Bot, NotFound, Forbidden, RateLimited
50
+
51
+ bot = Bot("yb_...")
52
+
53
+ async def main():
54
+ try:
55
+ await bot.delete("some-channel", "some-message")
56
+ except NotFound:
57
+ print("message already gone")
58
+ except Forbidden:
59
+ print("missing Manage messages permission")
60
+ except RateLimited as e:
61
+ print("slow down, retry after", e.retry_after)
62
+
63
+ import asyncio
64
+ asyncio.run(main())
65
+ ```
66
+
67
+ ## Documentation
68
+
69
+ See the Yapper developer docs: https://www.yapper.website/developers
70
+
71
+ ## License
72
+
73
+ MIT
@@ -0,0 +1,47 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "pyyapper"
7
+ version = "1.0.0"
8
+ description = "An intuitive, async Python library for the Yapper bot API."
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.9"
12
+ authors = [
13
+ { name = "PyYapper contributors" },
14
+ ]
15
+ keywords = ["yapper", "bot", "api", "chat", "discord-like"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Intended Audience :: Developers",
19
+
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.9",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Programming Language :: Python :: 3.13",
26
+ "Topic :: Communications :: Chat",
27
+ "Topic :: Software Development :: Libraries :: Python Modules",
28
+ ]
29
+ dependencies = [
30
+ "aiohttp>=3.9",
31
+ ]
32
+
33
+ [project.optional-dependencies]
34
+ dev = ["pytest", "pytest-asyncio", "build", "twine"]
35
+ docs = ["mkdocs", "mkdocs-material"]
36
+
37
+ [project.urls]
38
+ Homepage = "https://github.com/pyyapper/pyyapper"
39
+ Documentation = "https://www.yapper.website/developers/"
40
+ Repository = "https://github.com/pyyapper/pyyapper"
41
+ Issues = "https://github.com/pyyapper/pyyapper/issues"
42
+
43
+ [tool.setuptools.packages.find]
44
+ where = ["src"]
45
+
46
+ [tool.setuptools.package-data]
47
+ pyyapper = ["py.typed"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,48 @@
1
+ """PyYapper - an intuitive, async Python library for the Yapper bot API.
2
+
3
+ Example::
4
+
5
+ import asyncio
6
+ from pyyapper import Bot
7
+
8
+ bot = Bot("yb_...")
9
+
10
+ @bot.command("ping", description="Is the bot alive?")
11
+ async def ping(ctx):
12
+ await ctx.reply("pong")
13
+
14
+ @bot.event
15
+ async def on_ready(me):
16
+ print("online as", me.username)
17
+
18
+ bot.run()
19
+ """
20
+
21
+ from . import _version
22
+ from .bot import Bot, Context, InteractionContext
23
+ from .embeds import Embed
24
+ from .buttons import Button, Row
25
+ from .errors import (
26
+ YapperError,
27
+ ConfigurationError,
28
+ HTTPException,
29
+ BadRequest,
30
+ Unauthorized,
31
+ Forbidden,
32
+ NotFound,
33
+ RateLimited,
34
+ ServerError,
35
+ )
36
+ from .models import (
37
+ User, Server, Channel, Category, Member, Message, Role,
38
+ )
39
+
40
+ __version__ = _version.__version__
41
+ __all__ = [
42
+ "Bot", "Context", "InteractionContext",
43
+ "Embed", "Button", "Row",
44
+ "YapperError", "ConfigurationError", "HTTPException",
45
+ "BadRequest", "Unauthorized", "Forbidden", "NotFound", "RateLimited", "ServerError",
46
+ "User", "Server", "Channel", "Category", "Member", "Message", "Role",
47
+ "__version__",
48
+ ]
@@ -0,0 +1 @@
1
+ __version__ = "1.0.0"