Skip to main content

pinhook

Supported Python versions Package License PyPI package format Package development status With love from tilde.town

The pluggable python framework for IRC bots and Twitch bots

Documentation: https://archangelic.github.io/pinhook/

Installation

pip install pinhook

Quick start

Make a plugins folder with this in plugins/hello.py:

import pinhook.plugin

@pinhook.plugin.command('!hello', help_text='says hello back')
def hello(msg):
    return pinhook.plugin.message('hi {}!'.format(msg.nick))

Then start a bot, from a python file:

from pinhook.bot import Bot

bot = Bot(
    channels=['#foo'],
    nickname='ph-bot',
    server='irc.libera.chat',
    port=6697,
    ssl_required=True,
)
bot.start()

or from a config file, with pinhook config.yaml:

nickname: "ph-bot"
server: "irc.libera.chat"
port: 6697
ssl_required: true
channels:
    - "#foo"

Say !hello in #foo and the bot answers.

Learn more

Examples

There are some basic examples in the examples directory in this repository.

Here is a list of live bots using pinhook:

  • pinhook-tilde - fun bot for tilde.town
  • adminbot - admin helper bot for tilde.town, featuring some of the ways you can change the Bot class to suit your needs

Metadata

Release files for pinhook 1.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pinhook 1.12.0
File Size Uploaded Provenance Actions
pinhook-1.12.0.tar.gz 38.3 kB With provenance Details for pinhook-1.12.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pinhook 1.12.0
File Interpreter ABI Platform Actions
pinhook-1.12.0-py3-none-any.whl Python 3 none any Details for pinhook-1.12.0-py3-none-any.whl

Total release size: 60.9 kB

Release files / pinhook-1.12.0.tar.gz

Download URL pinhook-1.12.0.tar.gz
Size 38.3 kB
Tags Source
SHA-256 checksum
How to use checksums
611b2a9c1732389c123e7bcf0be370f7a6d65b17cf56c337309e2df3954d2527
BLAKE2b-256 checksum
How to use checksums
93a1f840bc91903afb747dc87e9f20f443debada350c0fa057fd230fa0225ca7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Release files / pinhook-1.12.0-py3-none-any.whl

Download URL pinhook-1.12.0-py3-none-any.whl
Size 22.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c2d5176524bed2e365bedada8a4442bfdd9dbf4bdd612f91cd5cf20b1295be4e
BLAKE2b-256 checksum
How to use checksums
2c0c99a652a31a89b1e4feffdd2a20f285980c40d4e51a94c34a8e5c7161e23f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Security for pinhook 1.12.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pinhook-1.12.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

1.12.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page