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 YtLocalContainer
with YtLocalContainer() 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.9.0.tar.gz
.
File metadata
- Download URL: testcontainers_yt_local-0.9.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d103fc874a750b86d86ad23dc2ddbbd68d1cfc427d67fdcf8d8ba44e46cf777 |
|
MD5 | bd0f8343df2f519b2a652cd6ae99337e |
|
BLAKE2b-256 | 9175125e302cc2f4c62edccafbacd78916aada45813163bf41198a9d27a3e5d1 |
File details
Details for the file testcontainers_yt_local-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: testcontainers_yt_local-0.9.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bb7b6cb7cad049b830737ebecee7b68ac0e494c0c926444822faf001f532de0 |
|
MD5 | 05602ed0ad29210885204c1b56f4fdb7 |
|
BLAKE2b-256 | 1617bd6e50c250d546e55e7ce5b73b68f788ba042240ca3966123b0f2d48ef60 |