Skip to main content

Testcontainer for Yt

Project description

A way to run https://ytsaurus.tech/docs/en/overview/try-yt#using-docker via testcontainers.

Pypi: https://pypi.org/project/testcontainers-yt-local/

Installation

pip install testcontainers-yt-local

or (to install pytest fixtures also)

pip install "testcontainers-yt-local[pytest]"

Usage

from testcontainers_yt_local.container import YtContainerInstance


with YtContainerInstance() as yt:
    yt_cli = yt.get_client()
    print(yt_cli.list("/"))

or use a fixture (requires testcontainers-yt-local[pytest] installed)

def test_with_fixture(yt_cluster_function):
    # there is a bunch of fixtures available:
    # yt_cluster_session, yt_cluster_function, yt_cluster_module, yt_cluster_class, yt_cluster_package.
    # The only difference is their scope.
    url = f"{yt_cluster_function.proxy_url_http}/ping"
    r = requests.get(url)
    assert r.status_code == 200

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

testcontainers_yt_local-0.14.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

testcontainers_yt_local-0.14.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file testcontainers_yt_local-0.14.0.tar.gz.

File metadata

File hashes

Hashes for testcontainers_yt_local-0.14.0.tar.gz
Algorithm Hash digest
SHA256 2d23e405bf76925fff3034bee120ebfd07ea09c5f068a04c159743fa0fb31bd6
MD5 30897458acfbd13aa5dd0f0c77443547
BLAKE2b-256 4d10d7865d9e2b4a0d8ee544e81a1f56b29d8968b8099cd7fa7c24083b0e30ef

See more details on using hashes here.

File details

Details for the file testcontainers_yt_local-0.14.0-py3-none-any.whl.

File metadata

File hashes

Hashes for testcontainers_yt_local-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ac6850ea5f84ff8d35c64d93c3cdf452e7889975678e683bfb43429fac5ee4d
MD5 be407d88ef30f04fd96935577e6f4686
BLAKE2b-256 8db849618dfa0139c270aae83ba0708984952d324c1d9d74d1e43797bb72ac4f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page