10.3. External Python Packages

Tanium HAT depends on a large number of open source python packages, all of which are included in the tool in order to provide the ability to unzip and run.

Some of the python packages Tanium HAT depends on are pure python, and they live in the libs_externals/any directory.

Some of the python packages Tanium HAT depends on are python mixed with platform specific binaries, and those are found in either libs_externals/osx for OS X platforms, or libs_externals/win for Windows platforms.

Note

No other platforms are supported out of the box, but if you have a different platform and have installed these python packages for your platform, you can still run Tanium HAT. Take a peek in one of the platform specific packages directory to see which packages you would need to install.

10.3.1. Module: libs_external

Adds paths to the PYTHONPATH so normal import usage can occur for external packages.

There are three directories under this package:

  • any: contains pure, non binary python packages that work for any OS
  • osx: contains mixed binary/python packages that work only for OS X
  • win: contains mixed binary/python packages that work only for Windows

After importing this package, you should be able to do:

>>> import pptx  # or any package in libs_external/any
>>> import pandas # or any package in libs_external/[win|osx]
libs_external.ANY_DIR = u'any'

Non-platform specific directory for this system.

libs_external.ANY_PATH = u'/Users/daniel.loffredo/proj/that/tanium_hat/libs_external/any'

The non-platform specific library path, ala /github/tanium_hat/libs_external/any

libs_external.PKGS = [u'Pillow-3.4.2', u'lxml-3.6.4', u'cffi-1.11.5', u'numpy-1.11.2+mkl', u'pandas-0.19.1', u'cryptography-2.4.2']

List of platform specific binary packages.

libs_external.PKGS_TXT = u'Pillow-3.4.2, lxml-3.6.4, cffi-1.11.5, numpy-1.11.2+mkl, pandas-0.19.1, cryptography-2.4.2'

String list of platform specific binary packages.

libs_external.PLATFORM_DIR = u'osx'

Platform specific directory for this system.

libs_external.PLATFORM_MAP = {u'windows': u'win', u'darwin': u'osx', u'linux': u'linux'}

Mapping of platform.system().lower() to platform specific library directories.

libs_external.PLATFORM_PATH = u'/Users/daniel.loffredo/proj/that/tanium_hat/libs_external/osx'

The platform specific library path, ala /github/tanium_hat/libs_external/osx

libs_external.THIS_FILE = '/Users/daniel.loffredo/proj/that/tanium_hat/libs_external/__init__.pyc'

This file, ala /github/tanium_hat/libs_external/__init__.py

libs_external.THIS_PATH = '/Users/daniel.loffredo/proj/that/tanium_hat/libs_external'

The path from this file, ala /github/tanium_hat/libs_external

libs_external.THIS_PLATFORM = 'darwin'

Platform for this system.