Skip to main content

Build Status Version

Pytos is the Tufin Orchestration Suite (TOS) Software Development Kit (SDK) for Python, which allows Python developers to make use of the services provided by SecureTrack, SecureChange and SecureApp.

Common Use Cases

  • Get security rules or ACLs from firewalls

  • Get network objects and services from firewalls

  • Get security groups from cloud platforms

  • Get routing tables and interfaces from routers and firewalls

  • Manage security zones

  • Submit and manage access requests to update firewall policies

  • Manage application connectivity

Installation

Install the package by running the following command (it is recommended that you upgrade pip first):

# pip install pytos

Running Tests

The package can be tested in all supported Python versions using tox. The tested Python version must be installed including tox:

$ tox -e py34

You can also run individual tests with your default Python version by running nosetests command directly:

$ nosetests -v tests/securetrack_test/test_secure_track_helper_unittest.py:TestGeneralSettings

SecureTrack

Connect to SecureTrack with valid username and password:

from pytos.securetrack.helpers import Secure_Track_Helper
st_helper = Secure_Track_Helper("127.0.0.1", ("username", "password"))

SecureChange

Connect to SecureChange with valid username and password:

from pytos.securechange.helpers import Secure_Change_Helper
sc_helper = Secure_Change_Helper("127.0.0.1", ("username", "password"))

SecureApp

Connect to SecureApp with valid username and password:

from pytos.secureapp.helpers import Secure_App_Helper
sa_helper = Secure_App_Helper("127.0.0.1", ("username", "password"))

How to use pytos logger

To use the pytos logging mechanism perform the following steps:

The following table defines the log levels and messages, in decreasing order of severity.

Parameters

Description

CRITICAL

Only critical messages.

ERROR

Messages with error and above.

WARNING

Message with warning and above.

INFO

Messages with info and above.

DEBUG

All levels.

Create an ini like configuration file with the following sections:

[common]
log_file_path = /var/log/pytos/

[log_levels]
common = WARNING
helpers = WARNING
reports = WARNING
requests = WARNING
mail = WARNING
sql = WARNING
xml = WARNING
web = WARNING
third_party = WARNING

In your code call the following methods:

import logging
from pytos.common.logging.Defines import COMMON_LOGGER_NAME
from pytos.common.logging.Logger import setup_loggers
from pytos.common.functions.Config import Secure_Config_Parser

conf = Secure_Config_Parser(config_file_path="/ini/like/configuration/path/pytos.conf")
logger = logging.getLogger(COMMON_LOGGER_NAME)
setup_loggers(conf.dict("log_levels"), log_to_stdout=True)
logger.info("Hello world")

Getting Help

For tracking bugs and new feature requests please use GitHub issues. Please also use these community resources for getting help:

Metadata

Release files for pytos 1.2.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for pytos 1.2.8
File Interpreter ABI Platform
pytos-1.2.8-py3-none-any.whl Python 3 none any Details

Release files / pytos-1.2.8-py3-none-any.whl

Download URL pytos-1.2.8-py3-none-any.whl
Size 182.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95e19f085fa16f75212748cb2a78935739028bc5032b3dcc20c1395e32a5a991
BLAKE2b-256 checksum
How to use checksums
dec8d3efc9b7ee40227eff6bbf56a4da7e45a0357e3ccbaa2314919dfee8f75e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.6.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.4

Release history Release notifications | RSS feed

This release

1.2.8 This release

1 release file

1.2.7

1 release file

1.2.4

1 release file

1.2.3

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page