Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anax advanced usage #348

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/source/usage/advanced.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Advanced usage
Advanced steps
===============

- You can use a custom Certificate Authority.
The python SDK supports the commonly used environmental variables `REQUESTS_CA_BUNDLE` and `CURL_CA_BUNDLE` to provide a certificate chain. Also, you may use the `SSL_CERT_FILE` environmental variable.
- Use a custom Certificate Authority if working in a restricted environment.
The Python SDK supports the commonly used environmental variables `REQUESTS_CA_BUNDLE` and `CURL_CA_BUNDLE` to provide a certificate chain.

You can also use the `SSL_CERT_FILE` environmental variable in project-level configurations.
49 changes: 27 additions & 22 deletions docs/source/usage/examples.rst
Original file line number Diff line number Diff line change
@@ -1,32 +1,37 @@
Basic usage
First steps
============

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).
Create a dictionary to handle communication with the plug-in:
After you install the package in your project, integrate the SDK in your script:

.. code-block:: python
1. Import the class for the required sub-package in order to call the individual SDK method and run plug-in commands.

from zowe.zos_console_for_zowe_sdk import Console
profile = {
"host": "<host address>",
"port": 443, # Include the port if different from the default (443)
"user": "<user>",
"password": "<password>",
# "rejectUnauthorized": True, # Set to False to disable SSL verification
# "basePath": "", # Define base path if using Zowe API ML (e.g. "/ibmzosmf/api/v1" for z/OSMF)
# "protocol": "https", # Include the protocol if different from the default (https)
}
For example, the `Console` class must be imported for z/OS Console commands to be issued.

my_console = Console(profile)
2. Create a dictionary to add connection information to communicate with the plug-in:

Alternatively you can use an existing Zowe CLI profile instead:
.. code-block:: python

.. code-block:: python
from zowe.zos_console_for_zowe_sdk import Console
profile = {
"host": "<host address>",
"port": 443, # Include the port if different from the default (443)
"user": "<user>",
"password": "<password>",
# "rejectUnauthorized": True, # Set to False to disable SSL verification
# "basePath": "", # Define base path if using Zowe API ML (e.g. "/ibmzosmf/api/v1" for z/OSMF)
# "protocol": "https", # Include the protocol if different from the default (https)
}

from zowe.zos_console_for_zowe_sdk import Console
from zowe.core_for_zowe_sdk import ProfileManager
my_console = Console(profile)

# Load the profile using ProfileManager
profile = ProfileManager().load(profile_name="<profile name>")
Alternatively you can use an existing Zowe CLI profile instead:

my_console = Console(profile)
.. code-block:: python

from zowe.zos_console_for_zowe_sdk import Console
from zowe.core_for_zowe_sdk import ProfileManager

# Load the profile using ProfileManager
profile = ProfileManager().load(profile_name="<profile name>")

my_console = Console(profile)
2 changes: 2 additions & 0 deletions docs/source/usage/getting-started.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Getting started
=================
Review the requirements and installation instructions to get started using the Zowe Client Python SDK.

.. toctree::
:maxdepth: 2
Expand All @@ -8,3 +9,4 @@ Getting started
installation
examples
advanced

16 changes: 5 additions & 11 deletions docs/source/usage/installation.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
Installation
============
When installing the Zowe Client Python SDK you have two options:

When installing the Zowe Client Python SDK you have two options.
- Install **all Zowe packages** to install everything under the `zowe` namespace in PyPi.
- Install a **single subpackage** for a smaller installation.

- Install all the Zowe packages
- Install a single sub-package

The choice depends on your intentions. If you chose to install all Zowe SDK packages
this means that you will install everything under the `zowe` namespace in PyPi.

Alternatively you can chose to install only a single subpackage for a smaller installation.

To install all Zowe SDK packages using pip:
To install all Zowe SDK packages using `pip`:

.. code-block::

pip install -U --pre zowe-python-sdk-bundle

To install only a subpackage using pip:
To install only a subpackage using `pip`:

.. code-block::

Expand Down
8 changes: 4 additions & 4 deletions docs/source/usage/requirements.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Requirements
=============

The project requires the following:
Zowe Client Python SDK requires the following:

- Python 3.9 and above
- Sphinx (optional - To build project documentation)
- Enchant (optional - to build project documentation)
- **Python** 3.9+ to run your script
- (optional) **Sphinx** to build project documentation
- (optional) **Enchant** to build project documentation
Loading