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
```shell
pip install testcontainers-yt-local
```
or (to install pytest fixtures also)
```shell
pip install "testcontainers-yt-local[pytest]"
```
## Usage
```python
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)
```python
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
```
Raw data
{
"_id": null,
"home_page": null,
"name": "testcontainers-yt-local",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "testing, docker, test automation, yt, ytsaurus, pytest",
"author": "Dmitriy Fedorov",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/f0/23/a7073fbcb51dd5602296ea331b9cf4032e5dd90aa3dd90be811688292564/testcontainers_yt_local-0.15.0.tar.gz",
"platform": null,
"description": "A way to run https://ytsaurus.tech/docs/en/overview/try-yt#using-docker via testcontainers.\n\nPypi: https://pypi.org/project/testcontainers-yt-local/\n\n## Installation\n\n```shell\npip install testcontainers-yt-local\n```\n\nor (to install pytest fixtures also)\n\n```shell\npip install \"testcontainers-yt-local[pytest]\"\n```\n\n## Usage\n```python\nfrom testcontainers_yt_local.container import YtContainerInstance\n\n\nwith YtContainerInstance() as yt:\n yt_cli = yt.get_client()\n print(yt_cli.list(\"/\"))\n```\n\nor use a fixture (requires `testcontainers-yt-local[pytest]` installed)\n```python\ndef test_with_fixture(yt_cluster_function):\n # there is a bunch of fixtures available:\n # yt_cluster_session, yt_cluster_function, yt_cluster_module, yt_cluster_class, yt_cluster_package.\n # The only difference is their scope.\n url = f\"{yt_cluster_function.proxy_url_http}/ping\"\n r = requests.get(url)\n assert r.status_code == 200\n```\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "Testcontainer for Yt",
"version": "0.15.0",
"project_urls": {
"Changelog": "https://github.com/dmi-feo/testcontainers-yt-local/blob/main/CHANGELOG.md",
"Homepage": "https://github.com/dmi-feo/testcontainers-yt-local",
"Issues": "https://github.com/dmi-feo/testcontainers-yt-local/issues",
"Repository": "https://github.com/dmi-feo/testcontainers-yt-local.git"
},
"split_keywords": [
"testing",
" docker",
" test automation",
" yt",
" ytsaurus",
" pytest"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "39139de2c1f1577eb86f47ebf8f3b5da9ac1a073bf0bba5e63d0e40f036f03b3",
"md5": "9098731389a1ac927b1195f9d02753f9",
"sha256": "3c90a20fbed818ea87f7f2f65f6ac469b0529df3158c579fc0a5e65f2bd526e3"
},
"downloads": -1,
"filename": "testcontainers_yt_local-0.15.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9098731389a1ac927b1195f9d02753f9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 10982,
"upload_time": "2024-08-26T11:15:21",
"upload_time_iso_8601": "2024-08-26T11:15:21.617079Z",
"url": "https://files.pythonhosted.org/packages/39/13/9de2c1f1577eb86f47ebf8f3b5da9ac1a073bf0bba5e63d0e40f036f03b3/testcontainers_yt_local-0.15.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f023a7073fbcb51dd5602296ea331b9cf4032e5dd90aa3dd90be811688292564",
"md5": "68fe1e25fb9301b2310dea5c4531fd8e",
"sha256": "86e092e98214c4ff164893e1ecae600cab065d39dc946d3052fc293cf22bce02"
},
"downloads": -1,
"filename": "testcontainers_yt_local-0.15.0.tar.gz",
"has_sig": false,
"md5_digest": "68fe1e25fb9301b2310dea5c4531fd8e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 9045,
"upload_time": "2024-08-26T11:15:22",
"upload_time_iso_8601": "2024-08-26T11:15:22.527753Z",
"url": "https://files.pythonhosted.org/packages/f0/23/a7073fbcb51dd5602296ea331b9cf4032e5dd90aa3dd90be811688292564/testcontainers_yt_local-0.15.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-26 11:15:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dmi-feo",
"github_project": "testcontainers-yt-local",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "testcontainers-yt-local"
}