Skip to main content

Swaroop's EDN format reader and writer in Python, w/ minor debug addition.

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_debug
>>> edn_format_debug.dumps({1, 2, 3})
'#{1 2 3}'
>>> edn_format_debug.loads("[1 true nil]")
[1, True, None]
>>> edn_format_debug.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_debug-0.1.1.tar.gz (18.5 kB view details)

Uploaded Source

File details

Details for the file edn_format_debug-0.1.1.tar.gz.

File metadata

  • Download URL: edn_format_debug-0.1.1.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for edn_format_debug-0.1.1.tar.gz
Algorithm Hash digest
SHA256 792274a30a0681ea275ea2f47b9e3f77ebb75d4b537b9a95c52e65b748157412
MD5 2d0b6f52eff1669396c42ab1090150ac
BLAKE2b-256 14052e9aa4b8bea10319b50c7e764190206eb0a6e30930e9a5322b46a8693133

See more details on using hashes here.

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