A thin wrapper around requests to interact with the Simple Intel Platform (SIP).
Project description
pysip
A thin wrapper around requests to interact with the Simple Intel Platform (SIP).
Usage
import pysip
# Connect to SIP
sip_client = pysip.Client('localhost:4443', '11111111-1111-1111-1111-111111111111', verify=False)
# Example POST request
# Add an indicator and ignore any 409 Conflict error if the indicator already exists.
try:
data = {'type': 'IP', 'value': '127.0.0.1'}
sip_client.post('/api/indicators', data)
except pysip.ConflictError:
pass
# Example GET request
# Get all of the indicators with the "Analyzed" status in "bulk" mode.
indicators = sip_client.get('/api/indicators?status=Analyzed&bulk=true')
# Example PUT request
# Update an indicator's status.
data = {'status': 'Informational'}
result = sip_client.put('/api/indicators/1', data)
# Example DELETE request
# Delete an indicator.
result = sip_client.delete('/api/indicators/1')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pysip-1.1.0.tar.gz
(4.1 kB
view details)
Built Distribution
pysip-1.1.0-py3-none-any.whl
(7.3 kB
view details)
File details
Details for the file pysip-1.1.0.tar.gz
.
File metadata
- Download URL: pysip-1.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb0af62d5bde6e1f1be48abd47c1641cc894f08a15cdc67e14b4eb9c95a2b15f |
|
MD5 | 4a1db21862fb846e8492da24fa2a9a76 |
|
BLAKE2b-256 | 8021a95c6cc02e1f4b59b1231eeff0cdf13c20713181cc56fd4b1e6f02afad89 |
File details
Details for the file pysip-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: pysip-1.1.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42476a2fbf812e2594d9dc26226adeb6c308281373febde310cef2d720c9e48f |
|
MD5 | 36b6f1193e56ba0f834656805b30a67c |
|
BLAKE2b-256 | bfc2ae20b42126e638f009bc4f936db3e38696570186961f230efa14a9e2e746 |