Skip to main content

Python bindings for dhall, a functional configuration language

Project description

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.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

dhall-0.1.15-cp311-cp311-manylinux_2_24_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.24+ x86-64

dhall-0.1.15-cp311-cp311-macosx_10_7_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.11 macOS 10.7+ x86-64

dhall-0.1.15-cp310-cp310-manylinux_2_24_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.24+ x86-64

dhall-0.1.15-cp310-cp310-macosx_10_7_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.10 macOS 10.7+ x86-64

dhall-0.1.15-cp39-none-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.9 Windows x86-64

dhall-0.1.15-cp39-cp39-manylinux_2_24_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.24+ x86-64

dhall-0.1.15-cp39-cp39-macosx_10_7_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.9 macOS 10.7+ x86-64

dhall-0.1.15-cp38-cp38-manylinux_2_24_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.24+ x86-64

dhall-0.1.15-cp38-cp38-macosx_10_7_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.8 macOS 10.7+ x86-64

dhall-0.1.15-cp37-cp37m-manylinux_2_24_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.24+ x86-64

dhall-0.1.15-cp37-cp37m-macosx_10_7_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.7m macOS 10.7+ x86-64

File details

Details for the file dhall-0.1.15-cp311-cp311-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for dhall-0.1.15-cp311-cp311-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 ceaade029a846fbace28d69e89ef18bf7c80ffddd3f8ab6b4755cfd86f4f7c18
MD5 89067fd5fdebec91a270462546f72c9c
BLAKE2b-256 7ee1ae8ac000534a06a6f004343ac87fa727e0edf376fce7fec0f6b00cbda2a1

See more details on using hashes here.

File details

Details for the file dhall-0.1.15-cp311-cp311-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for dhall-0.1.15-cp311-cp311-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 80199b062eb0350f1ff6aacf84a74b6e4c20e1c87d5878071ee2e43889df5fc5
MD5 bf9fae5bbd3be0c85af7d4e650b306be
BLAKE2b-256 c56ca8c529735dfad61a818a0c8e09f10b8063d66b4f11f6e9ce8e7496171fea

See more details on using hashes here.

File details

Details for the file dhall-0.1.15-cp310-cp310-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for dhall-0.1.15-cp310-cp310-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 697548fff78902504c02a0f97a1261048f1c591f4de83effa1dbfee852606ba2
MD5 3b0a15271dd1e54b16b0382657f31f2a
BLAKE2b-256 dfd6322d27c17b957dc2b12aa61af42f0b4db05fb02e85053c7fb42ed6de0864

See more details on using hashes here.

File details

Details for the file dhall-0.1.15-cp310-cp310-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for dhall-0.1.15-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 21f6e38578fc7c475ccad92c0a1dcb1e20772095006c0790f0a3f32fe77cf2d5
MD5 dcd1459adc35df9e29bef7dc8ca7786d
BLAKE2b-256 cbe006495fef2be382ea32631d1ecd21468f8165e107854cbf76996ad77ef677

See more details on using hashes here.

File details

Details for the file dhall-0.1.15-cp39-none-win_amd64.whl.

File metadata

  • Download URL: dhall-0.1.15-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.1.0

File hashes

Hashes for dhall-0.1.15-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 7c51f81b876ccf98a69a93d7dd4e707654835d5f6075036f24576ce037735a08
MD5 14bc591d1b3e719ac786712626a765c7
BLAKE2b-256 2f0f2bef02ad38897aa432f473bef3d140313a8d2d3af37a3885558194bcb8b1

See more details on using hashes here.

File details

Details for the file dhall-0.1.15-cp39-cp39-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for dhall-0.1.15-cp39-cp39-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 6c23c955cfc11dd05579fbc76bea04848ff51a4fac406b0c5bf47c4cd1108d15
MD5 d6ff8e3d225bd6012ebcaff984c31977
BLAKE2b-256 dd407310157fbb12182b8ce7ee633410415a1ca561c3d62b495b155b59a2f740

See more details on using hashes here.

File details

Details for the file dhall-0.1.15-cp39-cp39-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for dhall-0.1.15-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 aac14b4f595fcb356ad5063a42794943d8be2493cbad0fb991c21df2f4c2d2bf
MD5 5f01a79769e46cfb2cf4f6230057a046
BLAKE2b-256 ad5a8ab4def9159e81db690cf77cd15107ebfaebac28c7a746e9f637d97ab5da

See more details on using hashes here.

File details

Details for the file dhall-0.1.15-cp38-cp38-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for dhall-0.1.15-cp38-cp38-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 aea9453b1bf56b9e154ade3526d52c0450cc905dbbf3384d28e540f229c11d45
MD5 f2ad690a5ca3be9a64374ac5ef1b1796
BLAKE2b-256 a698cba9a6449b19303a824817ed59d30d51b9c972b7545d2d1b65c89dc59603

See more details on using hashes here.

File details

Details for the file dhall-0.1.15-cp38-cp38-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for dhall-0.1.15-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 bdc8c52d5f4a8bee2fe0ee78322e5b629f0474a716dcf0a7119ce27d0c8f515d
MD5 d7b44e745e25f01d9006b8302a5487ff
BLAKE2b-256 0e1fe3ef2ec2cb7b61eed390ae68ece24cb39d53cbf8d20c9b9a75239c74a67b

See more details on using hashes here.

File details

Details for the file dhall-0.1.15-cp37-cp37m-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for dhall-0.1.15-cp37-cp37m-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 a465d136d61453aa3c2a71cf0029acd694bc1ded372d2cc5495a99b3f750ea5c
MD5 a8dfc9d14dba9dc7fd94906d09bfd8ae
BLAKE2b-256 2d39f0f45f9af81617183ed1d90c7d7b32223b02e35ad249011f6c2e6fddc79e

See more details on using hashes here.

File details

Details for the file dhall-0.1.15-cp37-cp37m-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for dhall-0.1.15-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 eb0044aad1599b21cd8dcd94a056fb9572fb956a8467bc9f48297c61b97e0a66
MD5 a928710701f6e6d6e244c49fd6520114
BLAKE2b-256 6d4d843e39ed22826907a48ee4da524d4265f20251c6364f89933065429963c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page