Skip to main content

mockbuck

A minimal Python SDK that downloads the MockBuck JAR on first import and exposes its absolute local path. Requires Python 3.11 or newer and has no runtime dependencies.

Install and use

pip install mockbuck
import mockbuck

print(mockbuck.get_jar_path())

Installing the SDK does not download the JAR. Importing mockbuck checks ~/.mockbuck/jars/mockbuck-core.jar and, if missing, creates the directory and downloads from:

https://tmplog1-pub.s3.us-east-1.amazonaws.com/databuck-engine.jar

The JAR is approximately 540 MiB. The first import waits for the download to finish and prints a start message, progress every 50 MiB (including percentage when the server provides the total size), and a completion message. Subsequent imports reuse the cached file silently. A failed download raises a RuntimeError and removes the temporary file. Network operations use a 30-second socket timeout, rather than a 30-second limit on the whole download.

Both functions return a pathlib.Path:

  • mockbuck.get_jar_path() returns the absolute cache path without downloading.
  • mockbuck.ensure_jar() downloads only if the JAR is missing and returns its path.
path = mockbuck.ensure_jar()
assert path.exists()
assert path.name == "mockbuck-core.jar"

The SDK downloads the JAR; it does not execute Java.

Develop and test

From the repository root:

python -m venv .venv

Activate with .\.venv\Scripts\Activate.ps1 on Windows PowerShell, or source .venv/bin/activate on Linux/macOS. Then run:

python -m pip install -e .
python -m unittest discover -s tests -v

Tests use temporary home directories and mocked downloads; they do not download the real JAR.

Build and publish to PyPI

Publish from GitHub Actions

Configure a PyPI Trusted Publisher with project mockbuck, owner FirstEigen-Labs, repository MockBuck, workflow publish.yml, and no environment name. Then open the repository's Actions tab, select Publish to PyPI, click Run workflow, choose branch main, and run it.

The workflow builds the distributions, checks their metadata, tests the installed wheel, and publishes to production PyPI using Trusted Publishing. No PyPI API token or GitHub secret is needed. Publishing runs only when manually triggered on main; pushing a commit does not publish a release. Increment the version in pyproject.toml before publishing a later release.

Build and upload locally

python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
python -m twine upload dist/*

The build creates dist/mockbuck-0.1.0-py3-none-any.whl and dist/mockbuck-0.1.0.tar.gz. Neither contains the JAR. The upload command publishes to production PyPI; authenticate with your PyPI API token (username __token__ if prompted). Keep credentials outside the repository. Increment the version in pyproject.toml and remove old distribution files from dist before a later release.

After uploading, install with pip install mockbuck in a fresh virtual environment and run the usage example above to verify the published release.

License

Copyright 2026 FirstEigen-Labs. The Python SDK is licensed under Apache-2.0; see LICENSE. The separately downloaded JAR retains its own licensing terms.

Metadata

Release files for mockbuck 0.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 mockbuck 0.1.0
File Size Uploaded
mockbuck-0.1.0.tar.gz 9.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mockbuck 0.1.0
File Interpreter ABI Platform
mockbuck-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.5 kB

Release files / mockbuck-0.1.0.tar.gz

Download URL mockbuck-0.1.0.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
086c02a653ca1ae381256348815e67e92ef33089e7240670bff2848af5bba740
BLAKE2b-256 checksum
How to use checksums
c9fb3b1389df6dbe8b6e818e31d09d147ef1b0c84325409fc761f98b40ecd245
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Release files / mockbuck-0.1.0-py3-none-any.whl

Download URL mockbuck-0.1.0-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0cee99cd6d0d412bf7296719996b5d70e2344a7fcbbb7e1d5d967957d8277c7b
BLAKE2b-256 checksum
How to use checksums
282dbf049101d61a23f6fdb530d58f30b5cf3a9a88f2e62db8b7725c9f94ce37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

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