Python client and SDK for Falco.
Project description
client-py
Python client and SDK for Falco
Usage
Output subscribe
import falco
client = falco.Client(endpoint="localhost:5060", client_crt="/tmp/client.crt", client_key="/tmp/client.key", ca_root="/tmp/ca.crt")
for event in client.sub()):
print(event)
or try it directly (make sure you have the client certificates in /tmp
or use the unix socket address), for example:
python -m examples.tls_sub_events -o json
python -m examples.unixsocket_get_events -o json
python -m examples.unixsocket_get_version
Output format
Currently there are two output formats available: JSON and Python classes.
To change output format, pass the output_format
parameter to the Client object.
Development
Dependencies
To install development dependencies, run pip install -r requirements-dev.txt
.
Update protos
Perform the following edits to the Makefile:
- Update the PROTOS array with the destination path of the .proto file.
- Update the PROTO_URLS array with the URL from which to download it.
- Update thr PROTO_SHAS array with the SHA256 sum of the file to download.
- Execute the following commands:
make clean
make protos
Tests
To run the tests, run make test
.
Misc
To format the code, run make lint
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
falco-0.4.0.tar.gz
(16.1 kB
view hashes)
Built Distribution
falco-0.4.0-py3-none-any.whl
(21.1 kB
view hashes)