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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file testcontainers_yt_local-0.13.0.tar.gz
.
File metadata
- Download URL: testcontainers_yt_local-0.13.0.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21ff50bc1731bc7cb1d2b0f94bedc0124f88ad000c34a02330ea98e556edf9cd |
|
MD5 | 1bfc10ab53e79cad026350e961a83849 |
|
BLAKE2b-256 | cb864c79f1300259e158f07aa447e274dd30425c79f2eba35f52ebcaf73bf369 |
File details
Details for the file testcontainers_yt_local-0.13.0-py3-none-any.whl
.
File metadata
- Download URL: testcontainers_yt_local-0.13.0-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f0bb113f68181cb837760f5ed7b34b9bf62c2b9a388b81ee294eca1559dce61 |
|
MD5 | 1af2e8ee601c18af41c539fd210b7bcf |
|
BLAKE2b-256 | dd7ddc470d211009edf60d02a10ae493a7425cbb51184499c3a06f04acd3701b |