awsprite
A portable client for an AitherSprite-shaped companion service — status, talk, teach, and list. Give a companion a face and a mind, then let several of them talk.
Hatch a companion, teach it something, and watch what it becomes.
awsprite is a client, not the engine — the aw-family rule. awrelay
did not lift AitherRelay.py; it shipped a small standalone client that
speaks to any relay-shaped server. Same move here: the companion's state —
needs that decay over real wall-clock time, a mood derived from those needs,
deterministic evolution through egg → baby → child → teen → adult → elder —
is server-authoritative. This package reads that state, talks to the
companion, and feeds it knowledge. It never re-implements the game, and it
imports nothing from the monorepo: stdlib only, publishable standalone.
Adopt
pip install awsprite
awsprite --url https://sprite.example status
awsprite --url https://sprite.example talk "good morning!"
awsprite --url https://sprite.example teach notes.md
awsprite --url https://sprite.example list
Point --url at any sprite-shaped server, or set AWSPRITE_URL (and
AWSPRITE_TOKEN for a hosted companion that needs a bearer token). Flags
win over env; there is no config file — a companion CLI that silently reads
a stale saved endpoint is worse than one that asks every time.
What it speaks
The sprite-shaped REST surface (Genesis's router is the reference; prefix
/api/v1/aither-sprite):
| method | path | what it does |
|---|---|---|
| GET | /me/status |
needs/mood/evolution state (lighter subset) |
| GET | /me |
full state (public dict) |
| POST | /me/talk |
send a line, get the reply ({"reply", "sprite"}) |
| POST | /me/teach |
feed one knowledge entry ({"sprite", "entry"}) |
| GET | / |
collection root — every known companion ({"sprites": [...]}) |
| POST | /hatch |
hatch a companion (one per owner+tenant) |
| POST | /me/care |
feed / play / clean / rest / pet |
| POST | /me/revive |
wake a dormant companion |
| GET | /me/whisper |
the companion's proactive line (may be null) |
| GET | /me/knowledge |
the knowledge base, wiki-style, newest first |
teach and talk are care actions on the engine too — teaching sates
hunger and raises bond; talking raises bond. The client never needs to know:
each has its own endpoint, and the response always carries the fresh state.
A server that answers 404 on the collection root (the live router today)
reports exactly one companion for list: yours, via /me.
Teach-file format
awsprite teach <file> understands two deterministic layouts:
- Markdown sections — any
#heading opens a section; the heading text is the entry title, the lines until the next heading are the content. - Plain notes — no headings; the file is split on blank lines, the first non-blank line of each chunk is the title, the rest is the content.
Titles and content are truncated to the service's own limits (120 / 4000
characters), never sent whole. --kind fact|skill|link|lore applies to
every entry (default fact); --private requests private visibility
(requires an entitlement on the server).
As a library
from awsprite import SpriteClient
client = SpriteClient("https://sprite.example", token="...")
state = client.status()
print(state["mood_label"], state["needs"])
reply = client.talk("good morning!")["reply"]
client.teach("The ocean", "covers 70% of Earth", kind="fact")
Every method raises SpriteError when the server is unreachable or refuses,
and the error names the URL it tried — never a silent empty reply.
Honest failure
There is no offline mode and no fallback. A companion client with nothing to talk to is not a degraded companion client, it is not a companion client. A talk that returns no reply is an error, not an empty line: the one thing worse than a dead server is a server that looks fine and says nothing.
Exit codes: 0 success, 1 the service refused or was unreachable, 2 the
command could not run at all (bad args, missing AWSPRITE_URL, unreadable
file).
Development
python -m pytest tests/ -q
Stdlib-only by design — no requests, no pydantic, no httpx. The one network
call is urllib.request.urlopen, swappable via SpriteClient(transport=...)
so the whole contract is unit-tested with no network and no mock HTTP stack.
Licence
MIT © Aitherium.
Metadata
Release files for awsprite 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| awsprite-0.1.0.tar.gz | 23.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| awsprite-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.5 kB
Release files / awsprite-0.1.0.tar.gz
| Download URL | awsprite-0.1.0.tar.gz |
|---|---|
| Size | 23.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b845c73903060c5a00cedde86b7050067d7346ff2e082087e41147ec0a0e1125
|
|
BLAKE2b-256 checksum How to use checksums |
043caf5b46993aaae22b69b1d884ac155ab6cca59c3da1f3ac453f645594ba17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / awsprite-0.1.0-py3-none-any.whl
| Download URL | awsprite-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e0054fa4c57174f9293511c0451b3c7b76476d9eb82cbe4e9c56f9b260afed5d
|
|
BLAKE2b-256 checksum How to use checksums |
0e3c7fec977d7b2aec8afc32a495c169bb3f97d90698ef735e4de472aecb9a6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for awsprite 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.