posit-sdk 0.0.dev0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. posit-sdk-0.0.dev0/.coveragerc +2 -0
  2. posit-sdk-0.0.dev0/.github/workflows/main.yaml +24 -0
  3. posit-sdk-0.0.dev0/.github/workflows/pull-request.yaml +46 -0
  4. posit-sdk-0.0.dev0/.github/workflows/release.yaml +16 -0
  5. posit-sdk-0.0.dev0/.gitignore +168 -0
  6. posit-sdk-0.0.dev0/.pre-commit-config.yaml +13 -0
  7. posit-sdk-0.0.dev0/.vscode/launch.json +16 -0
  8. posit-sdk-0.0.dev0/.vscode/settings.json +7 -0
  9. posit-sdk-0.0.dev0/CONTRIBUTING.md +126 -0
  10. posit-sdk-0.0.dev0/LICENSE +21 -0
  11. posit-sdk-0.0.dev0/Makefile +62 -0
  12. posit-sdk-0.0.dev0/PKG-INFO +66 -0
  13. posit-sdk-0.0.dev0/README.md +26 -0
  14. posit-sdk-0.0.dev0/examples/connect/.gitignore +1 -0
  15. posit-sdk-0.0.dev0/examples/connect/databricks/README.md +19 -0
  16. posit-sdk-0.0.dev0/examples/connect/databricks/requirements.txt +56 -0
  17. posit-sdk-0.0.dev0/examples/connect/databricks/sample-content.py +45 -0
  18. posit-sdk-0.0.dev0/pyproject.toml +36 -0
  19. posit-sdk-0.0.dev0/requirements-dev.txt +9 -0
  20. posit-sdk-0.0.dev0/requirements.txt +1 -0
  21. posit-sdk-0.0.dev0/setup.cfg +4 -0
  22. posit-sdk-0.0.dev0/src/posit/__init__.py +0 -0
  23. posit-sdk-0.0.dev0/src/posit/_version.py +16 -0
  24. posit-sdk-0.0.dev0/src/posit/connect/README.md +82 -0
  25. posit-sdk-0.0.dev0/src/posit/connect/__init__.py +1 -0
  26. posit-sdk-0.0.dev0/src/posit/connect/auth.py +13 -0
  27. posit-sdk-0.0.dev0/src/posit/connect/auth_test.py +15 -0
  28. posit-sdk-0.0.dev0/src/posit/connect/client.py +180 -0
  29. posit-sdk-0.0.dev0/src/posit/connect/client_test.py +140 -0
  30. posit-sdk-0.0.dev0/src/posit/connect/config.py +52 -0
  31. posit-sdk-0.0.dev0/src/posit/connect/config_test.py +49 -0
  32. posit-sdk-0.0.dev0/src/posit/connect/content.py +42 -0
  33. posit-sdk-0.0.dev0/src/posit/connect/content_test.py +210 -0
  34. posit-sdk-0.0.dev0/src/posit/connect/errors.py +11 -0
  35. posit-sdk-0.0.dev0/src/posit/connect/errors_test.py +20 -0
  36. posit-sdk-0.0.dev0/src/posit/connect/external/__init__.py +0 -0
  37. posit-sdk-0.0.dev0/src/posit/connect/external/databricks.py +73 -0
  38. posit-sdk-0.0.dev0/src/posit/connect/external/databricks_test.py +0 -0
  39. posit-sdk-0.0.dev0/src/posit/connect/hooks.py +19 -0
  40. posit-sdk-0.0.dev0/src/posit/connect/hooks_test.py +30 -0
  41. posit-sdk-0.0.dev0/src/posit/connect/hooks_test_deps.py +40 -0
  42. posit-sdk-0.0.dev0/src/posit/connect/oauth.py +37 -0
  43. posit-sdk-0.0.dev0/src/posit/connect/oauth_test.py +45 -0
  44. posit-sdk-0.0.dev0/src/posit/connect/paginator.py +49 -0
  45. posit-sdk-0.0.dev0/src/posit/connect/urls.py +67 -0
  46. posit-sdk-0.0.dev0/src/posit/connect/urls_test.py +34 -0
  47. posit-sdk-0.0.dev0/src/posit/connect/users.py +56 -0
  48. posit-sdk-0.0.dev0/src/posit/connect/users_test.py +134 -0
  49. posit-sdk-0.0.dev0/src/posit_sdk.egg-info/PKG-INFO +66 -0
  50. posit-sdk-0.0.dev0/src/posit_sdk.egg-info/SOURCES.txt +52 -0
  51. posit-sdk-0.0.dev0/src/posit_sdk.egg-info/dependency_links.txt +1 -0
  52. posit-sdk-0.0.dev0/src/posit_sdk.egg-info/requires.txt +1 -0
  53. posit-sdk-0.0.dev0/src/posit_sdk.egg-info/top_level.txt +1 -0
  54. posit-sdk-0.0.dev0/tinkering.py +11 -0
