Skip to content

Commit 105a7a5

Browse files
authored
Update README.md
1 parent 2758857 commit 105a7a5

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,45 @@
11
# FireEye Client Library for Python
2+
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.
3+
4+
Installation
5+
------------
6+
7+
To install the Python client library:
8+
```
9+
git clone https://github.com/fireeye/fireeye-python.git
10+
cd fireeye-python
11+
pip install -r requirements.txt
12+
python setup.py bdist_wheel
13+
pip install -e .
14+
```
15+
16+
Usage
17+
-----
18+
Begin by importing the 'fireeye' module:
19+
```python
20+
import fireeyepy
21+
```
22+
23+
## Detection On Demand
24+
Construct a Detection object with your api key:
25+
```python
26+
detection = fireeye.Detection(key=api_key)
27+
```
28+
### Upload A File
29+
```python
30+
response = detection.submit_file(
31+
files={
32+
"file": ('maliciousfile.txt', open('./maliciousfile.txt', 'rb'))
33+
}
34+
)
35+
```
36+
37+
### Retrieve File Results
38+
```python
39+
response = detection.get_file_result(submission_id)
40+
```
41+
42+
### Perform Hash Lookup
43+
```python
44+
response = detection.get_hash_lookup(hash)
45+
```

0 commit comments

Comments
 (0)