Skip to main content

McAfee ePolicy Orchestrator Policies Python Class Library

PyPI Python Status License Top language

Overview

This package provides a set of Python classes to read, inspect, and modify policy documents exported from the Policy Catalog of McAfee ePolicy Orchestrator (ePO), without needing to know the underlying XML schema. Each supported policy is exposed as an object with named properties (e.g. policy.asci = 15) instead of raw Section/Setting XML lookups.

Supported policies

Product Policy Status
McAfee Agent General Full read/write
McAfee Agent Repository Full read/write
McAfee Agent Troubleshooting Full read/write
McAfee Agent Custom Properties Full read/write
McAfee Agent Product Improvement Program (Telemetry) Full read/write
ENS Threat Prevention On-Access Scan Full read/write
ENS Threat Prevention On-Demand Scan Full read/write
ENS Threat Prevention Exploit Prevention Partial (signatures/expert rules full read/write; application rules read + enable/disable; process exclusions not yet implemented)
ENS Firewall Rules Read-only / reporting (editing not yet implemented)

McAfee Agent policy coverage is complete - all 5 McAfee Agent policy types are implemented.

Installation

pip install mcafee_epo_policies

Usage

from mcafee_epo_policies import McAfeeAgentPolicies, McAfeeAgentPolicyGeneral

# Load a Policies export (XML) from the ePO Policy Catalog
with open('EPOAGENTMETA_policies.xml', 'rb') as f:
    policies = McAfeeAgentPolicies(f.read())

# List the policies contained in the export
print(policies.list())

# Extract one policy and wrap it for editing
policy_xml = policies.get_policy('General', 'My Custom Policy')
policy = McAfeeAgentPolicyGeneral(policy_xml)

# Read and change a setting through a property, instead of raw XML
print(policy.asci)
policy.asci = 15

# Save the edited policy, ready to re-import into ePO
policy.save_to_file('My Custom Policy - edited.xml')

Examples

The examples/ directory has short, runnable scripts covering McAfee Agent (General/Repository), ENS Threat Prevention (On-Access Scan, On-Demand Scan), and ENS Firewall (Rules reporting).

Documentation

There is no separate documentation site yet; every class and method has a docstring describing which ePO UI setting it maps to.

Requirements

Python 3.8 or later.

Bugs and Feedback

For bugs, questions and discussions please use the GitHub Issues.

License

Copyright 2020 Benjamin Marandel

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Metadata

Release files for mcafee-epo-policies 0.2.0

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

Source distribution (sdist)

Source distribution for mcafee-epo-policies 0.2.0
File Size Uploaded
mcafee_epo_policies-0.2.0.tar.gz 60.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcafee-epo-policies 0.2.0
File Interpreter ABI Platform
mcafee_epo_policies-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 121.0 kB

Release files / mcafee_epo_policies-0.2.0.tar.gz

Download URL mcafee_epo_policies-0.2.0.tar.gz
Size 60.8 kB
Tags Source
SHA-256 checksum
How to use checksums
90082690559eec229941b1579d916cff6e42aeb4dc5c764b1770180a6f04c56f
BLAKE2b-256 checksum
How to use checksums
2d12819504edafc548ff894bca5da4b74d15b975e6b7b3d79ea6417535be4e58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / mcafee_epo_policies-0.2.0-py3-none-any.whl

Download URL mcafee_epo_policies-0.2.0-py3-none-any.whl
Size 60.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24f42bf0f73d8109578ebefd967e30aeea77e0bef5d6909e03058f948949410f
BLAKE2b-256 checksum
How to use checksums
18e984fd1d1152e0c7c993186b968ea5a2a8bbb02a05de9752c7232e896e66b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

2.0.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

This release

0.2.0 This release

2 release files

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

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