zowe-python-sdk-bundle 1.0.0.dev16__py3-none-any.whl

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.
@@ -0,0 +1,284 @@
1
+ Metadata-Version: 2.1
2
+ Name: zowe-python-sdk-bundle
3
+ Version: 1.0.0.dev16
4
+ Summary: Zowe Python SDK
5
+ Home-page: https://github.com/zowe/zowe-client-python-sdk
6
+ Author: Guilherme Cartier
7
+ Author-email: gcartier94@gmail.com
8
+ License: EPL-2.0
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.8
11
+ Classifier: License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)
12
+ Description-Content-Type: text/markdown
13
+ Requires-Dist: zowe.zos-console-for-zowe-sdk ==1.0.0.dev16
14
+ Requires-Dist: zowe.zos-files-for-zowe-sdk ==1.0.0.dev16
15
+ Requires-Dist: zowe.zos-tso-for-zowe-sdk ==1.0.0.dev16
16
+ Requires-Dist: zowe.zos-jobs-for-zowe-sdk ==1.0.0.dev16
17
+ Requires-Dist: zowe.zosmf-for-zowe-sdk ==1.0.0.dev16
18
+
19
+ # Zowe Python Client SDK
20
+
21
+ ![](https://img.shields.io/badge/license-EPL--2.0-blue) [![Latest Release](https://img.shields.io/github/v/release/zowe/zowe-client-python-sdk)](https://github.com/zowe/zowe-client-python-sdk/releases/latest) [![Documentation Status](https://readthedocs.org/projects/zowe-client-python-sdk/badge/?version=latest)](https://zowe-client-python-sdk.readthedocs.io/en/latest/index.html)
22
+
23
+ The Zowe Client Python SDK, is a set of Python packages designed to allow programmatic
24
+ interactions with z/OS REST API interfaces with minimal effort.
25
+
26
+ Python developers can leverage the Zowe SDK in order to create powerful scripts/applications
27
+ that can interact with z/OS components.
28
+
29
+ ![](./img/zowesdk.gif)
30
+
31
+ ## Installation
32
+
33
+ When installing the Zowe Client Python SDK, you have two options:
34
+
35
+ - Install all the Zowe packages
36
+ - Install a single sub-package
37
+
38
+ The choice depends on your intentions. If you choose to install all Zowe SDK packages,
39
+ this means that you will install everything under the `zowe` namespace in PyPi.
40
+
41
+ Alternatively, you can choose to install only a single subpackage for a smaller installation.
42
+
43
+ To install all Zowe SDK packages using pip:
44
+
45
+ ```
46
+ pip install -U --pre zowe-python-sdk-bundle
47
+ ```
48
+
49
+ Or, to install a subpackage using pip:
50
+
51
+ ```
52
+ pip install -U --pre zowe.<subpackage>_for_zowe_sdk
53
+ ```
54
+
55
+ For more information on the available sub-packages click [HERE](https://zowe-client-python-sdk.readthedocs.io/en/latest/packages/packages.html)
56
+
57
+ <!--
58
+ **Note**: If you want to stay on the bleeding edge, install the Zowe SDK from the `main` branch with the following command:
59
+ ```
60
+ pip install zowe@git+https://github.com/zowe/zowe-client-python-sdk@main#subdirectory=src
61
+ ```
62
+ -->
63
+
64
+ ## Requirements
65
+
66
+ The Zowe core package has dependencies on the packages listed below:
67
+
68
+ ```
69
+ commentjson
70
+ deepmerge
71
+ jsonschema
72
+ pyyaml
73
+ requests>=2.22
74
+ urllib3
75
+ ```
76
+
77
+ It also has an optional dependency on the Zowe Secrets SDK for storing client secrets which can be installed with the `secrets` extra:
78
+
79
+ ```
80
+ pip install -U --pre zowe.core-for-zowe-sdk[secrets]
81
+ ```
82
+
83
+ ### Developer setup
84
+
85
+ Ensure the following prerequisites are installed and on your PATH:
86
+
87
+ - Python >= 3.8 and `pip`
88
+ - Cargo >= 1.72 (to build Rust bindings for Secrets SDK)
89
+ - Visual Studio Build Tools >= 2015 (Windows only)
90
+
91
+ Clone the repository using `git`:
92
+
93
+ ```
94
+ git clone https://github.com/zowe/zowe-client-python-sdk.git
95
+ ```
96
+
97
+ Navigate to the root of the repository and checkout the desired branch. Currently, active development is on the `main` branch:
98
+
99
+ ```
100
+ cd zowe-client-python-sdk/
101
+ git checkout main
102
+ ```
103
+
104
+ We recommend that developers make a virtual environment to install all required dependencies.
105
+
106
+ Create a virtual environment in the root of the repository folder using the `venv` module.
107
+ The command below assumes that `python` is a version of Python3:
108
+
109
+ ```
110
+ python -m venv venv
111
+ ```
112
+
113
+ _(If this isn't the case for your environment, use the appropriate command alias for Python3)_
114
+
115
+ Activate your virtual environment so that Python uses it to manage dependencies.
116
+ Assuming that you are using Bash shell, reference the command below:
117
+
118
+ ```
119
+ source venv/bin/activate
120
+ ```
121
+
122
+ Otherwise, check the table titled "Command to activate virtual environment" [here](https://docs.python.org/3/library/venv.html#how-venvs-work) to find the command that works for your shell.
123
+
124
+ Install the dependencies listed in `requirements.txt` using `pip`:
125
+
126
+ ```
127
+ pip install -r requirements.txt
128
+ ```
129
+
130
+ You can now develop the Python SDK with the installed dependencies.
131
+ When you are finished with your development session, deactivate your virtual environment:
132
+
133
+ ```
134
+ deactivate
135
+ ```
136
+
137
+ ## Quickstart
138
+
139
+ After you install the package in your project, import the class for the required sub-package (i.e `Console` class for z/OS Console commands).
140
+ Create a dictionary to handle communication with the plug-in:
141
+
142
+ ```python
143
+ from zowe.zos_console_for_zowe_sdk import Console
144
+ profile = {
145
+ "host": "example.com",
146
+ "port": 443,
147
+ "user": "<user>",
148
+ "password": "<password>"
149
+ }
150
+
151
+ my_console = Console(profile)
152
+ ```
153
+
154
+ Alternatively, you can use an existing Zowe CLI profile instead:
155
+
156
+ ```python
157
+ from zowe.zos_core_for_zowe_sdk import ProfileManager
158
+ from zowe.zos_console_for_zowe_sdk import Console
159
+
160
+ profile = ProfileManager().load(profile_type="zosmf")
161
+ my_console = Console(profile)
162
+ ```
163
+
164
+ **Important**: If your z/OSMF profile uses a credentials manager, this approach may not work depending on your operating system. Support for loading secure profiles has only been tested on Windows and Ubuntu so far.
165
+
166
+ # Available options
167
+
168
+ Currently, the Zowe Python SDK supports the following interfaces:
169
+
170
+ - Console commands
171
+ - z/OSMF Information retrieval
172
+ - Submit job from a dataset
173
+ - Submit job from local file
174
+ - Submit job as plain text JCL
175
+ - Retrieve job status
176
+ - Retrieve job list from JES spool
177
+ - Start/End TSO address space
178
+ - Ping TSO address space
179
+ - Issue TSO command
180
+
181
+ **Important**: Notice that the below examples assume that you have already created
182
+ an object for the sub-package of your preference just like in the quickstart example.
183
+
184
+ ## Console
185
+
186
+ Usage of the console api:
187
+
188
+ ```python
189
+ result = my_console.issue_command("<command>")
190
+ ```
191
+
192
+ The result will be a JSON object containing the result from the console command.
193
+
194
+ ## Job
195
+
196
+ To retrieve the status of a job on JES
197
+
198
+ ```python
199
+ result = my_jobs.get_job_status("<jobname>", "<jobid>")
200
+ ```
201
+
202
+ To retrieve list of jobs in JES spool
203
+
204
+ ```python
205
+ result = my_jobs.list_jobs(owner="<user>", prefix="<job-prefix>")
206
+ ```
207
+
208
+ Additional parameters available are:
209
+
210
+ - max_jobs
211
+ - user_correlator
212
+
213
+ To submit a job from a dataset:
214
+
215
+ ```python
216
+ result = my_jobs.submit_from_mainframe("<dataset-name>")
217
+ ```
218
+
219
+ To submit a job from a local file:
220
+
221
+ ```python
222
+ result = my_jobs.submit_from_local_file("<file-path>")
223
+ ```
224
+
225
+ To submit from plain text:
226
+
227
+ ```python
228
+ jcl = '''
229
+ //IEFBR14Q JOB (AUTOMATION),CLASS=A,MSGCLASS=0,
230
+ // MSGLEVEL=(1,1),REGION=0M,NOTIFY=&SYSUID
231
+ //STEP1 EXEC PGM=IEFBR14
232
+ '''
233
+
234
+ result = my_jobs.submit_from_plaintext(jcl)
235
+
236
+ ```
237
+
238
+ ## TSO
239
+
240
+ Starting a TSO address space
241
+
242
+ ```python
243
+
244
+ session_parameters = {
245
+ 'proc': 'IZUFPROC',
246
+ 'chset': '697',
247
+ 'cpage': '1047',
248
+ 'rows': '204',
249
+ 'cols': '160',
250
+ 'rsize': '4096',
251
+ 'acct': 'DEFAULT'
252
+ }
253
+
254
+ session_key = my_tso.start_tso_session(**session_parameters)
255
+ ```
256
+
257
+ If you don't provide any session parameter ZoweSDK will attempt to start a session with default parameters.
258
+
259
+ To end a TSO address space
260
+
261
+ ```python
262
+ my_tso.end_tso_session("<session-key>")
263
+ ```
264
+
265
+ In order to issue a TSO command
266
+
267
+ ```python
268
+ tso_output = my_tso.issue_command("<tso-command>")
269
+ ```
270
+
271
+ ## z/OSMF
272
+
273
+ Usage of the z/OSMF api
274
+
275
+ ```python
276
+ result = my_zosmf.get_info()
277
+ ```
278
+
279
+ The result will be a JSON object containing z/OSMF information
280
+
281
+ # Acknowledgments
282
+
283
+ - Make sure to check out the [Zowe project](https://github.com/zowe)!
284
+ - For further information on z/OSMF REST API, click [HERE](https://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.izua700/IZUHPINFO_RESTServices.htm)
@@ -0,0 +1,4 @@
1
+ zowe_python_sdk_bundle-1.0.0.dev16.dist-info/METADATA,sha256=bIXgIbWzg350m5bDYLvlmp0reOjDKio8ug5AyDmsk_M,7772
2
+ zowe_python_sdk_bundle-1.0.0.dev16.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
3
+ zowe_python_sdk_bundle-1.0.0.dev16.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
4
+ zowe_python_sdk_bundle-1.0.0.dev16.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.43.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+