An open API service indexing awesome lists of open source software.

https://github.com/torxed/python-pyson

Like JSON, but for Python data types.
https://github.com/torxed/python-pyson

dump json pickle python storage

Last synced: about 2 months ago
JSON representation

Like JSON, but for Python data types.

Awesome Lists containing this project

README

        

# python-pyson

Like JSON, but for Python.

Supports any `eval()` in `key` and `value` pairs.

*(So don't go around using it in production)*

# Example

```python
import time
import random

import pyson

content = """
{
"time" : time.time(),
random.randint(0, 1) : "a random number",
"another_level" : {
"test" : 5
},
"main level" : True
}
"""

print(pyson.loads(content, globals(), locals()))
```

Produces:

```python
{
'time': 1604261222.4304745,
1: 'a random number',
'another_level': {
'test': 5
},
'main level': True
}
```