Sendi
Sendi is just another xmppsend script. Sendi is based on python slixmpp library and support fews modern features like HTTP Upload and Omemo.
Usage
To use it, you have to create a config file that permit us to access login information.
The default path of config file is $XDG_CONFIG_HOME/sendi/config.toml
[section_name]
host="mysuperndd.ndd" # host of the jabber server, default to localhost
port=5222 # jabber port to use, 5222 is the default
password="superpassword" # JID account password, this is required
jid="user@mysuperndd.ndd" # JID of the sender user, this is required
# Connection can be either
# - "standard" which mean Starttls based.
# - "tls" using directly tls connection.
# standard is the default
connection_type="standard"
# Security level can be either
# - "simple" : don't encrypt end2end
# - "encrypted" use omemo (XEP-0384 and XEP-0454)
# standard is the default
security_level="simple"
# Lang metadata in message to send, default to en
# this is rarely used by software but may be useful in some case
lang="en"
# log level for logging of sendi and library used.
# default to ERROR (40)
# other value : 10: DEBUG, 20:INFO, 30:WARN, 50: CRITICAL
loglevel=0 # max log
# custom omemo cache path, by default use "$XDG_CACHE_HOME/sendi/@bare_jid@.json" based path to keep
# omemo config for all jid used.
omemo_cache_file_path= "/tmp/mycache.json"
# force delete omemo cache path before running, useful if cache is broken.
clear_omemo_cache=true
Command line Usage
$ sendi [OPTIONS] CONFIG_NAME TARGETS...
Arguments:
CONFIG_NAME: Config section to use form the config_file[required]TARGETS...: List of jabber id of receivers [required]
Options:
--message TEXT: simple text message to send.--file-path PATH: path of the file to send (using http-upload feature)--config-file PATH: Config file in toml [default: $XDG_CONFIG_HOME/sendi/config.toml]--install-completion: Install completion for the current shell.--show-completion: Show completion for the current shell, to copy it or customize the installation.--help: Show this message and exit.
Config file sample:
Dev install
Install pyinvoke and then:
pip install invoke
invoke init
Run python code:
invoke build
# Typer Cli
rye run sendi
CONFIG_NAME="user"
CONFIG_PATH="config.toml"
TARGET="receiver@localhost"
rye run sendi $CONFIG_NAME $TARGET --config-file=$CONFIG_PATH --message="Ping !" --file-path=tests/test_image.jpg
Install Using Container(podman):
CONFIG_NAME="user"
CONFIG_PATH="config.toml"
TARGET="receiver@localhost"
invoke build
invoke build-container
podman run -v $PWD:/mnt localhost/sendi $CONFIG_NAME $TARGET --config-file=/mnt/$CONFIG_PATH --message="Ping !" --file-path=/mnt/tests/test_image.jpg
Experimental: Install as Deb using Wheel2deb.
Use this method only if you know what you are doing, this may break your system. I tested this only in debian-bookworm.
invoke init-deb
invoke build-deb
cd deb
ls -la *.deb
# Only 5 lib from the huge number of generated lib are require to make sendi work.
# I prefer to keep debian as standard as possible.
sudo apt install ./python3-twomemo_*.deb ./python3-oldmemo_*.deb
sudo apt install ./python3-omemo*.deb
sudo apt install ./python3-slixmpp_*.deb
sudo apt install ./python3-slixmpp-omemo_*.deb
sudo apt install ./python3-sendi_*.deb
Build Container for arm64 arch on amd64 host
- you need buildah (podman) and qemu_user_static.
- clean up
distanddebdir. invoke build.invoke container-build -p linux/arm64.
FAQ ?
- Why this name, sendi ?
It's an esperanto verb: https://en.wiktionary.org/wiki/sendi
- Why AGPL v3 ?
I used slixmpp, slixmpp-omemo and reuse some part of the old apprise xmpp plugin which as been dropped. The license rule make possible to release all the stuff only under the agplv3 license which is the slixmpp-omemo one.
Metadata
Release files for sendi 1.1
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 | Actions |
|---|---|---|---|---|
| sendi-1.1.tar.gz | 269.7 kB | Without provenance | Details for sendi-1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sendi-1.1-py3-none-any.whl | Python 3 | none | any | Details for sendi-1.1-py3-none-any.whl |
Total release size: 293.0 kB
Release files / sendi-1.1.tar.gz
| Download URL | sendi-1.1.tar.gz |
|---|---|
| Size | 269.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
26ab0731307cf37ba3764b36e91a2c17ee47a679ef7bdd9635d161232df98547
|
|
BLAKE2b-256 checksum How to use checksums |
90bb45c7e148b429ca75c9ee75f36d1f1eba37c330851d244ba16add3a067f2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.2
|
Release files / sendi-1.1-py3-none-any.whl
| Download URL | sendi-1.1-py3-none-any.whl |
|---|---|
| Size | 23.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
61aab6ea641634c4bec110dd707a220ac98df0a5f2e6e97990d5206003de3a88
|
|
BLAKE2b-256 checksum How to use checksums |
cee3c627f0be024b483abd5f1bc04d87540fbcf11fe431bada717743957bb2c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.2
|
Security for sendi 1.1
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.