Need help with ion-python?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

144 Stars 30 Forks Apache License 2.0 119 Commits 29 Opened issues


A Python implementation of Amazon Ion.

Services available


Need anything else?

Contributors list

Amazon Ion Python

An implementation of Amazon Ion for Python.

Build Status Documentation Status

This package is designed to work with Python 2.7+ and Python 3.4+

Getting Started

Start with the simpleion module, which provides four APIs (

) that will be familiar to users of Python's built-in JSON parsing module.

For example:

>>> import amazon.ion.simpleion as ion
>>> obj = ion.loads('{abc: 123}')
>>> obj['abc']
>>> ion.dumps(obj, binary=False)
'$ion_1_0 {abc:123}'

For additional examples, consult the cookbook.

Git Setup

This repository contains a git submodule called

, which holds test data used by
's unit tests.

The easiest way to clone the

repository and initialize its
submodule is to run the following command.
$ git clone --recursive ion-python

Alternatively, the submodule may be initialized independently from the clone by running the following commands.

$ git submodule init
$ git submodule update


It is recommended to use

to create a clean environment to build/test Ion Python.
$ python3 -m venv ./venv
$ . venv/bin/activate
$ pip install -r requirements.txt
$ pip install -e .

You can also run the tests through
$ python test

Tox Setup

In order to verify that all platforms we support work with Ion Python, we use a combination of tox with pyenv.

Install relevant versions of Python:

$ for V in 2.7.16 3.4.10 3.5.7 3.6.8 3.7.3 pypy2.7-7.1.1 pypy3.6-7.1.1; do pyenv install $V; done

Once you have these installations, add them as a local

$ pyenv local 2.7.16 3.4.10 3.5.7 3.6.8 3.7.3 pypy2.7-7.1.1 pypy3.6-7.1.1

Assuming you have

properly set up (making sure
pyenv init
is evaluated into your shell), you can now run
# Run tox for all versions of python which executes py.test.
$ tox

Run tox for just Python 2.7 and 3.5.

$ tox -e py27,py35

Run tox for a specific version and run py.test with high verbosity

$ tox -e py27 -- py.test -vv

Run tox for a specific version and just the virtual env REPL.

$ tox -e py27 -- python


The following build, deployment, or release tasks are required:

  • Add support for code coverage reporting.
  • Consider using something like PyPy.js to build an interactive shell for playing with Ion python and provide a client-side Ion playground.

Known Issues

tests/ defines skipList variables referencing test vectors that are not expected to work at this time.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.