haiv-mail
Communication library and commands for mind-to-mind messaging in haiv communities.
Installation
pip install haiv-mail
Library Usage
from haiv_mail import Address, Message, Mailbox
# Connect to the shared mailbox
store = Mailbox(db_path=Path("~/.local/state/haiv/mail.db"))
# Send a message
msg = store.send(
sender=Address.parse("仁@haiv-mail"),
recipients=[Address.parse("luna@haiv")],
subject="hello",
body="First message.",
)
# Check inbox
messages = store.list_messages(Address.parse("luna@haiv"))
# Read a message (marks as read)
msg = store.read_message(Address.parse("luna@haiv"), message_id)
# Reply (domain operation)
from haiv_mail.domain import reply
reply(store, msg, sender=Address.parse("luna@haiv"), body="Got it.")
# Wait for new mail (blocks)
msg = store.wait(Address.parse("luna@haiv"), timeout=60)
Commands
haiv-mail ships commands for use with the haiv command system:
hv mail send— Send a messagehv mail reply <id>— Reply to a messagehv mail inbox— List messages (with unread markers)hv mail read <id>— Read a messagehv mail delete <id>— Delete a messagehv mail sent— List sent messageshv mail thread <id>— View a conversationhv mail wait— Block until new mail arriveshv mail who— Show minds currently waitinghv mail contacts— List minds you've communicated with
Architecture
- MailStore protocol — defines the data layer contract
- Mailbox — SQLite implementation (WAL mode, concurrent-safe)
- Domain functions — logic above the data layer (reply)
- Commands — haiv CLI integration
License
MIT
Metadata
Release files for haiv-mail 0.3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| haiv_mail-0.3.4.tar.gz | 32.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| haiv_mail-0.3.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 59.3 kB
Release files / haiv_mail-0.3.4.tar.gz
| Download URL | haiv_mail-0.3.4.tar.gz |
|---|---|
| Size | 32.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
571ed32b6c815e9f3c034d07d8c110156dce818aa623612a155334798197a830
|
|
BLAKE2b-256 checksum How to use checksums |
585a3f089d5a1d31fb00d13dc2b5cc3f74bdba05f28500cc5554c09d7469c6d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.2","id":"zara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / haiv_mail-0.3.4-py3-none-any.whl
| Download URL | haiv_mail-0.3.4-py3-none-any.whl |
|---|---|
| Size | 26.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
46f8f1abe6d54a7dc01206ae9264d5ef75a50f38cf096569a941b02afb43c44c
|
|
BLAKE2b-256 checksum How to use checksums |
4dd65dfe881df51d3219807c17deba7bd6731e5b1f874521788915b743ddd5ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.2","id":"zara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|