FireEye Client Library for Python
This is the Python client library for all things FireEye API. Currently it only supports FireEye's Detection On Demand but will have support for other FireEye API's soon.
For more API information, visit the FireEye Developer Hub
Installation
To install the Python client library:
pip install fireeyepy
To upgrade your installed library:
pip install fireeyepy --upgrade
Alternatively, you can clone the repository via the command line:
git clone https://github.com/fireeye/fireeye-python.git
Usage
Begin by importing the 'fireeye' module:
import fireeyepy
Detection On Demand
Construct a Detection object with your api key:
detection = fireeyepy.Detection(key=api_key)
To obtain a free trial API key, subscribe on the AWS Marketplace
Upload A File
import fireeyepy
detection = fireeyepy.Detection(key="yourapikeyhere")
result = detection.submit_file(
files={
"file": ('filename', open('./path/to/filename', 'rb'))
}
)
With configuration options:
result = detection.submit_file(
body={
"file_name": "different_name.txt",
"screenshot": true
},
files={
"file": ('filename', open('./path/to/filename', 'rb'))
}
)
Submit URLs
import fireeyepy
detection = fireeyepy.Detection(key="yourapikeyhere")
result = detection.submit_urls(["url1","url2",...])
Retrieve File or URL Report
response = detection.get_report(report_id)
You may also provide the optional extended=True flag to get the full, in-depth report:
response = detection.get_report(report_id, extended=True)
Search for a file from a connector (ex. Box, Teams, S3, etc.)
response = detection.search_reports(connector_type="box", file_id="123456")
Get a list of reports
Start and end time are in Unix epoch time.
response = detection.telemetry(start_time=1603980060, end_time=1604066460)
Retrieve Presigned URL for Dashboard Report
result = detection.get_presigned_url(report_id)
Perform Hash Lookup
response = detection.get_hash(hash)
Get a report artifact
artifact = detection.get_artifact(report_id="8d0aa90b-8bf3-4483-ae3b-0ded00d157ab", artifact_type="screenshot")
Get the health of the Detection on Demand service
health = detection.get_health()
Metadata
Release files for fireeyepy 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fireeyepy-1.3.0.tar.gz | 4.8 kB | Without provenance | Details for fireeyepy-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fireeyepy-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for fireeyepy-1.3.0-py3-none-any.whl |
Total release size: 10.0 kB
Release files / fireeyepy-1.3.0.tar.gz
| Download URL | fireeyepy-1.3.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9a20ea7db410a809c12cc75181054920a7c0694b3bf83ef525c0df45fa23f0c
|
|
BLAKE2b-256 checksum How to use checksums |
502abd0c84444e73b6f2d545137f069b060251bf5e3a1a8d6213eefc7a9e22e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
|
Release files / fireeyepy-1.3.0-py3-none-any.whl
| Download URL | fireeyepy-1.3.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a19a2bc884d959069919261d22de227863aba382a84d02f0806551b558b79e7e
|
|
BLAKE2b-256 checksum How to use checksums |
ada19ea3b06c2e937be5d0b02a343b333a5f979778bed0e554b136eedfcf2756
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
|
Security for fireeyepy 1.3.0
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.