{"id":23331125,"url":"https://github.com/sassoftware/python-sasctl","last_synced_at":"2025-04-04T10:02:29.288Z","repository":{"id":35017898,"uuid":"196409133","full_name":"sassoftware/python-sasctl","owner":"sassoftware","description":"Python package and CLI for user-friendly integration with SAS Viya","archived":false,"fork":false,"pushed_at":"2025-01-22T17:45:19.000Z","size":78234,"stargazers_count":47,"open_issues_count":29,"forks_count":43,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-13T20:39:14.630Z","etag":null,"topics":["api","python","sas","viya"],"latest_commit_sha":null,"homepage":"https://sassoftware.github.io/python-sasctl","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sassoftware.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-11T14:20:32.000Z","updated_at":"2025-03-04T14:26:29.000Z","dependencies_parsed_at":"2023-02-16T11:31:10.391Z","dependency_job_id":"7dba5844-ac1a-4330-bca1-30e4169f2324","html_url":"https://github.com/sassoftware/python-sasctl","commit_stats":{"total_commits":825,"total_committers":17,"mean_commits":"48.529411764705884","dds":0.5648484848484848,"last_synced_commit":"e9a19820e533b93bc49af8b7649cb73bfbfd6e8e"},"previous_names":[],"tags_count":60,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sassoftware%2Fpython-sasctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sassoftware%2Fpython-sasctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sassoftware%2Fpython-sasctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sassoftware%2Fpython-sasctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sassoftware","download_url":"https://codeload.github.com/sassoftware/python-sasctl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149506,"owners_count":20891954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","python","sas","viya"],"created_at":"2024-12-20T22:31:13.100Z","updated_at":"2025-04-04T10:02:29.248Z","avatar_url":"https://github.com/sassoftware.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e  \n\n  \u003ch1\u003esasctl\u003c/h1\u003e\n\n  \u003cp\u003eA user-friendly Python interface for SAS Viya.\u003c/p\u003e\n  \n  \u003ca href=\"https://www.sas.com/en_us/software/viya.html\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/SAS%20Viya-3.5+-blue.svg?\u0026colorA=0b5788\u0026logoWidth=30\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAABLCAYAAADd0L+GAAAJ+ElEQVR42t1beVCV1xU/z5n+VW2S2rSxjdla0zrWRGubSa21ndpO28TUJm1GsWpiVRKsCkZrFaPGojRsj4CyPUCQHQUBMbJvKoqRRaMiahaFJDqKsj3e4y1gzw/mo1CW797vvTycvPEMI/O9+93fvWf9nQN9feG7XxlxyiLjWSYuCaTvLg+mn6yPpsVBh2hHSjnFFNZS6rHzdOXz5imQYxevU3LFeTLw771iC+gvfgfpsZUh9Mjrenpgsf/YgnmQN/CzjTHkHp5LSeXnqc1o9rl37163jPDHDKC+Gcdpwe50euqNPa4H84vNc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DPkmBsChjdENEICOMj+pwqjhOWeAzXQdBOT+aRx2fWRQmp7NakUpmgqVShtj/+O4VIcPNSJfGvtu6nFXsOQzD4JqRakKdXh0mxN4qg/P4Rf/e+GeNF5F8XnS+tYhD0gJTW+X0hzzGjipJYFggEjS/cPhbqLXN/8ObeMQPyPba1DN6QFiCQN8KPoHPwvzmALYklAOVyIHhneF61YvTSYjSZDTO8DBjl6gMDfcPIBobbBLljp8Unbo0AiF0LENQzIFCUbsEAUiGOPrjy+cTA7JPw9SrpuuNZA+r38LwzWm9EoZ3OvOiTOpTQmMC3AyaTfbYlr+YqvcB++8uYUMKav9+ZxBO51xV6SbPgVgcyNEOC3q3Wjj/jQVOXJXf3weMg9ZxnH7z+Lk7vjWazSvElRgZOWxsxOtUEzhidXwQufBCQ9hWfJRRWz3hGwQVKzVii7sGaPCCKdkmnsq4jQEC6c/Y9xBSGo3ww1zKkDwkj/fhG8zQki+8wAefGi/16awJNZ4ADBR24+T5pva0/PVejmJWxWK0XVFRKim/ekVKGeRwxRhMDaT7pFQQAIy2IG0PkxUYHitVqu4obwHfVAcgDiSuuG3GMflS36Zd5ov+GxlpwOGzwHGCDtY3PT2KW3puZGPRGFD13teCDG4YzUqOr1HqFymwNCqbZjsQErUHxTrvx9aXBWSKduZHqmcENKPZKOm7e6qILa3WuAoT3YIQfHQIFiBAYUYHhvcij8Pk8Mgzjd7LqKaHACk57IXcRJi1X7EM7GFKThxnUK+8eoDimXaEGzgACL4i/FMR4PGzV5X8NiGwb3Nny0MMUX3qWkMHa2etARRThfwOke6DY2ZXXZlVdIs/ofJDyyk1oFqcnkE+57yHU4/jTkh2p5Uhf+mU7Bzv8foFvOkpkgd6NPJivjPwX66dH9VYtHvAAAAAASUVORK5CYII=\"\n        alt=\"SAS Viya Version\"/\u003e\n  \u003c/a\u003e\n        \n  \u003ca href=\"https://www.python.org/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Python-3.6%2B-blue.svg\" alt=\"Python Version\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/sassoftware/python-sasctl/actions/workflows/build-test-deploy.yml\"\u003e\n    \u003cimg src=\"https://github.com/sassoftware/python-sasctl/actions/workflows/build-test-deploy.yml/badge.svg\" /\u003e\n  \u003c/a\u003e\n    \n  \u003ca href=\"https://codecov.io/gh/sassoftware/python-sasctl\"\u003e\n    \u003cimg src=\"https://codecov.io/gh/sassoftware/python-sasctl/branch/master/graph/badge.svg?token=mDcvtz2Als\"/\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://pepy.tech/project/sasctl\"\u003e\n    \u003cimg src=\"https://static.pepy.tech/personalized-badge/sasctl?period=month\u0026units=international_system\u0026left_color=grey\u0026right_color=brightgreen\u0026left_text=PyPI downloads per month\"/\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/psf/black\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://pycqa.github.io/isort/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat\u0026labelColor=ef8336\"\u003e\n  \u003c/a\u003e\n    \n\u003c/div\u003e\n\n\n\n###### Full documentation:  https://sassoftware.github.io/python-sasctl\n\n# Table of Contents\n1. [Overview](#overview)\n2. [Prerequisites](#prerequisites)\n3. [Installation](#installation)\n4. [Getting Started](#getting-started)\n5. [Examples](#examples)\n6. [Contributing](#contributing)\n7. [License](#license)\n8. [Additional Resources](#additional-resources)\n\n\n## Overview\n\nThe sasctl package enables easy communication between the SAS Viya \nplatform and a Python runtime. It can be used as a module or as a command line interface.\n```\nsasctl.services.folders.list_folders()\n```\n\n```\nsasctl folders list\n```\n\n\n### Prerequisites\n\nsasctl requires the following Python packages be installed.\nIf not already present, these packages will be downloaded and installed automatically.  \n- pandas\n- requests\n- pyyaml\n- packaging\n\nThe following additional packages are recommended for full functionality:\n- swat\n- kerberos\n- GitPython\n- numpy\n- scikit-learn\n\n\n### Installation\n\nInstalling the latest version is as easy as:\n```\npip install sasctl\n```\n\nFunctionality that depends on additional packages can be installed using the following:\n - `pip install sasctl[swat]`\n - `pip install sasctl[kerberos]`\n - `pip install sasctl[all]`\n  \nIf you want the latest functionality and can't wait on an official release, you can also\ninstall the latest source code:\n\n```pip install git+https://github.com/sassoftware/python-sasctl```\n\nAlternatively, if you're using Anaconda you can install with:\n```\nconda install -c sas-institute sasctl\n```\n\n## Getting Started\n\nOnce the sasctl package has been installed and you have a SAS Viya server to connect to, \nthe first step is to establish a session:\n```\n\u003e\u003e\u003e from sasctl import Session\n\n\u003e\u003e\u003e with Session(host, username, password):\n...     pass  # do something\n```\n```\nsasctl --help \n```\n\n\nOnce a session has been created, all commands target that environment. \nThe easiest way to use sasctl is often to use a pre-defined task, \nwhich can handle all necessary communication with the SAS Viya server:\n```\n\u003e\u003e\u003e from sasctl import Session, register_model\n\u003e\u003e\u003e from sklearn import linear_model as lm\n\n\u003e\u003e\u003e with Session('example.com', authinfo=\u003cauthinfo file\u003e):\n...    model = lm.LogisticRegression()\n...    register_model(model, 'Sklearn Model', 'My Project')\n```\n\n\nA slightly more low-level way to interact with the environment is to use \nthe service methods directly:\n```\n\u003e\u003e\u003e from sasctl import Session\n\u003e\u003e\u003e from sasctl.services import folders\n\n\u003e\u003e\u003e with Session(host, username, password):\n...    for f in folders.list_folders():\n...        print(f)\n\nPublic\nProjects\nESP Projects\nRisk Environments\n\n...  # truncated for clarity\n\nMy Folder\nMy History\nMy Favorites\nSAS Environment Manager\n```\n\n\nThe most basic way to interact with the server is simply to call REST \nfunctions directly, though in general, this is not recommended.\n```\n\u003e\u003e\u003e from pprint import pprint\n\u003e\u003e\u003e from sasctl import Session, get\n\n\u003e\u003e\u003e with Session(host, username, password):\n...    folders = get('/folders')\n...    pprint(folders)\n    \n{'links': [{'href': '/folders/folders',\n            'method': 'GET',\n            'rel': 'folders',\n            'type': 'application/vnd.sas.collection',\n            'uri': '/folders/folders'},\n           {'href': '/folders/folders',\n            'method': 'POST',\n            'rel': 'createFolder',\n\n...  # truncated for clarity\n\n            'rel': 'createSubfolder',\n            'type': 'application/vnd.sas.content.folder',\n            'uri': '/folders/folders?parentFolderUri=/folders/folders/{parentId}'}],\n 'version': 1}\n```\n\n\n\n\n### Examples\n\nA few simple examples of common scenarios are listed below.  For more \ncomplete examples see the [examples](examples) folder.\n\nShow models currently in Model Manager:\n```\n\u003e\u003e\u003e from sasctl import Session\n\u003e\u003e\u003e from sasctl.services import model_repository\n\n\u003e\u003e\u003e with Session(host, username, password):\n...    models = model_repository.list_models()\n```\n\nRegister a pure Python model in Model Manager:\n```\n\u003e\u003e\u003e from sasctl import Session, register_model\n\u003e\u003e\u003e from sklearn import linear_model as lm\n\n\u003e\u003e\u003e with Session(host, authinfo=\u003cauthinfo file\u003e):\n...    model = lm.LogisticRegression()\n...    register_model(model, 'Sklearn Model', 'My Project')\n```\n\nRegister a CAS model in Model Manager:\n```\n\u003e\u003e\u003e import swat\n\u003e\u003e\u003e from sasctl import Session\n\u003e\u003e\u003e from sasctl.tasks import register_model\n\n\u003e\u003e\u003e s = swat.CAS(host, authinfo=\u003cauthinfo file\u003e)\n\u003e\u003e\u003e astore = s.CASTable('some_astore')\n\n\u003e\u003e\u003e with Session(s):\n...    register_model(astore, 'SAS Model', 'My Project')\n```\n\n## Contributing\n\nWe welcome contributions! \n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) \nfor details on how to submit contributions to this project.\n\n## License\n\nSee the [LICENSE](LICENSE) file for details.\n\n## Additional Resources\n\n* [SAS Viya REST Documentation](https://developer.sas.com/apis/rest/)\n* [SAS Developer Community](https://communities.sas.com/t5/Developers/bd-p/developers)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsassoftware%2Fpython-sasctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsassoftware%2Fpython-sasctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsassoftware%2Fpython-sasctl/lists"}