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
>>> 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_debug-0.1.0.tar.gz (18.0 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: edn_format_debug-0.1.0.tar.gz
  • Upload date:
  • Size: 18.0 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.0.tar.gz
Algorithm Hash digest
SHA256 92cbf71a24bb2d23b715918e16756eb3c11bf483c00ef0d803f2a083f1ecba21
MD5 df9ef7a1265489cdcdf31216b4370e73
BLAKE2b-256 c218c8bf3c7a8d29f20ea9ce07725e7bbb420b6c1da6aca37c6d16707aae8425

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