Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

CitrineInformatics/learn-citrination

Repository files navigation

Citrine banner

learn-citrination

Demos and tutorials for API access to Citrination.

Documentation for the Python Citrination Client (PyCC) can be found here.

Contents

The examples are grouped based on the functionality and tools they aim to teach. Examples include:

Requirements

Most of these tutorials are Jupyter notebooks backed by a Python 3 kernel. You'll need:

  • Python 3 with Jupyter. Anaconda/Miniconda is highly recommended.
  • Additional packages, which can be installed using pip:
pip install -U -r requirements.txt   

or conda:

while read requirement; do conda install --yes $requirement; done < requirements.txt

Most of the IPython notebooks are tested using continuous integration and Python versions 2.7, 3.5, and 3.6. While other Python versions (e.g. 3.4) may still work, we cannot guarantee full support.

API Key

You will need a valid Citrination Client API key set in your environment variables:

  1. Create an account on Citrination (if you don't already have one).

  2. Go to your account page and look for "API Key."

  3. Add the key to your environment.

    • On MacOS, open your .bash_profile and add the line
    export CITRINATION_API_KEY="your_key_copied_from_the_website"
    

    Each new Terminal window you open will have the key loaded automatically.

    • On Windows, open your Command Prompt / Anaconda Prompt and enter the line
    setx CITRINATION_API_KEY "your_key_copied_from_the_website"
    

    Each new Prompt you open will have the key loaded automatically.

The API key functions as the password for the client, so it's important to keep it private. Therefore, we put it in your system environment instead of in the source code to help avoid unintentional sharing or publication of your API key.

Additional Resources