Skip to main content

PyTriage

PyTriage is a Python library for interacting with Cofense Triage's v1 and v2 API's.

Supported Actions

Reports

  • Categorization
  • Deletion
  • Tag application
  • Metadata retrieval

Reporters

  • Update
  • Review
  • Metadata retrieval

Categories

  • Creation
  • Review
  • Metadata retrieval

Rules

  • Creation
  • Review
  • Update
  • Deletion

Indicators

  • Review
  • Creation
  • Update
  • Deletion

Installation

pip install pytriage

Usage

# Client for v2 endpoint interaction
from pytriage.pytriage import TriageClient

# Instantiate your client
triage_client = TriageClient(<client_id>, <client_secret>, 'https://triageserver.com/')

# Authenticate to retrieve and store a JWT for subsequent requests
triage_client.authenticate()

# Create a new category
triage_client.create_category(name='phishing', score=3, color='#FFFFFF')

# Categorize a report
triage_client.categorize_report(report_id='9999', category_id='4', tag_list=['credential harvesting', 'o365'])

# Client for v1 endpoint interaction
from pytriage.pytriage import TriageClientv1

v1_client = TriageClientv1('joe@test.com', 'secret_token', 'https://triageserver.com')

# Retrieve an attachment
attachment_bytestring = v1_client.get_attachment('attachment_id')

# Download a report preview
v1_client.get_report_preview('9999', 'jpg')

# View all reports from a chosen timeframe
reports = v1_client.get_reports(start_date='2020-07-01', end_date='2020-07-08')

License

Gnu GPLv3

Metadata

Release files for PyTriage 0.2.1

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

Source distribution (sdist)

Source distribution for PyTriage 0.2.1
File Size Uploaded Provenance Actions
PyTriage-0.2.1.tar.gz 6.7 kB Without provenance Details for PyTriage-0.2.1.tar.gz

Release files / PyTriage-0.2.1.tar.gz

Download URL PyTriage-0.2.1.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
eb4b471198bec03cd1c6be3c8cb12532f3517bff57cfb4dd7b07c72c54701202
BLAKE2b-256 checksum
How to use checksums
141a702b670998587cae12395854f5837bea62c72b797cc8ba32eb1ebf85dcea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Security for PyTriage 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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