@@ -0,0 +1,2 @@
1
+ [report]
2
+ fail_under = 80
@@ -0,0 +1,24 @@
1
+ name: Main
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ jobs:
7
+ default:
8
+ runs-on: ubuntu-latest
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ python-version:
13
+ - '3.8'
14
+ - '3.9'
15
+ - '3.10'
16
+ - '3.11'
17
+ - '3.12'
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+ - run: make
24
+ - run: make install
@@ -0,0 +1,46 @@
1
+ name: Pull Request
2
+ on:
3
+ pull_request:
4
+ concurrency:
5
+ group: ${{ github.head_ref }}
6
+ cancel-in-progress: true
7
+ jobs:
8
+ test:
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ fail-fast: false
12
+ matrix:
13
+ python-version:
14
+ - '3.8'
15
+ - '3.9'
16
+ - '3.10'
17
+ - '3.11'
18
+ - '3.12'
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ - uses: actions/setup-python@v5
22
+ with:
23
+ python-version: ${{ matrix.python-version }}
24
+ - run: make deps
25
+ - run: make test
26
+ lint:
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+ - uses: actions/setup-python@v5
31
+ - run: make deps
32
+ - run: make lint
33
+ cov:
34
+ runs-on: ubuntu-latest
35
+ steps:
36
+ - uses: actions/checkout@v4
37
+ - uses: actions/setup-python@v5
38
+ - run: make deps
39
+ - run: make test
40
+ - run: make cov-xml
41
+ - if: always()
42
+ uses: orgoro/coverage@v3.1
43
+ with:
44
+ coverageFile: coverage.xml
45
+ thresholdAll: 0.8
46
+ token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,16 @@
1
+ name: Release
2
+ on:
3
+ push:
4
+ tags:
5
+ - "v*.*.*"
6
+ jobs:
7
+ default:
8
+ runs-on: ubuntu-latest
9
+ permissions:
10
+ id-token: write
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: actions/setup-python@v5
14
+ - run: make
15
+ - id: release
16
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,168 @@
1
+ *.orig
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ *.py[cod]
6
+ *$py.class
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ build/
14
+ develop-eggs/
15
+ dist/
16
+ downloads/
17
+ eggs/
18
+ .eggs/
19
+ lib/
20
+ lib64/
21
+ parts/
22
+ sdist/
23
+ var/
24
+ wheels/
25
+ share/python-wheels/
26
+ *.egg-info/
27
+ .installed.cfg
28
+ *.egg
29
+ MANIFEST
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ nosetests.xml
49
+ coverage.xml
50
+ *.cover
51
+ *.py,cover
52
+ .hypothesis/
53
+ .pytest_cache/
54
+ cover/
55
+
56
+ # Translations
57
+ *.mo
58
+ *.pot
59
+
60
+ # Django stuff:
61
+ *.log
62
+ local_settings.py
63
+ db.sqlite3
64
+ db.sqlite3-journal
65
+
66
+ # Flask stuff:
67
+ instance/
68
+ .webassets-cache
69
+
70
+ # Scrapy stuff:
71
+ .scrapy
72
+
73
+ # Sphinx documentation
74
+ docs/_build/
75
+
76
+ # PyBuilder
77
+ .pybuilder/
78
+ target/
79
+
80
+ # Jupyter Notebook
81
+ .ipynb_checkpoints
82
+
83
+ # IPython
84
+ profile_default/
85
+ ipython_config.py
86
+
87
+ # pyenv
88
+ # For a library or package, you might want to ignore these files since the code is
89
+ # intended to run in multiple environments; otherwise, check them in:
90
+ .python-version
91
+
92
+ # pipenv
93
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
95
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
96
+ # install all needed dependencies.
97
+ #Pipfile.lock
98
+
99
+ # poetry
100
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
101
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
102
+ # commonly ignored for libraries.
103
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
104
+ #poetry.lock
105
+
106
+ # pdm
107
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
108
+ #pdm.lock
109
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
110
+ # in version control.
111
+ # https://pdm.fming.dev/#use-with-ide
112
+ .pdm.toml
113
+
114
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115
+ __pypackages__/
116
+
117
+ # Celery stuff
118
+ celerybeat-schedule
119
+ celerybeat.pid
120
+
121
+ # SageMath parsed files
122
+ *.sage.py
123
+
124
+ # Environments
125
+ .env
126
+ .venv
127
+ env/
128
+ venv/
129
+ ENV/
130
+ env.bak/
131
+ venv.bak/
132
+
133
+ # Spyder project settings
134
+ .spyderproject
135
+ .spyproject
136
+
137
+ # Rope project settings
138
+ .ropeproject
139
+
140
+ # mkdocs documentation
141
+ /site
142
+
143
+ # mypy
144
+ .mypy_cache/
145
+ .dmypy.json
146
+ dmypy.json
147
+
148
+ # Pyre type checker
149
+ .pyre/
150
+
151
+ # pytype static type analyzer
152
+ .pytype/
153
+
154
+ # Cython debug symbols
155
+ cython_debug/
156
+
157
+ # PyCharm
158
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
159
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
160
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
161
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
162
+ .idea/
163
+
164
+ # Version file
165
+ /src/posit/_version.py
166
+
167
+ # Ruff
168
+ .ruff_cache/
@@ -0,0 +1,13 @@
1
+ # See https://pre-commit.com for more information
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+ repos:
4
+ - repo: local
5
+ hooks:
6
+ - id: format
7
+ name: format
8
+ entry: bash -c "make fmt"
9
+ language: system
10
+ - id: lint
11
+ name: lint
12
+ entry: bash -c "make lint"
13
+ language: system
@@ -0,0 +1,16 @@
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "name": "Python: Current File",
9
+ "type": "python",
10
+ "request": "launch",
11
+ "program": "${file}",
12
+ "console": "integratedTerminal",
13
+ "justMyCode": true
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "python.testing.pytestArgs": [
3
+ "src"
4
+ ],
5
+ "python.testing.unittestEnabled": false,
6
+ "python.testing.pytestEnabled": true
7
+ }
@@ -0,0 +1,126 @@
1
+ # Contributing
2
+
3
+ ## Overview
4
+
5
+ The `posit-sdk` is a software development kit (SDK) designed to facilitate the development of projects using the Posit framework. This document provides instructions on how to use the provided `Makefile` to perform various tasks such as building, testing, linting, and installing the SDK.
6
+
7
+ ## Prerequisites
8
+
9
+ Before contributing to the `posit-sdk`, ensure that the following prerequisites are met:
10
+
11
+ - Python 3.x is installed on your system.
12
+ - `pip3` is installed to manage Python packages.
13
+ - `make` utility is installed (commonly available on Unix-like systems).
14
+
15
+ ## Project Structure
16
+
17
+ The the following files are commonly used during development.
18
+
19
+ - `Makefile`: Contains various commands to build, test, lint, and install the SDK.
20
+ - `requirements.txt`: Lists the required Python dependencies for the SDK.
21
+ - `requirements-dev.txt`: Lists additional dependencies required for development and testing purposes.
22
+ - `src/`: Contains the source code of the SDK.
23
+
24
+ ## Tooling
25
+
26
+ The `Makefile` provides the following commands:
27
+
28
+ - `build`: Build the SDK.
29
+ - `clean`: Remove generated files and directories.
30
+ - `cov`: Generate coverage report.
31
+ - `cov-html`: Generate HTML coverage report.
32
+ - `cov-xml`: Generate XML coverage report.
33
+ - `deps`: Install required dependencies.
34
+ - `fmt`: Format the source code.
35
+ - `install`: Install the SDK locally.
36
+ - `lint`: Perform linting using `mypy` and `ruff`.
37
+ - `test`: Run tests with coverage.
38
+ - `uninstall`: Uninstall the SDK.
39
+ - `version`: Display the current version of the SDK.
40
+
41
+ ## Release
42
+
43
+ ### Instructions
44
+
45
+ To start a release create a semver compatible tag.
46
+
47
+ _For this example, we will use the tag `v0.0.dev0`. This tag already exists, so you will not be able run the following commands verbatim._
48
+
49
+
50
+ **Step 1**
51
+
52
+ Create a proper SemVer compatible tag. Consult the [SemVer specification](https://semver.org/spec/v2.0.0.html) if you are unsure what this means.
53
+
54
+ `git tag v0.0.dev0`
55
+
56
+ **Step 2**
57
+
58
+ Push the tag GitHub.
59
+
60
+ `git push origin v0.0.dev0`
61
+
62
+ This command will trigger the [Release GitHub Action](https://github.com/posit-dev/posit-sdk-py/actions/workflows/release.yaml).
63
+
64
+ **Step 3**
65
+
66
+ Once complete the action has completed, the release will be available on the [Releases page](https://github.com/posit-dev/posit-sdk-py/releases).
67
+
68
+ ### Pre-Releases
69
+
70
+ Any tags denoted as a pre-release as defined by the [SemVer 2.0.0](https://semver.org/spec/v2.0.0.html) specification will be marked as such in GitHub. For example, the `v0.0.dev0` is a pre-release. Tag `v0.0.0` is a standard-release. Please consult the specification for additional information.
71
+
72
+ [PEP-440](https://peps.python.org/pep-0440/#summary-of-permitted-suffixes-and-relative-ordering) provides a good example of common pre-release tag combinations.
73
+
74
+ For additional definitions see https://en.wikipedia.org/wiki/Software_release_life_cycle.
75
+
76
+ Currently, the following suffix lineage is in use:
77
+
78
+ ### Release Lifecycle
79
+
80
+ - `X`: The major version.
81
+ - `Y`: The minor version.
82
+ - `Z`: The patch version.
83
+ - `N`: A variable representing the incremental version value.
84
+
85
+ **`X.Y.devN`**
86
+
87
+ A development pre-release. Created to test changes to the release procces. `N` starts at **0** and increments by 1 (`X.Y.dev0`, `X.Y.dev1`, ..., `X.Y.devN`).
88
+
89
+ *https://peps.python.org/pep-0440/#implicit-development-release-number*
90
+
91
+ **`X.Y.alphaN`**
92
+
93
+ An alpha pre-release. Created to support internal user testing. `N` starts at **1** and increments by 1 (`X.Y.alpha1`, `X.Y.alpha2`, ..., `X.Y.alphaN`).
94
+
95
+ *https://peps.python.org/pep-0440/#pre-releases*
96
+
97
+ **`X.Y.betaN`**
98
+
99
+ An beta pre-release. Created to support closed external user testing. `N` starts at **1** and increments by 1 (`X.Y.beta1`, `X.Y.beta2`, ..., `X.Y.betaN`).
100
+
101
+ *https://peps.python.org/pep-0440/#pre-releases*
102
+
103
+
104
+ **`X.Y.rcN`**
105
+
106
+ An release-candidate pre-release. Created to support open external user testing. `N` starts at **1** and increments by 1 (`X.Y.rc1`, `X.Y.rc2`, ..., `X.Y.rcN`).
107
+
108
+ *https://peps.python.org/pep-0440/#pre-releases*
109
+
110
+ **`X.Y.N`**
111
+
112
+ A stable patch release. Created for backward compatible bug fixes. `N` starts at **0** and increments by 1 (`X.Y.0`, `X.Y.1`, ..., `X.Y.N`).
113
+
114
+ *https://semver.org*
115
+
116
+ **`X.N.Z`**
117
+
118
+ A stable minor release. Created for added functionality in a backward compatible manner. `N` starts at **0** and increments by 1 (`X.0.Z`, `X.1.Z`, ..., `X.N.Z`).
119
+
120
+ *https://semver.org*
121
+
122
+ **`N.Y.Z`**
123
+
124
+ A stable major release. Created for incompatbile API changes. `N` starts at **0** and increments by 1 (`0.Y.Z`, `1.Y.Z`, ..., `N.Y.Z`).
125
+
126
+ *https://semver.org*
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 posit-dev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,62 @@
1
+ NAME := posit-sdk
2
+ PIP := pip3
3
+ PYTHON := python3
4
+
5
+ .PHONY:
6
+ build
7
+ clean
8
+ cov
9
+ default
10
+ deps
11
+ fmt
12
+ install
13
+ lint
14
+ test
15
+ uninstall
16
+ version
17
+
18
+ default:
19
+ make deps
20
+ make test
21
+ make lint
22
+ make build
23
+
24
+ build:
25
+ $(PYTHON) -m build
26
+
27
+ clean:
28
+ find . -name "*.egg-info" -exec rm -rf {} +
29
+ find . -name "*.pyc" -exec rm -f {} +
30
+ find . -name "__pycache__" -exec rm -rf {} +
31
+ rm -rf .coverage .mypy_cache .pytest_cache .ruff_cache *.egg-info build dist htmlcov
32
+
33
+ cov:
34
+ $(PYTHON) -m coverage report
35
+
36
+ cov-html:
37
+ $(PYTHON) -m coverage html
38
+
39
+ cov-xml:
40
+ $(PYTHON) -m coverage xml
41
+
42
+ deps:
43
+ $(PIP) install -r requirements.txt -r requirements-dev.txt
44
+
45
+ fmt:
46
+ $(PYTHON) -m ruff format .
47
+
48
+ install:
49
+ $(PIP) install -e .
50
+
51
+ lint:
52
+ $(PYTHON) -m mypy --install-types --non-interactive .
53
+ $(PYTHON) -m ruff check
54
+
55
+ test:
56
+ $(PYTHON) -m coverage run --source=src --omit=_version.py -m pytest
57
+
58
+ uninstall:
59
+ $(PIP) uninstall -y $(NAME)
60
+
61
+ version:
62
+ $(PYTHON) -m setuptools_scm
@@ -0,0 +1,66 @@
1
+ Metadata-Version: 2.1
2
+ Name: posit-sdk
3
+ Version: 0.0.dev0
4
+ Summary: Posit SDK for Python
5
+ License: MIT License
6
+
7
+ Copyright (c) 2024 posit-dev
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
26
+
27
+ Project-URL: Source, https://github.com/posit-dev/posit-sdk-py
28
+ Project-URL: Issues, https://github.com/posit-dev/posit-sdk-py/issues
29
+ Keywords: posit,sdk
30
+ Classifier: Development Status :: 1 - Planning
31
+ Classifier: Intended Audience :: Developers
32
+ Classifier: License :: OSI Approved :: MIT License
33
+ Classifier: Programming Language :: Python :: 3
34
+ Classifier: Topic :: Software Development :: Libraries
35
+ Classifier: Typing :: Typed
36
+ Requires-Python: >=3.8
37
+ Description-Content-Type: text/markdown
38
+ License-File: LICENSE
39
+ Requires-Dist: requests<3,>=2.31.0
40
+
41
+ # Posit SDK for Python
42
+
43
+ This package provides a Pythonic interface for developers to work against the public APIs of Posit's professional products. It is intended to be lightweight yet expressive.
44
+
45
+ > The Posit SDK is in the very early stages of development, and currently only Posit Connect has any support.
46
+
47
+ ## Installation
48
+
49
+ ```shell
50
+ pip install posit-sdk
51
+ ```
52
+
53
+ ## Usage
54
+
55
+ ```python
56
+ from posit.connect import Client
57
+
58
+ # If CONNECT_API_KEY and CONNECT_SERVER are set in your environment,
59
+ # they will be picked up, or you can pass them as arguments
60
+ con = Client()
61
+ con.users.find()
62
+ ```
63
+
64
+ <!-- Add notes about local development -->
65
+
66
+ <!-- Add code of conduct -->
@@ -0,0 +1,26 @@
1
+ # Posit SDK for Python
2
+
3
+ This package provides a Pythonic interface for developers to work against the public APIs of Posit's professional products. It is intended to be lightweight yet expressive.
4
+
5
+ > The Posit SDK is in the very early stages of development, and currently only Posit Connect has any support.
6
+
7
+ ## Installation
8
+
9
+ ```shell
10
+ pip install posit-sdk
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```python
16
+ from posit.connect import Client
17
+
18
+ # If CONNECT_API_KEY and CONNECT_SERVER are set in your environment,
19
+ # they will be picked up, or you can pass them as arguments
20
+ con = Client()
21
+ con.users.find()
22
+ ```
23
+
24
+ <!-- Add notes about local development -->
25
+
26
+ <!-- Add code of conduct -->
@@ -0,0 +1 @@
1
+ .posit
@@ -0,0 +1,19 @@
1
+ ```bash
2
+ # start streamlit locally
3
+ DATABRICKS_TOKEN=<DB_PAT> \
4
+ streamlit run ./sample-content.py
5
+
6
+ # deploy the app the first time
7
+ publisher deploy -a localhost:3939 -n databricks ./
8
+
9
+ # re-deploy the databricks app
10
+ publisher redeploy databricks
11
+ ```
12
+
13
+ TODO: Test this content with databricks-connect
14
+ <https://docs.databricks.com/en/dev-tools/databricks-connect/python/index.html>
15
+
16
+ ```
17
+ # install the sdk from this branch
18
+ pip install git+https://github.com/posit-dev/posit-sdk-py.git@kegs/databricks-oauth-2
19
+ ```
@@ -0,0 +1,56 @@
1
+ altair==5.2.0
2
+ attrs==23.2.0
3
+ blinker==1.7.0
4
+ cachetools==5.3.2
5
+ certifi==2024.2.2
6
+ charset-normalizer==3.3.2
7
+ click==8.1.7
8
+ databricks-sdk==0.20.0
9
+ databricks-sql-connector==3.1.0
10
+ et-xmlfile==1.1.0
11
+ gitdb==4.0.11
12
+ GitPython==3.1.42
13
+ google-auth==2.28.0
14
+ idna==3.6
15
+ importlib-metadata==7.0.1
16
+ Jinja2==3.1.3
17
+ jsonschema==4.21.1
18
+ jsonschema-specifications==2023.12.1
19
+ lz4==4.3.3
20
+ markdown-it-py==3.0.0
21
+ MarkupSafe==2.1.5
22
+ mdurl==0.1.2
23
+ numpy==1.26.4
24
+ oauthlib==3.2.2
25
+ openpyxl==3.1.2
26
+ packaging==23.2
27
+ pandas==2.1.4
28
+ pillow==10.2.0
29
+ posit-sdk @ git+https://github.com/posit-dev/posit-sdk-py.git@24ad71458de56b01b8168e80441ea860236f1933
30
+ protobuf==4.25.3
31
+ pyarrow==14.0.2
32
+ pyasn1==0.5.1
33
+ pyasn1-modules==0.3.0
34
+ pydeck==0.8.1b0
35
+ Pygments==2.17.2
36
+ python-dateutil==2.8.2
37
+ pytz==2024.1
38
+ referencing==0.33.0
39
+ requests==2.31.0
40
+ rich==13.7.0
41
+ rpds-py==0.18.0
42
+ rsa==4.9
43
+ six==1.16.0
44
+ smmap==5.0.1
45
+ streamlit==1.31.1
46
+ tenacity==8.2.3
47
+ thrift==0.16.0
48
+ toml==0.10.2
49
+ toolz==0.12.1
50
+ tornado==6.4
51
+ typing_extensions==4.9.0
52
+ tzdata==2024.1
53
+ tzlocal==5.2
54
+ urllib3==2.2.1
55
+ validators==0.22.0
56
+ zipp==3.17.0