Skip to main content

Memory, SQLite, MySQL, and Redis checkpoint repositories for JHarness

Project description

jharness-repository

Official in-memory, SQLite, MySQL, and Redis implementations of the JHarness RunRepository protocol.

# Memory and SQLite only
uv add jharness-repository

# Add exactly the remote drivers the application uses
uv add "jharness-repository[mysql]"
uv add "jharness-repository[redis]"
uv add "jharness-repository[mysql,redis]"
from jharness.repository import MemoryRunRepository

MySQL TLS is explicit and remains lazy with the optional driver:

from jharness.repository import MySQLRunRepository, MySQLTLS

repository = MySQLRunRepository(
    host="mysql.internal",
    user="jharness",
    password=mysql_password,
    database="jharness",
    tls=MySQLTLS(ca="/etc/jharness/mysql-ca.pem"),
)

MySQLTLS always enables certificate verification and verifies the server identity by default. Mutual TLS additionally accepts paired cert and key paths plus an optional key_password. Omitting tls leaves TLS policy to the endpoint and PyMySQL defaults.

Standalone Redis and Redis Cluster use the same optional redis extra. Select the cluster-aware client explicitly:

from jharness.repository import RedisRunRepository

repository = RedisRunRepository(
    "redis://redis-cluster.internal:6379",
    cluster=True,
    key_prefix="production-agent",
)

In cluster mode, redis-py's RedisCluster client owns topology discovery and redirect routing. Each run's three keys share one hash tag and therefore one slot; different runs use different tags and can be distributed across slots. The default cluster=False continues to use the standalone client.

The base installation has no database-driver dependency. MemoryRunRepository needs no service, and SQLite uses Python's embedded sqlite3 module. MySQL and Redis load their selected client only when that backend is initialized; there is no fallback or compatibility driver. Their services remain supplied by the application, while the JHarness development suite exercises them in disposable Docker containers.

All adapters consume kernel DurableCommit deltas. Memory shares immutable values; SQLite, MySQL, and Redis store new history chunks under a v2 physical namespace and do not read or migrate obsolete v1 data. Complete recovery remains available through await repository.get_head(run_id).

The source, contracts, and release process are maintained in the JHarness repository.

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

jharness_repository-0.3.0.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

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

jharness_repository-0.3.0-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

Details for the file jharness_repository-0.3.0.tar.gz.

File metadata

  • Download URL: jharness_repository-0.3.0.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for jharness_repository-0.3.0.tar.gz
Algorithm Hash digest
SHA256 770578ec11211d3e64714450cacf38445fc2bf8989b42801f1c3d411b5a8df38
MD5 331424da3fb46a0faf3acf12374e210c
BLAKE2b-256 7a9399702c5b51656ed9300fee58b24b0a4e6e0794c38cdbe2e40762a8c12359

See more details on using hashes here.

Provenance

The following attestation bundles were made for jharness_repository-0.3.0.tar.gz:

Publisher: release.yml on Ezio2000/jharness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jharness_repository-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for jharness_repository-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35f3eafe6d577bf266edede1199403775de447bc263007ac298e5ac2a971bfc2
MD5 820c9e99a9c864f185904c4b9c648753
BLAKE2b-256 d1ff868105687f4d6e18b49508c63f7da95c8b3895077abd242238a11cf6624e

See more details on using hashes here.

Provenance

The following attestation bundles were made for jharness_repository-0.3.0-py3-none-any.whl:

Publisher: release.yml on Ezio2000/jharness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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