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

Uploaded Python 3

File details

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

File metadata

  • Download URL: jharness_repository-0.3.1.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.1.tar.gz
Algorithm Hash digest
SHA256 f355dd910e32a415d58f61daf0251ab6a1e438d2b81e88ae880bd7f996ed20e0
MD5 3e3a359627c7b93dd3c6b3dea55651b7
BLAKE2b-256 22bb3e91360cca3db4937e80f09090429a2265dfd469eb0095fc24ae3595c2fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for jharness_repository-0.3.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for jharness_repository-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a7e2714112a30f146b27af683ca1687d5f779b87a7e92f366cf5d219c2bc8400
MD5 e0af3d6f4b2b81ac19d7bf464802c8b4
BLAKE2b-256 03cf305451e7ee566e82f5cc2f966122bd765193b775c0f39059c9ab270823c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for jharness_repository-0.3.1-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