Home

Awesome

SAS Kernel for Jupyter

<!--- [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/sassoftware/sas_kernel/HEAD) -->

Publish Python Package

Overview

The SAS Kernel for Jupyter Notebooks is capable of running SAS programs from within the Jupyter interface. The SAS kernel allows a user to leverage all of the SAS products they have licensed.

After installing the SAS kernel, you can use a notebook and a SAS installation to write, document, and submit SAS programming statements. The Jupyter notebook interface allows sharing of results through JSON and the SAS kernel is no exception, you can share code and results in a static form through the Jupyter notebook.

Documentation

Here is the link to the current documentation https://sassoftware.github.io/sas_kernel/

Prerequisites

Installation

This will install the SAS Kernel for jupyter as well as the Jupyter lab extensions (jupyterlab v3+ is required) to make you a more productive programmer within Jupyter. Here are details about the extensions.

pip install SAS-kernel['jlab_ext']

The common methods to install are

  1. pip -- PIP is the most common way to install the latest stable version of the code.

    pip install sas_kernel
    
  2. conda -- A conda package is also available if you prefer to use conda as your package manger

    conda install -c anaconda sas_kernel
    
  3. From source -- If you need to install from the source branch before a new version has been built and pushed you can install from source like this:

    pip install git+https://git@github.com/sassoftware/sas_kernel.git@main
    

    Note that the default branch is now main to match the GitHub convention. You can modify the about URL if you're installing from a fork or a non-default branch.

To verify that the sas_kernel is installed

jupyter kernelspec list

You should see output similar to code below:

Available kernels:
    python3    /home/sas/anaconda3/lib/python3.5/site-packages/ipykernel/resources
    sas        /home/sas/.local/share/jupyter/kernels/sas

NOTE: You will not be able to execute SAS code through Jupyter until you have configured SASPy.

Getting Started

Here is a basic example of programming with SAS and Jupyter Notebook: Getting Started

Improving Usability

For the Jupyter Lab extensions

There is a seperate repository where the extensions are developed and maintained. See that repo for details

For the Legacy Jupyter Notebook

There are a few NBExtensions that have been created to make working with Jupyter notebooks more productive. These are largely the result of pain points from my use of SAS Kernel for programming tasks. The extensions can be found here. The list includes:

NOTE: These extensions are for Jupyter Notebook they are not compatable with Jupyter Lab. Jupyter Lab extensions are in development and will be released shortly.

Installing the SAS Extensions

Details for installing the extensions for SAS can be found here.

Jupyter Magics for the sas_kernel

There are magics that have been written specifically for the sas_kernel to get more details see the README.

NBGrader

nbgrader is a system for assigning and grading notebooks and extends jupyter. NBgrader is compatible with the SAS kernel. The work was merged in September 2020. It will be widely available with the next release of NBGrader (0.62), until then you can install from source.

FAQ

Contributing

The Contributor Agreement details how contributions can be made.

Licensing

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at LICENSE.txt

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Add new section for github actions