Skip to main content

📜 Pysonnet

CI Python version License pypi version

A pure Python implementation of the Jsonnet language.

Features:

  • Pure Python Implementation: Fully written in Python, ensuring compatibility and ease of integration with Python projects.
  • No External Dependencies: Operates independently without the need for any external libraries, simplifying installation and use.

Installation

pip install pysonnet

Usage

Evaluate a jsonnet file and generate a JSON string:

import pysonnet

json_string = pysonnet.evaluate_file("path/to/file.jsonnet", ext_vars={...})

Load a string and generate a Python object:

import pysonnet

output = pysonnet.loads(
    """
    local Person(name='Alice') = {
      name: name,
      welcome: 'Hello ' + name + '!',
    };
    {
      person1: Person(),
      person2: Person('Bob'),
    }
    """
)
assert output == {
    "person1": {
        "name": "Alice",
        "welcome": "Hello Alice!"
    },
    "person2": {
        "name": "Bob",
        "welcome": "Hello Bob!"
    }
}

Evaluate file from command line:

pysonnet path/to/file.jsonnet

Metadata

Release files for pysonnet 0.0.2

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

Source distribution (sdist)

Source distribution for pysonnet 0.0.2
File Size Uploaded Provenance Actions
pysonnet-0.0.2.tar.gz 21.0 kB Without provenance Details for pysonnet-0.0.2.tar.gz

Built distribution (wheel)

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

Total release size: 44.5 kB

Release files / pysonnet-0.0.2.tar.gz

Download URL pysonnet-0.0.2.tar.gz
Size 21.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4f9150c44980543caf86bb84061db3297d94f8f64b888dcd02d7a3c7fc320390
BLAKE2b-256 checksum
How to use checksums
681a9ebe5a221264169c85ca1506e69c6946efdad8fb7a1f4d342ebd9d3a2b63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.1 Linux/6.5.0-1021-azure

Release files / pysonnet-0.0.2-py3-none-any.whl

Download URL pysonnet-0.0.2-py3-none-any.whl
Size 23.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03b58b22100117044601b694ad041acd2439ceea2bddb821b379c5953d4f9c85
BLAKE2b-256 checksum
How to use checksums
9628a2f38b02948a60321076620dead7cdf9e1f3219eb5a54d8332874599da11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.1 Linux/6.5.0-1021-azure

Security for pysonnet 0.0.2

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.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

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