Skip to main content

Pudding converts text to a structured format, such as XML, JSON or YAML.

Project description

Pudding

Coverage Status Documentation Status

Pudding converts text files into structured formats such as XML, JSON, or YAML. The syntax and parsing rules are defined using a custom DSL in .pud files.

The idea is based on Gelatin.

Features

  • Convert text to XML, JSON, and YAML
  • Custom grammar and rule definitions (.pud files)
  • Modular and extensible design
  • Supports complex parsing and output operations

Usage

CLI

pudding -s <SYNTAX> -f <FORMAT> <INPUT>
  • <SYNTAX>: Path to the syntax file
  • <FORMAT>: "xml", "json", or "yaml"
  • <INPUT>: File to convert

Python

Import convert_file, convert_files or convert_string:

from pudding import convert_file, convert_files, convert_string

Or directly import the Compiler, Context and Processor classes and create your own functions, statements or Writer.

Example

See files in tests/data folder.

Project details


Download files

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

Source Distribution

pudding-1.1.0.tar.gz (40.1 kB view details)

Uploaded Source

Built Distribution

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

pudding-1.1.0-py3-none-any.whl (58.6 kB view details)

Uploaded Python 3

File details

Details for the file pudding-1.1.0.tar.gz.

File metadata

  • Download URL: pudding-1.1.0.tar.gz
  • Upload date:
  • Size: 40.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pudding-1.1.0.tar.gz
Algorithm Hash digest
SHA256 49122f473fae572a6f2248f80c84102488ecb7f25af228c37a3e86132c1dc85b
MD5 e4d5f370c2af70685adf499dc2536aaa
BLAKE2b-256 7ca590387c0963a23b8863c0ade4ca2b947f2a5b11b0fe8f386e4c58d13ae8ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for pudding-1.1.0.tar.gz:

Publisher: publish.yml on Hekxsler/pudding

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

File details

Details for the file pudding-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pudding-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 58.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pudding-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d2ea7110059d790c3b51b1ed6f412f38e5bc16e657eca902efe721cf0f804b4e
MD5 c3c2819bef8cd1084adf70ef51775700
BLAKE2b-256 4aff72981bab6ac5ba4ea67e15d79061fff0b39cda09aab01164286a78843e6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pudding-1.1.0-py3-none-any.whl:

Publisher: publish.yml on Hekxsler/pudding

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