Skip to main content

Dhall logo

Maintenance CI status PyPI version shields.io PyPI downloads

Dhall is a programmable configuration language optimized for maintainability.

You can think of Dhall as: JSON + functions + types + imports

Note that while Dhall is programmable, Dhall is not Turing-complete. Many of Dhall's features take advantage of this restriction to provide stronger safety guarantees and more powerful tooling.

You can try the language live in your browser by visiting the official website:

dhall-python

dhall-python contains Dhall bindings for Python using the rust implementation. It is meant to be used to integrate Dhall into your python applications.

If you only want to convert Dhall to/from JSON or YAML, you should use the official tooling instead; instructions can be found here.

Usage

Install using pip:

pip install dhall

Supports the following:

  • Operating Systems
    • Windows
    • Mac OS
    • Linux (manylinux_2_24_x86_64)
  • Python versions
    • 3.7
    • 3.8
    • 3.9
    • 3.10
    • 3.11

Python 3.5 and 3.6 support is available in older versions of dhall-python.

dhall-python implements a similar API to Python's json module:

>>> import dhall
>>> dhall.dumps({"keyA": 81, "keyB": True, "keyC": "value"})
'{ keyA = 81, keyB = True, keyC = "value" }'
>>> dhall.loads("""{ keyA = 81, keyB = True, keyC = "value" }""")
{'keyA': 81, 'keyB': True, 'keyC': 'value'}

License

dhall-python is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in python-dhall by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

All contributions are welcome! If you spot any bugs, or have any requests, issues and PRs are always welcome.

Developer guide

This project uses poetry for managing the development environment. If you don't have it installed, run

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
export PATH="$HOME/.poetry/bin:$PATH"

The project requires the latest stable version of Rust.

Install it via rustup:

rustup install stable

If you have already installed the stable version, make sure it is up-to-date:

rustup update stable

After that, you can compile the current version of dhall-python and execute all tests and benchmarks with the following commands:

make install
make test

🤫 Pssst!... run make help to learn more.

Release files for dhall 0.1.16

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

Source distribution (sdist)

Source distribution for dhall 0.1.16
File Size Uploaded
dhall-0.1.16.tar.gz 32.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dhall 0.1.16
File Interpreter ABI Platform
dhall-0.1.16-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details

Total release size: 1.9 MB

Release files / dhall-0.1.16.tar.gz

Download URL dhall-0.1.16.tar.gz
Size 32.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a7adb3c7e8324e0ea2d2a76cf7161fb4202b6c1f2f33593f4c8a0a1ce219eabc
BLAKE2b-256 checksum
How to use checksums
4bd6ee644e18a2bf0d44a97bb18bbdce11179d7a130eb106636074a3aab1d1ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.5

Release files / dhall-0.1.16-cp310-cp310-macosx_11_0_arm64.whl

Download URL dhall-0.1.16-cp310-cp310-macosx_11_0_arm64.whl
Size 1.9 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
88af7fe97a60144e7126ce3d480975fe7d6f84b82bf701d1ab034dbf531b04fd
BLAKE2b-256 checksum
How to use checksums
4b8569126c8b28cf763d7c4b33968252720c578fc7067f08211f461311e9f7e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.5

Release history Release notifications | RSS feed

This release

0.1.16 This release

2 release files

0.1.14

9 release files

0.1.9

3 release files

0.1.7

12 release files

0.1.5

12 release files

0.1.4

12 release files

0.1.3

12 release files

0.1.2

12 release files

0.1.1

12 release files

0.1.0

1 release file

0.0.4

12 release files

0.0.3

12 release files

0.0.1

2 release files

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