In what sense do you mean "connect"? For instance, you could just want to run programs in batch which is a simple command line call, or maybe you want to access data which may need a driver or specific software. Give as much detail about what your doing/expect as possible.
please give a look to this great post published by @ChrisHemedinger : https://blogs.sas.com/content/sasdummy/2017/04/08/python-to-sas-saspy/
It is about SASPy, the tool you can use to connect from Python to SAS.
To expand on what @JuanS_OCS suggested:
SAS provides an open-source library called SASPy that allows you to connect your Python console or Jupyter Notebook to SAS. You can find the library on the sassoftware GitHub account. It works with SAS on any OS: Windows, Unix/Linux, even z/OS.
SASPy brings a "Python-ic" sensibility to this approach for using SAS. That means that all of your access to SAS data and methods are surfaced using objects and syntax that are familiar to Python users. This includes the ability to exchange data via pandas, the ubiquitous Python data analysis framework. And even the native SAS objects are accessed in a very "pandas-like" way.
import saspy import pandas as pd sas = saspy.SASsession(cfgname='winlocal') cars = sas.sasdata("CARS","SASHELP") cars.describe()
More details, including a video with a demo, in this article: Introducing SASPy: Use Python code to access SAS.
Thanks @ChrisHemedinger for you reply.
I'm working on a presentation about Jupyter notebook and SAS and how it works(for dummies :-)). I need to create a demonstarion of connection between SAS servers, jupyter notebook, saspy,... that how they communicate in a simple way. Is there such document or link that can be used for this purpose?
@Riana I am not sure if this answers your question but I have once made a simplified illustration on how Jupyter works for a presentation I gave.
The link between the Notebook Server node and the Notebook File node links to JSON
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.
Find more tutorials on the SAS Users YouTube channel.