Skip to content

Commit

Permalink
Merge branch 'release/1.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchos committed Jun 22, 2023
2 parents 4502dc8 + 6f7b5ab commit 9e23095
Show file tree
Hide file tree
Showing 43 changed files with 2,339 additions and 233 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ 3.7, 3.8, 3.9, '3.10' ]
python-version: [ "3.8", "3.9", "3.10", "3.11" ]

steps:
- uses: actions/checkout@v2
Expand Down
9 changes: 2 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
exclude: ^(docsrc/|docs/|examples/)
repos:
- repo: https://github.com/psf/black
rev: 23.1.0
rev: 23.3.0
hooks:
- id: black
name: black
language: system
entry: black
minimum_pre_commit_version: 2.9.2
require_serial: true
types: [python]
language_version: python3.11

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
Expand Down
17 changes: 9 additions & 8 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
furo==2022.12.7
pre-commit==3.0.4
pytest==7.2.1
python-box==7.0.0
furo==2023.5.20
pre-commit==3.3.3
pytest==7.3.2
python-box==7.0.1
restfly==1.4.7
requests==2.28.2
responses==0.22.0
sphinx==6.1.3
toml==0.10.2
requests==2.31.0
responses==0.23.1
sphinx==7.0.1
toml==0.10.2
urllib3<2
11 changes: 7 additions & 4 deletions docsrc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
html_title = ""

# The short X.Y version
version = '1.4'
version = '1.5'
# The full version, including alpha/beta/rc tags
release = '1.4.1'
release = '1.5.0'

# -- General configuration ---------------------------------------------------

Expand Down Expand Up @@ -95,7 +95,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
html_static_path = []

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down Expand Up @@ -182,7 +182,10 @@
# -- Options for intersphinx extension ---------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {"https://docs.python.org/": None}
intersphinx_mapping = {'python': ('https://docs.python.org/3', None),
'restfly': ('https://restfly.readthedocs.io/en/latest/', None),
'box': ('https://box.readthedocs.io/en/latest', None),
}

# -- Options for todo extension ----------------------------------------------

Expand Down
15 changes: 14 additions & 1 deletion docsrc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
zs/zia/index
zs/zpa/index
zs/zcc/index
zs/zdx/index

pyZscaler SDK - Library Reference
=====================================================================
Expand Down Expand Up @@ -41,7 +42,7 @@ Products
- :doc:`Zscaler Private Access (ZPA) <zs/zpa/index>`
- :doc:`Zscaler Internet Access (ZIA) <zs/zia/index>`
- :doc:`Zscaler Mobile Admin Portal <zs/zcc/index>`
- Cloud Security Posture Management (CSPM) - (work in progress)
- :doc:`Zscaler Digital Experience (ZDX) <zs/zdx/index>`

Installation
==============
Expand Down Expand Up @@ -98,6 +99,18 @@ Quick ZCC Example
for device in zcc.devices.list_devices():
pprint(device)
Quick ZDX Example
^^^^^^^^^^^^^^^^^^^
.. code-block:: python
from pyzscaler import ZDX
from pprint import pprint
zcc = ZDX(client_id='CLIENT_ID', client_secret='CLIENT_SECRET')
for device in zdx.devices.list_devices():
pprint(device)
.. automodule:: pyzscaler
:members:
Expand Down
13 changes: 0 additions & 13 deletions docsrc/zs/zcc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@ ZCC
==========
This package covers the ZCC interface.

Retrieving the ZCC Company ID.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The ZCC Company ID can be obtained by following these instructions:
1. Navigate to the Zscaler Mobile Admin Portal in a web browser.
2. Open the Browser console (typically ``F12``) and click on **Network**.
3. From the top navigation, click on **Enrolled Devices**.
4. Look for the API call ``mobileadmin.zscaler.net/webservice/api/web/usersByCompany`` in the 'Networks' tab
of the Browser Console. Click on this entry.
5. Click on either **Preview** or **Response** to see the data that was returned by the Mobile Admin Portal.
6. The Company ID is represented as an ``int`` and can be found under the ``companyId`` key in the object returned
for each user.

