Skip to main content

Shared recording contract for the krill toolkit — internal, not for standalone use

Project description

krill-core

The krill's shared skeleton — the contract every other package feeds on.

Shared recording contract for the krill toolkit: HTTP primitives, the recording model, its persistence, and the error base.

Install

An internal shared contract, published only as a dependency of krill-fuzzer and krill-collector — not intended for standalone use; install one of those instead. Requires Python 3.10+ and uv. For workspace development, from the root:

uv sync   # installs all workspace members editable, krill-core included

Usage

Import through a re-exporting package — krill-fuzzer here; krill-collector re-exports the producer-side names.

from pathlib import Path

from krill_fuzzer import load_recording, save_recording

recording = load_recording(Path("requests.json"))  # -> WorkflowRecording
save_recording(recording, Path("copy.json"))

API

Re-exported through krill_collector and krill_fuzzer.

HTTP primitiveskrill_core._http

  • HttpMethod — enum of HTTP verbs.
  • HttpRequest — method, URL, headers, body of one request.
  • HttpResponse — status, headers, body of one response.
  • HttpExchange — one request paired with its response.

Recording modelkrill_core._recording

  • EventType — enum of recorded interaction kinds.
  • RecordedEvent — one recorded user/workflow event.
  • WorkflowRecording — the full recording: exchanges, events, target, timings, optional extract_as map.
  • ExtractAsMap — extraction bindings carried on a recording.

Persistencekrill_core._persistence

  • save_recording(recording: WorkflowRecording, path: Path) -> None — write a recording to JSON.
  • load_recording(path: Path) -> WorkflowRecording — read a recording from JSON.

Errorskrill_core._errors

  • KrillError — base of every error the toolkit raises.
  • PersistenceError — a save/load failure; subclass of KrillError.

Background

Internal foundation package, published only as a shared dependency, not for standalone use — its names are re-exported through krill-collector (the producer) and krill-fuzzer (the consumer), and consumers import them from there. Its purpose is to keep the recording contract in one place so the collector and the fuzzer agree on the same types without the fuzzer inheriting the collector's browser dependency.

Documentation

  • Docs index — persistence design and implementation notes.

Citation

@misc{citation_placeholder,
  title  = {{TODO: paper title — not yet released}},
  author = {{TODO: authors}},
  year   = {{TODO}},
  note   = {Paper not yet released. Citation entry will be updated on publication.}
}

License

GPL-2.0

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

krill_core-0.1.2.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

krill_core-0.1.2-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file krill_core-0.1.2.tar.gz.

File metadata

  • Download URL: krill_core-0.1.2.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for krill_core-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e808e3d32cc248b022ed3b5ac1fb5976c303443c8027094539f2252756559643
MD5 9e83e968276d598acae5f6c7f151a63c
BLAKE2b-256 a21a6773c47f360f4706655f0137c111f7f18a001e4a681310183f51d8b277c7

See more details on using hashes here.

File details

Details for the file krill_core-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: krill_core-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for krill_core-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ea0781b527f77756103616c9fc62a0e227ee9a740ed684d4a848c2fe80940344
MD5 49c16d8906db1da8cd7b7e50e3e2d942
BLAKE2b-256 5946c78a172e05b546ed9543d2dfcc3edd0a4bc5d7eb657a24ba8a7e8d9a5fbe

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