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.3.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.3-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: krill_core-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 095796e36a25489316e627c89f04755b68541f7b7cd46a5fce62860f32589c5e
MD5 18d86c15abc1b3428768813bc0388fb8
BLAKE2b-256 4db609101a1c456f98249bca538b51e11cffc3fed2272ff9b3f49ccd5a1c47aa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: krill_core-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c023fb9e8369403603512e697f62c81a3822b06bc725158f542f15ccba7fa9b2
MD5 247e4ffe4d18d0172a1e19a51e64d7d9
BLAKE2b-256 c6cbada35cff706728cacc7b6126d44a58c46e1e9c28b147c827ac500fa28eb1

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