Skip to content

Commit

Permalink
Pytmv1 - Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
t0mz06 committed Dec 1, 2023
1 parent a82de1d commit cf3575f
Show file tree
Hide file tree
Showing 37 changed files with 4,737 additions and 122 deletions.
122 changes: 0 additions & 122 deletions python/pmtmv1/README.md

This file was deleted.

2 changes: 2 additions & 0 deletions python/pytmv1/.coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[run]
omit = __about__.py
146 changes: 146 additions & 0 deletions python/pytmv1/README.md

Large diffs are not rendered by default.

77 changes: 77 additions & 0 deletions python/pytmv1/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
[build-system]
requires = ["hatchling>=1.12.2"]
build-backend = "hatchling.build"

[project]
name = "pytmv1"
description = "Python library for Trend Micro Vision One"
license = "Apache-2.0"
readme = "README.md"
dynamic = ["version"]
requires-python = ">=3.7"
authors = [
{ name = "Thomas Legros", email = "[email protected]" }
]
maintainers = [
{ name = "TrendATI", email = "[email protected]"},
]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development :: Libraries",
]
dependencies = [
"beautifulsoup4 ~= 4.11.1",
"requests ~= 2.27.1",
"pydantic ~= 1.10.4",
]

[project.optional-dependencies]
dev = [
"hatch ~= 1.6.3",
"psutil ~= 5.9.4",
"pytest ~= 7.2.0",
"pytest-mock ~= 3.10.0",
"pytest-cov ~= 4.0.0",
]

[project.urls]
"Source" = "https://github.com/TrendATI/pytmv1"
"Issues" = "https://github.com/TrendATI/pytmv1/issues"

[tool.hatch.build.targets.sdist]
exclude = [".github", "tests"]

[tool.hatch.version]
path = "src/pytmv1/__about__.py"

[tool.black]
target-version = ["py37"]
line-length = 79
preview = true
color = true

[tool.isort]
profile = "black"
line_length = 79
color_output = true

[tool.mypy]
python_version = "3.7"
exclude = ["dist", "tests", "venv"]
show_column_numbers = true
warn_unused_configs = true
pretty = true
strict = true

[tool.pytest.ini_options]
addopts = "--show-capture=log -s"
1 change: 1 addition & 0 deletions python/pytmv1/src/pytmv1/__about__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.6.2"
186 changes: 186 additions & 0 deletions python/pytmv1/src/pytmv1/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
from .__about__ import __version__
from .caller import Client, client
from .mapper import map_cef
from .model.commons import (
Alert,
Digest,
EmailActivity,
EmailMessage,
Endpoint,
EndpointActivity,
Entity,
Error,
ExceptionObject,
HostInfo,
ImpactScope,
Indicator,
MatchedEvent,
MatchedFilter,
MatchedIndicatorPattern,
MatchedRule,
MsData,
MsDataUrl,
MsError,
SaeAlert,
SaeIndicator,
SandboxSuspiciousObject,
SuspiciousObject,
TiAlert,
TiIndicator,
Value,
ValueList,
)
from .model.enums import (
EntityType,
EventID,
EventSubID,
IntegrityLevel,
InvestigationStatus,
ObjectType,
OperatingSystem,
ProductCode,
Provenance,
Provider,
QueryField,
QueryOp,
RiskLevel,
SandboxAction,
SandboxObjectType,
ScanAction,
Severity,
Status,
TaskAction,
)
from .model.requests import (
AccountTask,
EmailMessageIdTask,
EmailMessageUIdTask,
EndpointTask,
FileTask,
ObjectTask,
ProcessTask,
SuspiciousObjectTask,
)
from .model.responses import (
AccountTaskResp,
AddAlertNoteResp,
BaseTaskResp,
BlockListTaskResp,
BytesResp,
CollectFileTaskResp,
ConnectivityResp,
ConsumeLinkableResp,
EmailMessageTaskResp,
EndpointTaskResp,
GetAlertDetailsResp,
GetAlertListResp,
GetEmailActivityDataCountResp,
GetEmailActivityDataResp,
GetEndpointActivityDataCountResp,
GetEndpointActivityDataResp,
GetEndpointDataResp,
GetExceptionListResp,
GetSuspiciousListResp,
MultiResp,
MultiUrlResp,
NoContentResp,
SandboxAnalysisResultResp,
SandboxSubmissionStatusResp,
SandboxSubmitUrlTaskResp,
SandboxSuspiciousListResp,
SubmitFileToSandboxResp,
TerminateProcessTaskResp,
)
from .results import MultiResult, Result, ResultCode

__all__ = [
"__version__",
"client",
"map_cef",
"AccountTask",
"AccountTaskResp",
"AddAlertNoteResp",
"Alert",
"BaseTaskResp",
"BlockListTaskResp",
"BytesResp",
"Client",
"CollectFileTaskResp",
"ConnectivityResp",
"ConsumeLinkableResp",
"Digest",
"EmailActivity",
"EmailMessage",
"EmailMessageIdTask",
"EmailMessageTaskResp",
"EmailMessageUIdTask",
"Endpoint",
"EndpointActivity",
"EndpointTask",
"EndpointTaskResp",
"Entity",
"EntityType",
"Error",
"EventID",
"EventSubID",
"ExceptionObject",
"FileTask",
"GetAlertDetailsResp",
"GetAlertListResp",
"GetEmailActivityDataResp",
"GetEmailActivityDataCountResp",
"GetEndpointActivityDataResp",
"GetEndpointActivityDataCountResp",
"GetEndpointDataResp",
"GetExceptionListResp",
"GetSuspiciousListResp",
"HostInfo",
"ImpactScope",
"Indicator",
"IntegrityLevel",
"InvestigationStatus",
"MatchedEvent",
"MatchedFilter",
"MatchedIndicatorPattern",
"MatchedRule",
"MsData",
"MsDataUrl",
"MsError",
"MultiResult",
"MultiResp",
"MultiUrlResp",
"NoContentResp",
"ObjectTask",
"ObjectType",
"OperatingSystem",
"ProcessTask",
"ProductCode",
"Provenance",
"Provider",
"QueryField",
"QueryOp",
"Result",
"ResultCode",
"RiskLevel",
"SaeAlert",
"SaeIndicator",
"SandboxAction",
"SandboxAnalysisResultResp",
"SandboxObjectType",
"SandboxSubmissionStatusResp",
"SandboxSubmitUrlTaskResp",
"SandboxSuspiciousListResp",
"SandboxSuspiciousObject",
"ScanAction",
"Severity",
"Status",
"SubmitFileToSandboxResp",
"SuspiciousObject",
"SuspiciousObjectTask",
"TaskAction",
"TerminateProcessTaskResp",
"TiAlert",
"TiIndicator",
"Value",
"ValueList",
]
Loading

0 comments on commit cf3575f

Please sign in to comment.