Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/cjdoris/pythonio.jl
- Owner: cjdoris
- License: mit
- Created: 2022-03-10T12:19:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-04-25T15:37:08.000Z (over 2 years ago)
- Last Synced: 2023-03-04T01:35:27.905Z (over 1 year ago)
- Language: Julia
- Size: 32.2 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.