zyntex


Namezyntex JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/xXenvy/zyntex
SummaryA high-level Python package to parse Zig code.
upload_time2025-09-09 18:07:17
maintainerNone
docs_urlNone
authorxXenvy
requires_python>=3.9
licenseMIT
keywords zig parser codegen
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Zyntex - High-level Zig parser for Python
**Docs:** https://zyntex.readthedocs.io/en/latest

Zyntex is a Python library that allows you to parse and generate Zig code at a high level.
Function bodies and other low-level constructs are currently returned as raw strings.
Support for deeper elements is planned. Internally, it uses bindings to Zig's std AST parser,
making it both fast and memory-efficient.
Important: currently bindings are only available for `windows-x86_64`, `macos-x86_64`, and `linux-x86_64`.
On other architectures the library will not work. Support for additional targets is planned,
but low priority.

**Be aware that the project is at a very early stage of development
and is actively being developed.**

## Features

- Parse Zig source from strings or files.
- Code generation - emitting Zig code from Python objects via premade printers.
- High-performance, low-memory parsing powered by Zig’s `std` parser.
- Easy-to-use, Pythonic API designed for inspection Zig code.

## Installation

```bash
pip install zyntex
```

## Minimal example
```python
from typing import cast

from zyntex.code_generation.premade import DefaultCodePrinter
from zyntex.syntax import VariableDeclaration
from zyntex import SourceCode

code_printer = DefaultCodePrinter()
src = SourceCode("const result: usize = 15 + 15;")

variable = cast(VariableDeclaration, src.content[0])
variable.is_public = True
print(code_printer.print(src)) # pub const result: usize = 15 + 15;
```

For questions or contributions, open an issue or PR on the project repository.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/xXenvy/zyntex",
    "name": "zyntex",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "zig parser codegen",
    "author": "xXenvy",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/73/9e/22b302ab7976a660416e11b16a443cdb98d6e402a03b9393df683e932702/zyntex-0.1.3.tar.gz",
    "platform": null,
    "description": "# Zyntex - High-level Zig parser for Python\n**Docs:** https://zyntex.readthedocs.io/en/latest\n\nZyntex is a Python library that allows you to parse and generate Zig code at a high level.\nFunction bodies and other low-level constructs are currently returned as raw strings.\nSupport for deeper elements is planned. Internally, it uses bindings to Zig's std AST parser,\nmaking it both fast and memory-efficient.\nImportant: currently bindings are only available for `windows-x86_64`, `macos-x86_64`, and `linux-x86_64`.\nOn other architectures the library will not work. Support for additional targets is planned,\nbut low priority.\n\n**Be aware that the project is at a very early stage of development\nand is actively being developed.**\n\n## Features\n\n- Parse Zig source from strings or files.\n- Code generation - emitting Zig code from Python objects via premade printers.\n- High-performance, low-memory parsing powered by Zig\u2019s `std` parser.\n- Easy-to-use, Pythonic API designed for inspection Zig code.\n\n## Installation\n\n```bash\npip install zyntex\n```\n\n## Minimal example\n```python\nfrom typing import cast\n\nfrom zyntex.code_generation.premade import DefaultCodePrinter\nfrom zyntex.syntax import VariableDeclaration\nfrom zyntex import SourceCode\n\ncode_printer = DefaultCodePrinter()\nsrc = SourceCode(\"const result: usize = 15 + 15;\")\n\nvariable = cast(VariableDeclaration, src.content[0])\nvariable.is_public = True\nprint(code_printer.print(src)) # pub const result: usize = 15 + 15;\n```\n\nFor questions or contributions, open an issue or PR on the project repository.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A high-level Python package to parse Zig code.",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/xXenvy/zyntex",
        "Source": "https://github.com/xXenvy/zyntex",
        "Tracker": "https://github.com/xXenvy/zyntex/issues"
    },
    "split_keywords": [
        "zig",
        "parser",
        "codegen"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2eae7b39b5e748afdf18a61a95cdcafedc92ee9cea83221b6c3fd62a90a52f98",
                "md5": "e6b76d80d34b62358ea26f20f86abdf6",
                "sha256": "b527f67d45b7b7adec62866b341d947efbae97f5434a44307d598d89ee0d7652"
            },
            "downloads": -1,
            "filename": "zyntex-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e6b76d80d34b62358ea26f20f86abdf6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 1258866,
            "upload_time": "2025-09-09T18:07:15",
            "upload_time_iso_8601": "2025-09-09T18:07:15.950708Z",
            "url": "https://files.pythonhosted.org/packages/2e/ae/7b39b5e748afdf18a61a95cdcafedc92ee9cea83221b6c3fd62a90a52f98/zyntex-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "739e22b302ab7976a660416e11b16a443cdb98d6e402a03b9393df683e932702",
                "md5": "9d7259b7e8b5aa79eb79f7f1e95b670d",
                "sha256": "7fa2be4bbe1f498618c71fb4ab3f054f713e80ed4bc7a0cb1cef482cef0e36ca"
            },
            "downloads": -1,
            "filename": "zyntex-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "9d7259b7e8b5aa79eb79f7f1e95b670d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 27398,
            "upload_time": "2025-09-09T18:07:17",
            "upload_time_iso_8601": "2025-09-09T18:07:17.150764Z",
            "url": "https://files.pythonhosted.org/packages/73/9e/22b302ab7976a660416e11b16a443cdb98d6e402a03b9393df683e932702/zyntex-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-09 18:07:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "xXenvy",
    "github_project": "zyntex",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "zyntex"
}
        
Elapsed time: 3.47879s