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.

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.2.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slash_command-0.2.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 970b1af55625260f8884f497d4518997fcc75e5c2466f8bc5cf8065be53e78ae
MD5 dc5f594e6f190080e5748d7e1d32114d
BLAKE2b-256 fc08dcb922ddeb71bd0645684e0da54acbbef83e217682e49267c8013c86d845

See more details on using hashes here.

Provenance

The following attestation bundles were made for slash_command-0.2.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