Skip to main content

lectes

lectes is a simple Python scanner generator. It can be used to easily define scanners with Python code.

Documentation: https://maxcode123.github.io/lectes/

Example

from lectes import Rule, Configuration, Regex, Scanner


config = Configuration(
    [
        Rule(name="FOR", regex=Regex("for")),
        Rule(name="INT", regex=Regex("[0-9]+")),
        Rule(name="ID", regex=Regex("[a-zA-Z][a-zA-Z0-9]*")),
        Rule(name="WHITESPACE", regex=Regex("( )")),
    ]
)

scanner = Scanner(config)

program = "somevar in othervar for 9 let"

for token in scanner.scan(program):
    print(token)

Installation

pip install lectes

Metadata

Release files for lectes 0.3.1

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

Source distribution (sdist)

Source distribution for lectes 0.3.1
File Size Uploaded Provenance Actions
lectes-0.3.1.tar.gz 17.5 kB Without provenance Details for lectes-0.3.1.tar.gz

Built distribution (wheel)

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

Total release size: 39.4 kB

Release files / lectes-0.3.1.tar.gz

Download URL lectes-0.3.1.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7ff94b70cf8b99a29b719bc8e791d867a88187ee84c65ade2ac3403e5224eb90
BLAKE2b-256 checksum
How to use checksums
0f4f5ac63a79e4c49b2d23609c2e577e358e7b1d185afa374a4372a0c2bac5ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"21.3","id":"virginia","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / lectes-0.3.1-py3-none-any.whl

Download URL lectes-0.3.1-py3-none-any.whl
Size 21.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b5b286e7ca61ea266aa3d20e2a27814c1bf2a8567987ea236b58678f2547a3d
BLAKE2b-256 checksum
How to use checksums
d36a068792bc09c9a48e355bd9d16f3c72b686515b24c174e48e1a9ead845153
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"21.3","id":"virginia","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for lectes 0.3.1

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.

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