Skip to main content

Python library for Trend Micro Vision One

Project description

PyTMV1: Python Library for Trend Micro Vision One

Build Lint Test Coverage Pypi: version Downloads Python: version License: apache Types - mypy Imports: isort Code style: black

Prerequisites

Using this project requires at least Python 3.7.

Features

  • A thread-safe client for your application.
  • HTTP pooling capabilities.
  • Easy integration with Trend Micro Vision One APIs.

Configuration

parameter description
name Identify the application using this library.
token Authentication token created for your account.
url Vision One API url this client connects to.
pool_connections Number of connection pools to cache (defaults to 1).
pool_maxsize Maximum size of the pool (defaults to 1).

Quick start

Installation

pip install pytmv1

Usage

>>> import pytmv1
>>> client = pytmv1.client("MyApplication", "Token", "https://api.xdr.trendmicro.com")
>>> result = client.get_exception_list()
>>> result.response
GetExceptionListResp(
    next_link=None,
    items=[
        ExceptionObject(
            url='https://*.example.com/path1/*',
            type=<ObjectType.URL: 'url'>,
            last_modified_date_time='2023-01-12T14:05:37Z',
            description='object description'
        )
    ]
)
>>> result.result_code
ResultCode.SUCCESS

Build the project

Install dependencies

pip install -e ".[dev]"

Build

hatch build

Run unit tests

pytest --verbose ./tests/unit

Run integration tests

pytest --mock-url="$url" --verbose ./tests/integration

Supported APIs

Python Vision One
Connectivity
test_connectivity Check availability of service
Common
get_base_task_result Download response task results
get_task_result Download response task results
Domain Account
disable_account Disable user account
enable_account Enable user account
reset_password_account Force password reset
sign_out_account Force sign out
Email
delete_email_message Delete email message
quarantine_email_message Quarantine email message
restore_email_message Restore email message
Endpoint
collect_file Collect file
isolate_endpoint Isolate endpoint
restore_endpoint Restore endpoint
terminate_process Terminate process
Sandbox Analysis
download_sandbox_analysis_result Download analysis results
download_sandbox_investigation_package Download investigation package
get_sandbox_analysis_result Get analysis results
get_sandbox_submission_status Get submission status
get_sandbox_suspicious_list Download suspicious object list
submit_file_to_sandbox Submit file to sandbox
submit_urls_to_sandbox Submit URLs to sandbox
Search
get_endpoint_data consume_endpoint_data Get endpoint data
Suspicious Objects
add_to_block_list Add to block list
remove_from_block_list Remove from block list
Suspicious Object Exception List
add_to_exception_list Add to exception list
get_exception_list consume_exception_list Get exception list
remove_from_exception_list Remove from exception list
Suspicious Object List
add_to_suspicious_list Add to suspicious object list
get_suspicious_list consume_suspicious_list List suspicious objects
remove_from_suspicious_list Remove from suspicious object list
Workbench
add_alert_note Add alert note
edit_alert_status Modify alert status
get_alert_details Get alert details
get_alert_list consume_alert_list Get alerts list

Contributing

Thank you for your interest in this project, please make sure to read the contribution guide.

Code of conduct

See Code of conduct.

License

Project distributed under the Apache 2.0 license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytmv1-0.5.0.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

pytmv1-0.5.0-py3-none-any.whl (27.3 kB view details)

Uploaded Python 3

File details

Details for the file pytmv1-0.5.0.tar.gz.

File metadata

  • Download URL: pytmv1-0.5.0.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.16

File hashes

Hashes for pytmv1-0.5.0.tar.gz
Algorithm Hash digest
SHA256 7d490c39726910bd52f961a28b5063cfdbb4c6797980a4e694f33a54855019dc
MD5 b0c4c620db8afa212a5d86e23e4a394e
BLAKE2b-256 14ba718fd1fe9c0de35e6ed5a810494b7e817e7b14a8134ecffc9c4d0af92898

See more details on using hashes here.

File details

Details for the file pytmv1-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: pytmv1-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 27.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.16

File hashes

Hashes for pytmv1-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 06cdc32bd8062887df058d9018cdb2b3a5470470c85d4bc30e4e6e12aa753273
MD5 d265dfaa19559245d1ef6d3a8ce8707a
BLAKE2b-256 24940d45c3247362ead0d8e8071941471513e53902fbd28dd29b1892c4fcc36a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page