Python library for Trend Micro Vision One
Project description
PyTMV1: Python Library for Trend Micro Vision One
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
$url
: Vision One API url (i.e: https://api.xdr.trendmicro.com)
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 |
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
Release history Release notifications | RSS feed
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.3.tar.gz
(23.1 kB
view details)
Built Distribution
pytmv1-0.5.3-py3-none-any.whl
(27.3 kB
view details)
File details
Details for the file pytmv1-0.5.3.tar.gz
.
File metadata
- Download URL: pytmv1-0.5.3.tar.gz
- Upload date:
- Size: 23.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17d758595ba189d5ba8d2e066ed724445cb2f54190192d469daf280f384143d6 |
|
MD5 | 9f321d16b60fdb2e907a16a9497af57d |
|
BLAKE2b-256 | 8da08534740751c04c33ed24ea3cd7344373da25c15f493fca28cd0413d3b27f |
File details
Details for the file pytmv1-0.5.3-py3-none-any.whl
.
File metadata
- Download URL: pytmv1-0.5.3-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb0459c1d184165d4b1dadf58af2a8558bd8f64abfbac0abf76432b641f1b492 |
|
MD5 | ee33bdfbf0f62a10155633f485aad199 |
|
BLAKE2b-256 | dca856f134a451377734ffb1978a527f79771fe4b510ade4d0afc99e6a1469a1 |