Skip to main content

mark-python-client

pipeline status coverage report PyPI version security: bandit

A Python client for the MARK framework:

https://cylab.be/research/mark

Installation

$ pip install mark-python-client

Usage

To use the mark_python_client.py script just add it to your python code and you can invoke the different methods defined in the script

from mark_client import mark_python_client as mark_client

#initialize the MARK Client
client = mark_client.MarkClient()

#set the url of the MARK server
client.set_server_url("http://server.ip.address:ip.port")

#add evidence to the database via the MARK server
client.add_evidence(evidence_to_be_added)

#fetch the ranked list of the k-most suspicious entries
ranked_list = client.get_evidence()

#fetch evidences with a specific label and subject
evidences = client.find_evidence(label, subject)

Contributing

Installation

$ git clone https://gitlab.cylab.be/cylab/mark-python-client.git
$ cd mark-python-client
$ pip install -r requirements.txt

Project overview

  1. mark_client - source folder of the project

    1.1. mark_python_client.py : main code

    1.2. conftest.py : empty script used by pytest unit test library to point the global PATH variable to the modules and scripts used in the unit tests

  2. tests - test folder of the project

    2.1. mark_python_client_test.py : integration test (requires a fully installed mark server)

Testing

Currently the only implemented test is a complete integration test, which requires a fully running mark server. The recommended way to test the project is thus using gitlab-runner.

  1. Install Docker https://docs.docker.com/install/linux/docker-ce/ubuntu/

  2. Install gitlab-runner https://docs.gitlab.com/runner/

  3. Run the tests

$ gitlab-runner exec docker test:integration

Release files for mark-python-client 2.1.0

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

Source distribution (sdist)

Source distribution for mark-python-client 2.1.0
File Size Uploaded
mark-python-client-2.1.0.tar.gz 11.1 kB Details

Release files / mark-python-client-2.1.0.tar.gz

Download URL mark-python-client-2.1.0.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
eb639d782d63d0b3c54012f981d5f75f856d0ab23355dbd41e770e98fb2f3a32
BLAKE2b-256 checksum
How to use checksums
7a4f36fc540a3f3dfef01d62d110f06c64b821b82bec5768cad543560c87e1cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.8

Release history Release notifications | RSS feed

This release

2.1.0 This release

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.0.9

1 release file

1.0.8

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.2

1 release file

1.0.0

2 release files

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