Skip to main content

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:

  1. Update the PROTOS array with the destination path of the .proto file.
  2. Update the PROTO_URLS array with the URL from which to download it.
  3. Update thr PROTO_SHAS array with the SHA256 sum of the file to download.
  4. 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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

falco-0.4.0-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file falco-0.4.0.tar.gz.

File metadata

  • Download URL: falco-0.4.0.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for falco-0.4.0.tar.gz
Algorithm Hash digest
SHA256 40d654ae4b1cd1319b767280d35c9794edf911fe0f91e221eeb4eda30805441c
MD5 d3ee7021c0a690e95b0089dd8e065b1d
BLAKE2b-256 7cc1606a9b257aa6c1509775d4b28c71cb8e9ad3fc819f2c3b20f289b07959b0

See more details on using hashes here.

File details

Details for the file falco-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: falco-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for falco-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71d313b214b1f9330d17277a463fbbcb3c18b5f7e552ea5eebfb0d9d3bbf01d6
MD5 96f438ca003825eb7c908dd801862a51
BLAKE2b-256 601edd14dfe261eae542721234dc7333628669cbc1da718226cd6b70095db100

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page