pytlas-broker

Library and Command Line Utilities to communicate with the pytlas open-source assistant using channels (such as GSM or MQTT).
Purpose
It wraps the pytlas library in a tiny server accessible from multiple channels to make it easy to create clients in the language of your choice to trigger user agents.
Installation
$ pip install pytlas_broker # Gets the latest release from pypi
$ git clone https://github.com/atlassistant/pytlas-broker && cd pytlas-broker && pip install -e . # or directly from source
Getting started
For now, both the server and the client CLI communicates with an MQTT server. If you wish to provider host, port and credentials, just sets pytlas settings in the mqtt section:
[pytlas]
skills_dir=skills/
[mqtt]
host=localhost
port=1883
username=
password=
Server
At the moment, the CLI will serve agents loaded from a configuration folder using MQTT.
It assumes the following directory structure:
your_data_folder/
default/ # Represents the default directory if the user does not have one
skills/ # Referenced via the below pytlas.ini file
cache/ # Cache folder for pytlas interpreter
pytlas.ini # This file will be loaded at startup by the CLI for initial configuration
john/
cache/ # Cache folder specific for that user
pytlas.ini # May override settings for this user only
When the server receive a message from an opened channel, it will create an agent for the user (if it doesn’t exist yet) and answer on the last available channel for that user.
To start the broker, use the following command:
$ pytlas-broker serve your_data_folder/
And if you have already cloned the pytlas repository in the previous folder, you can serve the examples right away using:
$ pytlas-broker serve ../pytlas/ --default example
Client
Once your server is running, you can start a tiny REPL client with the command:
$ pytlas-broker repl
Testing
$ pip install -e .[test]
$ python -m nose --with-doctest -v --with-coverage --cover-package=pytlas_broker
Linting
$ pylint --rcfile .pylintrc pytlas_broker setup.py # in the root directory
Metadata
Release files for pytlas-broker 1.0.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 | Actions |
|---|---|---|---|---|
| pytlas_broker-1.0.0.tar.gz | 15.3 kB | Without provenance | Details for pytlas_broker-1.0.0.tar.gz |
Release files / pytlas_broker-1.0.0.tar.gz
| Download URL | pytlas_broker-1.0.0.tar.gz |
|---|---|
| Size | 15.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73bd69dba645698c5402e5da44ca20dce673656ecc3978455b95cb39d5745ce4
|
|
BLAKE2b-256 checksum How to use checksums |
77aa30ec7583607e29047078a4b0112619631abf6a8635451171eaad00702170
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Security for pytlas-broker 1.0.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.