This project provides a proof of concept for incorporating SAS output into a Python-based web application using the Python package SASPy.
This application is intended to run and be accessed locally in debug mode.
All development was done under Windows 10 with SAS 9.4, Java SE version 8 update 201, Python 3.10.4, Git 2.33.1, and PyCharm 2021.2.3 installed. Any deviations from this setup may require modifications to the steps below and/or to application code.
A Google Colab Notebook is available if you'd like to try a version of this application without downloading the repo or configuring a connection to a local SAS installation.
This application assumes a reasonably current version of Python 3 is installed, along with the modules specified in requirements.txt.
This application also requires access to installations of Java SE (https://www.oracle.com/technetwork/java/javase/) and SAS 9.4 (https://support.sas.com/software/94/)
- Download this code repository.
- Follow the instructions in sascfg_personal-example.py to create a file called
sascfg_personal.py
in the project directory. - Run the file
app.py
. - Visit http://127.0.0.1:8000/ in a web browser.
-
Download and install Java SE from https://www.java.com/
-
Download and install Python from https://www.python.org/
-
Download and install Git from https://git-scm.com/
-
Download and install PyCharm from https://www.jetbrains.com/pycharm/
-
Clone this repo in PyCharm:
-
If PyCharm is running with no projects open, create a new project by selecting Get from VCS and entering this repo's URL (https://github.com/saspy-bffs/dataset-explorer)
-
Otherwise, if a project is already open, use the Git Menu: Git -> Clone -> https://github.com/saspy-bffs/dataset-explorer
-
-
When prompted, create a new virtual environment, and make sure the file
requirements.txt
from the cloned repo is selected under Dependencies. -
Use the project-navigation area in the left-hand panel to open the file
sascfg_personal-example.py
(e.g., by double-clicking its name). -
Copy the contents of
sascfg_personal-example.py
to the system clipboard. -
Create a new Python file named
sascfg_personal.py
in the project directory using the File Menu : File -> New -> Python File -
Update line 14 of
sascfg_personal.py
, per the instructions in the file.
-
Use the project-navigation area in the left-hand panel to open the file
app.py
(e.g., by double-clicking its name). -
Launch the application using the Run Menu: Run -> Run... -> app
-
Visit the URL http://127.0.0.1:8000/ in a web browser, and follow the instructions.
Note: If SAS was installed with default options, try the directory C:\Program Files\SASHome\SASFoundation\9.4\core\sashelp
.
This project is licensed under the MIT License. See the LICENSE file for details.
This project is in no way affiliated with SAS Institute Inc.