This Jupyter notebook contains some basic functions for calculating distance and age as a function of redshift. Open the notebook called Expansion_History to get started. See the in-line documentation in the notebook for more information about how each function works.
If you are unfamiliar with Jupyter Notebooks, you can find documentation here: https://jupyter-notebook.readthedocs.io/en/stable/notebook.html