Jarvis
This is the repository for the JarvisCore framework used to run the Jarvis the twitch bot. You are welcome to use this library to build your own bot for twitch, please note that there is currently minimal documentation which does tend to make things a little tricky.
You are welcome to join the "Looking for Jarvis" Discord server for updates and to join the community.
Getting Started
The simplest way to get started is to create a new file, with the basic code below:
from jarviscore.client import Client
jarvis = Client(nick="yourbotsname",
token="yourbotstoken",
channels=["a list", "of channels", "to connect to"])
jarvis.start()
As an alternative, better practice would be to make use of a config file to store your settings and loading them into the bot when you start.
Use the following code for your bot as a starter.
from jarviscore.client import Client
from jarviscore import Settings
setting = Settings()
jarvis = Client(nick=setting.get_setting("nick"),
token=setting.get_setting("token"),
channels=setting.get_setting("channels"))
jarvis.start()
Next, create a file called config.json and use the following template to get started
{
"name": "yourbotsname",
"token": "yourbotstoken",
"channels": [
"a list", "of channels", "to connect to"
]
}
If you prefer, you may use a config.yaml file instead.
Custom Modules
You can create your own custom modules and interactions for your bot using the Jarvis Core.
Create a folder called modules in the same location as your bot file like so,
+-- root
| |-- bot.py
| |-- config.json
| +-- modules
| |-- module1.py
| |-- module2.py
Then, copy the following boiler plate text to get started. This example implements a simple ping module.
Note: All modules need to implement setup() and teardown(), both take channel as a parameter.
from jarviscore import Module, Log
from jarviscore import CommandMessage
log = Log("Module:Ping", verbose="log")
class Ping(Module):
def __init__(self, channel):
Module.__init__(self, "Ping")
self.channel = channel
def on_command(self, data: CommandMessage):
if "ping" == data.KEYWORD:
self.channel.send("pong")
def setup(channel):
channel.load_module(Ping(channel))
log.log(f"Loaded Module Ping")
def teardown(channel):
log.log(f"Removed Module Ping")
Metadata
Release files for jarviscore 0.1.1.426
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 |
|---|---|---|---|---|
| jarviscore-0.1.1.426.tar.gz | 26.5 kB | Without provenance | Details for jarviscore-0.1.1.426.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jarviscore-0.1.1.426-py3-none-any.whl | Python 3 | none | any | Details for jarviscore-0.1.1.426-py3-none-any.whl |
Total release size: 58.1 kB
Release files / jarviscore-0.1.1.426.tar.gz
| Download URL | jarviscore-0.1.1.426.tar.gz |
|---|---|
| Size | 26.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
296c9228089211904a52e847ad3d9c5731391f8e98fec7f6381efdf23cf880f7
|
|
BLAKE2b-256 checksum How to use checksums |
322896ded637b9f9644204cf8634240c408798e078aee26ff36252b043f56013
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1
|
Release files / jarviscore-0.1.1.426-py3-none-any.whl
| Download URL | jarviscore-0.1.1.426-py3-none-any.whl |
|---|---|
| Size | 31.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c3a385b4596b0f098cfe5bcf67825ecb071b12dfdc21e497e82cac6a48426fc
|
|
BLAKE2b-256 checksum How to use checksums |
24a18da47c3642e7e2ef3a7cd1cfbebe374956f664ac038d1539b2a5d42e1927
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1
|
Security for jarviscore 0.1.1.426
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.