README
ejabberdctl.py provides Python client for Ejabberd XML-RPC Administration API.
Installation
pip install ejabberdctl.py
git clone https://gitlab.com/markuz/ejabberdctl.py.git ejabberdctlpy cd ejabberdctlpy python setup.py install
Usage
Simple example which displays Ejabberd status (assuming that XML-RPC runs on 127.0.0.1 and port 4560):
from ejabberdctl import ejabberdctl host = 'example.com' username = 'admin' password = 'admin' ejabberdctl = ejabberdctl(host, username, password) print ejabberdctl.status()
The same example with custom setting of XML-RPC host:
from ejabberdctl import ejabberdctl
host = 'example.com'
username = 'admin'
password = 'admin'
ejabberdctl = ejabberdctl(host, username, password,
protocol='https', server='example.com', port=4560,
admin=True, verbose=True)
print ejabberdctl.status()
Host vs Server
host is the domain served by Ejabberd (ie. one of your hosts defined in ejabberd.yml).
server is the server IP where Ejabberd runs the XML-RPC module. Typically it is configured to run on 127.0.0.1 (localhost) on port 4560.
Tests
from ejabberdctl.tests import ejabberdctl_tests SERVER = 'example.com' USERNAME = 'admin' PASSWORD = 'admin' tests = ejabberdctl_tests(SERVER, USERNAME, PASSWORD) tests.run_all()
Coverage
Number of Ejabberd XML-RPC Administration API commands in ejabberdctl.py:
egrep "def " ejabberdctl.py|grep -v "def __init__\|def ctl"|wc -l 126
Implementation
Number of implemented commands:
egrep "def " ejabberdctl.py|grep -v "def __init__\|def ctl\|TODO"|wc -l 72
Number of commands to implement:
egrep "def " ejabberdctl.py|grep -v "def __init__\|def ctl"|grep TODO|wc -l 54
Tests
Number of tests in the testing suite:
egrep "def " tests.py|grep -v "def __init__\|def run_all\|TODO"|wc -l 31
Number of tests to implement:
egrep "def " tests.py|grep -v "def __init__\|def run_all"|grep TODO|wc -l 95
Contributing
If you wish to help out with the project, please see todo.txt for a list of tasks that need doing.
Changelog
v0.2
changed ejabberdctl.py constructor - host is now server and server is now host ie. the terminology is aligned with what those inputs mean. Also see README; Host vs Server information.
v0.1
initial version
Metadata
Release files for ejabberdctl.py 0.2
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 | |
|---|---|---|---|---|
| ejabberdctl.py-0.2.tar.gz | 11.7 kB | Without provenance | Details |
Release files / ejabberdctl.py-0.2.tar.gz
| Download URL | ejabberdctl.py-0.2.tar.gz |
|---|---|
| Size | 11.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
026020a3f4cc61807667d515168c9e511f094be02ca8c8b108646130e3bc6d4e
|
|
BLAKE2b-256 checksum How to use checksums |
213e44a2fa00dcd60527851ef53277aaee41bcc6b903fbcd5c1c4e68eacdb46c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for ejabberdctl.py 0.2
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.