Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/cjdoris/pythonio.jl

Read and write some common Python data formats
https://github.com/cjdoris/pythonio.jl

Last synced: 24 days ago
JSON representation

Read and write some common Python data formats

Awesome Lists containing this project

README

        

# PythonIO.jl

Read and write common Python data formats:
- Python literal expressions
- Pickle
- Numpy .npy and .npz files

## Install

```
pkg> add https://github.com/cjdoris/PythonIO.jl
```

## API

These most commonly used functions are exported from `PythonIO`:
- `readpyexpr(file; simplify=false)`
- `readpkl(file; simplify=false)`
- `readnpy(file)`
- `writenpy(file, array)`
- `readnpz(file, [key_or_keys])`
- `writenpz(file, dict_of_arrays)`

The `file` argument is an IO stream or filename.

Further functionality is exported from sub-modules, described below.

### PyObjects

This module contains Julia representations of Python objects. For example `PyDict`
represents a Python `dict` as a vector of key-value pairs.