Gobble
Simpler Parsing in Python.
Usage
from gobble import *
Basic parsers:
@parser
def natural():
digits = yield character('0123456789').star
return int(''.join(digits))
Alternatives:
@parser
def literal_null():
yield literal('NULL')
return None
literal = natural / literal_null
Optional elements:
@parser
def natural():
sign = yield character('-+').option('+')
factor = {'-': -1, '+': 1}[sign]
value = yield natural
return value * factor
Sequencing with operators:
whitespace = character(' \n\r\t').star
literal_expr = literal << whitespace
Actually running a parser:
value = literal_expr.execute(input_string)
print(value)
Metadata
Release files for gobble 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| gobble-0.1.1.tar.gz | 3.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gobble-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.6 kB
Release files / gobble-0.1.1.tar.gz
| Download URL | gobble-0.1.1.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b32d6553d5e97465742d0fdd9df01599f9808f447daaf8dd0db8ce998566c85
|
|
BLAKE2b-256 checksum How to use checksums |
a531a413bf5bb8b45fc04ad267a2378982911b19d24277e58d413ac511dba5eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / gobble-0.1.1-py3-none-any.whl
| Download URL | gobble-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cf56725b3d007b5fe1428184f569b211ed94d64428e87f5441f2865956ca267f
|
|
BLAKE2b-256 checksum How to use checksums |
fa4fd354e41eba614376620a0bec24c72d59a25a67a8fe6d4f760e5b8090cbf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for gobble 0.1.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.