Skip to main content
# Capsule8 api-python

This repo is as a wrapper repo around the [Capsule8](https://github.com/capsule8/capsule8) sensor api.

## Install with pip

```
pip install capsule8
```

## Install with virtualenv

```
virtualenv test_capsule8
cd test_capsule8
source bin/activate
pip install capsule8
```

## Examples

In order to run the examples you need to have a running [capsule8](https://github.com/capsule8/capsule8) sensor on your machine. Once you have a running sensor you can run the examples. Be sure that the capsule8 sensor socket chowned by the current user.

```
sudo chown $USER /var/run/capsule8/sensor.sock
```

Then you can run the SensorClient and start streaming capsule8 sensor telemetry. In this example, every process events pid will be printed to stdout

```
from capsule8.sensor import SensorClient
from itertools import islice

s = SensorClient()


s.subscribe({"event_filter": {
"process_events": [
{"type": "PROCESS_EVENT_TYPE_FORK"},
{"type": "PROCESS_EVENT_TYPE_EXEC"},
{"type": "PROCESS_EVENT_TYPE_EXIT"}
]
}})

max_events = 5
for event in islice(s.telemetry(), max_events):
print(event.events[0].event.process_pid)
```

Metadata

Release files for capsule8 1.6

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

Source distribution (sdist)

Source distribution for capsule8 1.6
File Size Uploaded
capsule8-1.6.tar.gz 31.5 kB Details

Release files / capsule8-1.6.tar.gz

Download URL capsule8-1.6.tar.gz
Size 31.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1cbe18a12436a3b0881198f8fc030899511819c96b92ea7133d460d04d237521
BLAKE2b-256 checksum
How to use checksums
a9ca1cbdf3540da40f0d2d23120f6dee5fb3648f0822f53e35d6b7eb3c038fd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.15

1 release file

1.14

1 release file

1.13

1 release file

1.12

1 release file

1.11

1 release file

1.10

1 release file

1.9

1 release file

1.8

1 release file

1.7

1 release file

This release

1.6 This release

1 release file

1.5

1 release file

1.4

1 release file

1.3

1 release file

1.2

1 release file

1.1

1 release file

1.0

1 release file

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