.. toctree::
:maxdepth: 1
:glob:
Expand Down
12 changes: 12 additions & 0 deletions docsrc/zs/zdx/admin.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
admin
------

The following methods allow for interaction with the ZDX
Admin API endpoints.

Methods are accessible via ``zdx.admin``

.. _zdx-admin:

.. automodule:: pyzscaler.zdx.admin
:members:
12 changes: 12 additions & 0 deletions docsrc/zs/zdx/apps.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apps
------

The following methods allow for interaction with the ZDX
Application API endpoints.

Methods are accessible via ``zdx.apps``

.. _zdx-apps:

.. automodule:: pyzscaler.zdx.apps
:members:
12 changes: 12 additions & 0 deletions docsrc/zs/zdx/devices.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
devices
-------

The following methods allow for interaction with the ZDX
Devices API endpoints.

Methods are accessible via ``zdx.devices``

.. _zdx-devices:

.. automodule:: pyzscaler.zdx.devices
:members:
13 changes: 13 additions & 0 deletions docsrc/zs/zdx/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ZDX
==========
This package covers the ZDX interface.

.. toctree::
:maxdepth: 1
:glob:
:hidden:

*

.. automodule:: pyzscaler.zdx
:members:
12 changes: 12 additions & 0 deletions docsrc/zs/zdx/session.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
session
-------

The following methods allow for interaction with the ZDX
Session API endpoints.

Methods are accessible via ``zdx.session``

.. _zdx-session:

.. automodule:: pyzscaler.zdx.session
:members:
12 changes: 12 additions & 0 deletions docsrc/zs/zdx/users.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
users
-------

The following methods allow for interaction with the ZDX
Users API endpoints.

Methods are accessible via ``zdx.users``

.. _zdx-users:

.. automodule:: pyzscaler.zdx.users
:members:
21 changes: 3 additions & 18 deletions docsrc/zs/zia/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,10 @@ ZIA
This package covers the ZIA interface.

.. toctree::
:maxdepth: 2
:glob:
:hidden:

admin_and_role_management
audit_logs
config
dlp
firewall
locations
rule_labels
sandbox
security
session
ssl_inspection
traffic
url_categories
url_filters
users
vips
web_dlp
*

.. automodule:: pyzscaler.zia
:members:
12 changes: 0 additions & 12 deletions docsrc/zs/zpa/connector_groups.rst

This file was deleted.

25 changes: 13 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyzscaler"
version = "1.4.1"
version = "1.5.0"
description = "A python SDK for the Zscaler API."
authors = ["Mitch Kelly <me@mkelly.dev>"]
license = "MIT"
Expand All @@ -16,10 +16,10 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Security",
"Topic :: Software Development :: Libraries :: Python Modules", ]
include = [
Expand All @@ -30,21 +30,22 @@ include = [
"Bug Tracker" = "https://github.com/mitchos/pyZscaler/issues"

[tool.poetry.dependencies]
python = "^3.7"
python = "^3.8"
restfly = "1.4.7"
python-box = "7.0.0"
python-box = "7.0.1"

[tool.poetry.dev-dependencies]
python = "^3.7"
python = "^3.8"
restfly = "1.4.7"
python-box = "7.0.0"
sphinx = "6.1.3"
furo = "2022.12.7"
pytest = "7.2.1"
requests = "2.28.2"
pre-commit = "3.0.4"
responses = "0.22.0"
python-box = "7.0.1"
sphinx = "7.0.1"
furo = "2023.5.20"
pytest = "7.3.2"
requests = "2.29.0"
pre-commit = "3.3.3"
responses = "0.23.1"
toml = "0.10.2"
urllib3 = "1.26.16"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
3 changes: 2 additions & 1 deletion pyzscaler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"Dax Mickelson",
"Jacob Gårder",
]
__version__ = "1.4.1"
__version__ = "1.5.0"

from pyzscaler.zcc import ZCC # noqa
from pyzscaler.zdx import ZDX # noqa
from pyzscaler.zia import ZIA # noqa
from pyzscaler.zpa import ZPA # noqa
Loading

0 comments on commit 9e23095

Please sign in to comment.