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.10.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

testcontainers_yt_local-0.10.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for testcontainers_yt_local-0.10.0.tar.gz
Algorithm Hash digest
SHA256 2c1f8b7463a308449135c831cd119272459d48137e3c1d18a0eecce632e9756d
MD5 85acf8bf3df523fd037d3bccf59e2fab
BLAKE2b-256 b484e14f1a0f9db83136dd264b44577f697b01a53e53787db547b6d65567053a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for testcontainers_yt_local-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38078f5065a69522172d24ea9adcd083641ddc60615621adbc8b8ff1be6bf3dd
MD5 79325c879bf1abcd42a3a07277272d36
BLAKE2b-256 dfa3be6a3ebf80b280c63c0b77769ec9b6b6a203e4769b5645fb81469417a776

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