Skip to main content

Slash Command Language (SCL) — Python implementation

Project description

slash_command

Python implementation of the Slash Command Language (SCL) — a minimal syntax for embedding executable commands within natural-language text.

PyPI

See the SCL specification for the full grammar, normative algorithm, and conformance criteria.

Install

pip install slash_command

Usage

from slash_command import parse, Text, Command

doc = parse('Please /search "quantum computing" and then /exit')

for segment in doc:
    if isinstance(segment, Command):
        print(f"command: {segment.name!r}, args: {segment.args}")
    else:
        print(f"text: {segment.content!r}")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slash_command-0.3.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file slash_command-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: slash_command-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for slash_command-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c36cb02c38d17492fb6e9c4ba307cb175b9866b9f1112ccdb6e28dc1a7aa2d6
MD5 fd157441d097033224eb67b66d677aff
BLAKE2b-256 a28dc1c36d825ec2040311b9df2131cce5febc980287e34eb2620b71db86a8b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for slash_command-0.3.0-py3-none-any.whl:

Publisher: pypi-publish.yml on monperrus/slash_command

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page