Skip to main content

ya_tagscript - Yet Another TagScript fork

GitHub Actions Workflow Status pre-commit.ci status Read the Docs (version) Code style: black

Current stable version: v1.7.2

Information

This is a fork of PhenoM4n4n's TagScript, which itself is a fork of JonSnowbd's TagScript, a string templating language.

The main purpose of this fork is to align the Discord-specific blocks with the most recent Discord and discord.py changes (new username system, etc.).

What?

TagScript is a drop-in, easy-to-use string interpreter that lets you provide users with ways of customizing their profiles or chat rooms with interactive text.

For example TagScript comes out of the box with a random block that would let users provide a template that produces a new result each time its ran, or assign math and variables for later use.

Changes in v1

The newly released v1 includes a complete rewrite of the entire parsing and interpretation performed by the TagScriptInterpreter class. This comes with some subtle behavioural changes but great care was taken to keep v1 behaviourally similar to v0 and PhenoM4n4n's fork. Most simple uses should behave the same but especially deeply nested scripts or dynamically assembled ones will most likely require adjustments. Some documentation examples were also outright wrong, so those were also adjusted to reflect the actual behaviour of the pre-existing interpreter.

Oh, no! Behaviour changes?!

To remove the need for dynamically assembled blocks (e.g. command blocks that only happen under some circumstances), v1 only performs interpretation of branches that were actually hit (to the best of its ability).

Take this (very bad) password check script:

{if({args}==123):{command:echo password accepted!}|something else}

If {args} is not in fact equal to 123, the interpreter WILL NOT interpret the command block AT ALL. It jumps straight to the else section after the | and only interprets that. This means that for any incorrect values of {args}, the echo command is NOT included in the list of commands in response.actions.get("commands").

Other blocks with some conditional executions (like all or any) do the same.

Installation

Download the latest version through pip:

pip install ya_tagscript

or

pip install git+https://github.com/MajorTanya/ya_tagscript.git@v1.7.2

Download from a commit:

pip install git+https://github.com/MajorTanya/ya_tagscript.git@<COMMIT_HASH>

Install for editing/development:

git clone https://github.com/MajorTanya/ya_tagscript.git
pip install -e ./ya_tagscript

Dependencies

  • Python>=3.11
    • before v1.4.0, this was effectively >=3.12 due to an oversight in testing
    • after v1.4.0, Python 3.11 is actually supported
  • discord.py>=2.5.0
  • pyparsing>=3.2.0
  • python-dateutil>=2.9.0

Metadata

Release files for ya-tagscript 1.7.2

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

Source distribution (sdist)

Source distribution for ya-tagscript 1.7.2
File Size Uploaded Provenance Actions
ya_tagscript-1.7.2.tar.gz 113.3 kB With provenance Details for ya_tagscript-1.7.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ya-tagscript 1.7.2
File Interpreter ABI Platform Actions
ya_tagscript-1.7.2-py3-none-any.whl Python 3 none any Details for ya_tagscript-1.7.2-py3-none-any.whl

Total release size: 201.2 kB

Release files / ya_tagscript-1.7.2.tar.gz

Download URL ya_tagscript-1.7.2.tar.gz
Size 113.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ef9aac175ba4d54fb6a5a30ee4ea1aa7f72b0eaf7cc04c997b4688237072a96c
BLAKE2b-256 checksum
How to use checksums
b9bb56f2a314ea864fb72cfd096728622f801540d37afc2f1520850409442909
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jul 15, 2026.

Transparency log

Release files / ya_tagscript-1.7.2-py3-none-any.whl

Download URL ya_tagscript-1.7.2-py3-none-any.whl
Size 87.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20ef2f1a3e4292a8c964e5dcb12182b5580608fa02e3acb0c6aeb7cc078eb352
BLAKE2b-256 checksum
How to use checksums
172d5a41961f87b8fe92beb790f84baca83426917c2e7c0359db71003776b443
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jul 15, 2026.

Transparency log

Security for ya-tagscript 1.7.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ya_tagscript-1.7.2.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 Jul 15, 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.

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