Skip to main content

EDN format reader and writer in Python

Project description

edn_format

Implements the EDN format in Python.

All features of EDN are implemented, including custom tagged elements.

Build Status PyPI version

Installation

pip install edn_format

Usage

>>> import edn_format
>>> edn_format.dumps({1, 2, 3})
'#{1 2 3}'
>>> edn_format.loads("[1 true nil]")
[1, True, None]
>>> edn_format.loads_all("1 2 3 4")
[1, 2, 3, 4]

In general, edn_format.loads(edn_format.dumps(obj)) == obj. If this is false, it may be a bug.

See tests.py for full details.

Contributors

Special thanks to the following contributors for making this library usable:

FAQ

Why immutable list & dict?

IIRC, it was related to https://github.com/edn-format/edn#rationale :

edn will yield distinct object identities when read, unless a reader implementation goes out of its way to make such a promise. Thus the resulting values should be considered immutable, and a reader implementation should yield values that ensure this, to the extent possible.

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

edn_format-0.8.0.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

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

edn_format-0.8.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file edn_format-0.8.0.tar.gz.

File metadata

  • Download URL: edn_format-0.8.0.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for edn_format-0.8.0.tar.gz
Algorithm Hash digest
SHA256 a0febbe33b44f18f8c1d8e767eda282c4c30344ce1975fda7f2362412893b192
MD5 5c65a54fae2dade5bd49b55b87858c5c
BLAKE2b-256 93bb4d044fbd99bc1f6c96785e9b1cc70c51defa9892506ecaf6ba13241b98d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for edn_format-0.8.0.tar.gz:

Publisher: publish-pypi.yml on swaroopch/edn_format

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

File details

Details for the file edn_format-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: edn_format-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for edn_format-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b54a549eff10e4e9047dd22d5f6aafccbc490ae959511929ecf47c3b3cd513c2
MD5 6818443535cf13fc1e686efe705ffb54
BLAKE2b-256 d6cabdcb78d893539d2d4f6aeff689f7d8d89bc9784b2c5be99e80fa6e583732

See more details on using hashes here.

Provenance

The following attestation bundles were made for edn_format-0.8.0-py3-none-any.whl:

Publisher: publish-pypi.yml on swaroopch/edn_format

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