yarno 0.2.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.
yarno-0.2.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 alfa
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.
yarno-0.2.0/PKG-INFO ADDED
@@ -0,0 +1,96 @@
1
+ Metadata-Version: 2.4
2
+ Name: yarno
3
+ Version: 0.2.0
4
+ Summary: write bots for we.yarno — cards, inline forms, server-counted polls, live values, voice
5
+ Author: alfa
6
+ License-Expression: MIT
7
+ Project-URL: docs, https://dev.we.yarno.lol/docs
8
+ Project-URL: source, https://github.com/alfaoz/yarno-sdk
9
+ Keywords: yarno,bot,chat,socketio
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Communications :: Chat
18
+ Classifier: Framework :: AsyncIO
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: python-socketio[asyncio_client]>=5.11
23
+ Requires-Dist: aiohttp>=3.9
24
+ Provides-Extra: voice
25
+ Requires-Dist: livekit>=0.17; extra == "voice"
26
+ Dynamic: license-file
27
+
28
+ # yarno
29
+
30
+ write bots for [we.yarno](https://we.yarno.lol) — the invite-only
31
+ servers/channels/voice app.
32
+
33
+ ```bash
34
+ pip install yarno
35
+ ```
36
+
37
+ the shortest complete bot:
38
+
39
+ ```python
40
+ from yarno import Bot
41
+
42
+ bot = Bot() # reads $YARNO_TOKEN
43
+
44
+ @bot.command("hi", "says hi")
45
+ async def hi(ctx):
46
+ return f"hi {ctx.username}"
47
+
48
+ bot.run()
49
+ ```
50
+
51
+ no intents, no command tree, no `sync()` step, no 3-second deadline. your bot
52
+ holds a live socket to the instance, so the decorator *is* the registration
53
+ and a handler can take as long as it needs.
54
+
55
+ ## what you get
56
+
57
+ - **cards** — compose rows, columns, progress bars, images, buttons instead
58
+ of filling in an embed
59
+ - **inline forms** — `ui.input` / `ui.select` / `ui.toggle` / `ui.slider`
60
+ live in the card, in the channel; any click submits the whole form as
61
+ `ctx.values`. no modals.
62
+ - **polls that outlive you** — `ui.button(collect="v:yes")` is counted by the
63
+ server, so votes land while your process is down; read them back with
64
+ `bot.tallies()`
65
+ - **live values** — `ui.ticker` / `ui.bar(rate=...)` advance on every
66
+ viewer's screen; you push state changes, not frames
67
+ - **docked cards** — pin one card above the channel's scroll (now playing,
68
+ scoreboards, countdowns)
69
+ - **autocomplete** — suggest argument values as someone types, over your
70
+ already-open socket
71
+ - **dms, files, reactions, avatars, voice** — `@bot.on_message`,
72
+ `send(files=[...])`, `bot.react()`, `bot.set_avatar()`, and
73
+ `bot.voice_join()` with the `yarno[voice]` extra
74
+ - **buttons that survive restarts** — per-message state lives on the server
75
+ and rides back with every click
76
+
77
+ ## privacy, stated up front
78
+
79
+ a bot sees nothing by default: commands aimed at it, clicks on its own
80
+ cards, and dms it's part of. it does **not** receive channel messages, and
81
+ there is no intent to flip on. the read apis hold the same line.
82
+
83
+ ## docs
84
+
85
+ - [quickstart](https://dev.we.yarno.lol/docs/quickstart) — token to working
86
+ command in about two minutes
87
+ - [cards & components](https://dev.we.yarno.lol/docs/cards)
88
+ - [the full sdk reference](https://dev.we.yarno.lol/docs/sdk)
89
+ - [wire protocol](https://dev.we.yarno.lol/docs/protocol) — for writing a
90
+ bot in another language
91
+
92
+ examples live in [`examples/`](examples/): `pingpong.py` is the core loop,
93
+ `lunchbot.py` is forms + polls + autocomplete + a docked countdown.
94
+
95
+ tokens come from the [dev console](https://dev.we.yarno.lol). we.yarno is
96
+ invite-only; the sdk is public so bots can be written for it.
yarno-0.2.0/README.md ADDED
@@ -0,0 +1,69 @@
1
+ # yarno
2
+
3
+ write bots for [we.yarno](https://we.yarno.lol) — the invite-only
4
+ servers/channels/voice app.
5
+
6
+ ```bash
7
+ pip install yarno
8
+ ```
9
+
10
+ the shortest complete bot:
11
+
12
+ ```python
13
+ from yarno import Bot
14
+
15
+ bot = Bot() # reads $YARNO_TOKEN
16
+
17
+ @bot.command("hi", "says hi")
18
+ async def hi(ctx):
19
+ return f"hi {ctx.username}"
20
+
21
+ bot.run()
22
+ ```
23
+
24
+ no intents, no command tree, no `sync()` step, no 3-second deadline. your bot
25
+ holds a live socket to the instance, so the decorator *is* the registration
26
+ and a handler can take as long as it needs.
27
+
28
+ ## what you get
29
+
30
+ - **cards** — compose rows, columns, progress bars, images, buttons instead
31
+ of filling in an embed
32
+ - **inline forms** — `ui.input` / `ui.select` / `ui.toggle` / `ui.slider`
33
+ live in the card, in the channel; any click submits the whole form as
34
+ `ctx.values`. no modals.
35
+ - **polls that outlive you** — `ui.button(collect="v:yes")` is counted by the
36
+ server, so votes land while your process is down; read them back with
37
+ `bot.tallies()`
38
+ - **live values** — `ui.ticker` / `ui.bar(rate=...)` advance on every
39
+ viewer's screen; you push state changes, not frames
40
+ - **docked cards** — pin one card above the channel's scroll (now playing,
41
+ scoreboards, countdowns)
42
+ - **autocomplete** — suggest argument values as someone types, over your
43
+ already-open socket
44
+ - **dms, files, reactions, avatars, voice** — `@bot.on_message`,
45
+ `send(files=[...])`, `bot.react()`, `bot.set_avatar()`, and
46
+ `bot.voice_join()` with the `yarno[voice]` extra
47
+ - **buttons that survive restarts** — per-message state lives on the server
48
+ and rides back with every click
49
+
50
+ ## privacy, stated up front
51
+
52
+ a bot sees nothing by default: commands aimed at it, clicks on its own
53
+ cards, and dms it's part of. it does **not** receive channel messages, and
54
+ there is no intent to flip on. the read apis hold the same line.
55
+
56
+ ## docs
57
+
58
+ - [quickstart](https://dev.we.yarno.lol/docs/quickstart) — token to working
59
+ command in about two minutes
60
+ - [cards & components](https://dev.we.yarno.lol/docs/cards)
61
+ - [the full sdk reference](https://dev.we.yarno.lol/docs/sdk)
62
+ - [wire protocol](https://dev.we.yarno.lol/docs/protocol) — for writing a
63
+ bot in another language
64
+
65
+ examples live in [`examples/`](examples/): `pingpong.py` is the core loop,
66
+ `lunchbot.py` is forms + polls + autocomplete + a docked countdown.
67
+
68
+ tokens come from the [dev console](https://dev.we.yarno.lol). we.yarno is
69
+ invite-only; the sdk is public so bots can be written for it.
@@ -0,0 +1,36 @@
1
+ [project]
2
+ name = "yarno"
3
+ version = "0.2.0"
4
+ description = "write bots for we.yarno — cards, inline forms, server-counted polls, live values, voice"
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ license-files = ["LICENSE"]
8
+ authors = [{ name = "alfa" }]
9
+ requires-python = ">=3.10"
10
+ dependencies = ["python-socketio[asyncio_client]>=5.11", "aiohttp>=3.9"]
11
+ keywords = ["yarno", "bot", "chat", "socketio"]
12
+ classifiers = [
13
+ "Development Status :: 4 - Beta",
14
+ "Intended Audience :: Developers",
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3.10",
17
+ "Programming Language :: Python :: 3.11",
18
+ "Programming Language :: Python :: 3.12",
19
+ "Programming Language :: Python :: 3.13",
20
+ "Topic :: Communications :: Chat",
21
+ "Framework :: AsyncIO",
22
+ ]
23
+
24
+ [project.optional-dependencies]
25
+ voice = ["livekit>=0.17"]
26
+
27
+ [project.urls]
28
+ docs = "https://dev.we.yarno.lol/docs"
29
+ source = "https://github.com/alfaoz/yarno-sdk"
30
+
31
+ [build-system]
32
+ requires = ["setuptools>=68"]
33
+ build-backend = "setuptools.build_meta"
34
+
35
+ [tool.setuptools]
36
+ packages = ["yarno"]
yarno-0.2.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,20 @@
1
+ """yarno — write bots for we.yarno.
2
+
3
+ from yarno import Bot, ui
4
+
5
+ bot = Bot()
6
+
7
+ @bot.command("hi", "says hi")
8
+ async def hi(ctx):
9
+ return "hi"
10
+
11
+ bot.run()
12
+
13
+ Get a token at https://dev.we.yarno.lol, docs at https://dev.we.yarno.lol/docs.
14
+ """
15
+
16
+ from . import ui
17
+ from .bot import Bot, CommandError, Context, RateLimited, mention
18
+
19
+ __all__ = ["Bot", "Context", "CommandError", "RateLimited", "mention", "ui"]
20
+ __version__ = "0.2.0"