https://github.com/sunng87/pyclj
talking clojure with python - an edn implementation for python
https://github.com/sunng87/pyclj
Last synced: 9 months ago
JSON representation
talking clojure with python - an edn implementation for python
- Host: GitHub
- URL: https://github.com/sunng87/pyclj
- Owner: sunng87
- License: mit
- Created: 2012-02-08T13:06:16.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2016-08-10T03:47:36.000Z (over 9 years ago)
- Last Synced: 2025-03-28T19:45:00.120Z (10 months ago)
- Language: Python
- Homepage:
- Size: 54.7 KB
- Stars: 63
- Watchers: 5
- Forks: 11
- Open Issues: 4
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
pyclj
=====
A python reader/writer for clojure data literals.
On clojure's extensible data notations, checkout Rich Hickey's edn spec: https://github.com/richhickey/edn
Install
-------
``pip install pyclj``
Usage
-----
The API is very similar to python's built-in json module.
- dump(data, fileobj)
- dumps(data)
- load(fileobj)
- loads(string)
Clojure -> Python Type Mapping
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
======= ======
Clojure Python
======= ======
list list
vector list
set set
map dict
nil None
string string
int int
float float
boolean boolean
char string
keyword string
======= ======
Python -> Clojure Type Mapping
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
======= =======
Python Clojure
======= =======
list vector
set set
dict map
None nil
string string
int int
float float
boolean boolean
======= =======
License
-------
pyclj is distributed under MIT license.