用于python的clojure文字读取器和writer
pyclj的Python项目详细描述
用于clojure数据文本的python读写器。 在clojure的可扩展数据标记上,检查rich hickey的edn规范:https://github.com/richhickey/edn
安装
pip install pyclj
用法
api与python的内置json模块非常相似。
- 转储(数据,文件对象)
- 转储(数据)
- 加载(fileobj)
- 加载(字符串)
clojure->;python类型映射
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类型映射
Python | Clojure |
---|---|
list | vector |
set | set |
dict | map |
None | nil |
string | string |
int | int |
float | float |
boolean | boolean |
许可证
Pyclj是根据麻省理工学院的许可证发行的。