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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for testcontainers_yt_local-0.16.0.tar.gz
Algorithm Hash digest
SHA256 7b4faaefb721036c4cf5262c00793d1563c9d93ed1e44a5a14485b124ff152b1
MD5 833da3877a686520470332ba069f7c9c
BLAKE2b-256 96ad2eefad3c28aec623707ad9b22c870fa73090dcce6a1f6b589e6a05ef71e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for testcontainers_yt_local-0.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62d911d76e3f96e66f31d443be19adad62b4a3651e9cb57182cf70404f9ad39d
MD5 bd4965d5950f2988236412d4915b3c54
BLAKE2b-256 9cb691c43f3e9ad1132c2c1bd341c5815ce6ffbae0fcc25ee0974ec41563c9a4

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