{"id":19874102,"url":"https://github.com/pythoninthegrass/test_containers","last_synced_at":"2025-03-01T01:22:49.617Z","repository":{"id":259351398,"uuid":"877646258","full_name":"pythoninthegrass/test_containers","owner":"pythoninthegrass","description":"Suite of examples on how to use testcontainers with python","archived":false,"fork":false,"pushed_at":"2025-02-07T23:16:12.000Z","size":40,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T21:49:55.690Z","etag":null,"topics":["python","testcontainers"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pythoninthegrass.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-24T02:01:44.000Z","updated_at":"2024-10-24T02:31:15.000Z","dependencies_parsed_at":"2024-10-24T18:59:33.657Z","dependency_job_id":"ded3ba1d-c437-4fb1-8318-2b6023dfa6df","html_url":"https://github.com/pythoninthegrass/test_containers","commit_stats":null,"previous_names":["pythoninthegrass/test_containers"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Ftest_containers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Ftest_containers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Ftest_containers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Ftest_containers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pythoninthegrass","download_url":"https://codeload.github.com/pythoninthegrass/test_containers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241301727,"owners_count":19940696,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","testcontainers"],"created_at":"2024-11-12T16:21:43.990Z","updated_at":"2025-03-01T01:22:49.600Z","avatar_url":"https://github.com/pythoninthegrass.png","language":"Python","readme":"# test_containers\n\nSuite of examples on how to use [testcontainers](https://testcontainers.com/getting-started/) with [Python](https://testcontainers-python.readthedocs.io/en/latest/).\n\n## Minimum Requirements\n\n* macOS 14+\n  * Linux _should_ work 🤞\n* [Python 3.11+](https://www.python.org/downloads/)\n* [Poetry](https://python-poetry.org/docs/)\n* [Docker](https://docs.docker.com/get-docker/)\n\n## Recommended Requirements\n\n* [asdf](https://asdf-vm.com/#/)\n\n## Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/pythoninthegrass/test_containers.git\ncd test_containers\n\n# Create a virtual environment\npython -m venv .venv\n\n# Activate the virtual environment\nsource .venv/bin/activate\n\n# Install dependencies\n## macos\n./bin/build.py      # install freetds and compile flags for `pymssql`\n\n## all\npoetry install\n```\n\n## Quickstart\n\n\u003e [!NOTE]\n\u003e There is a [helper script](bin/download.py) in the `bin` directory to download the AdventureWorks2017.bak file. This file is used to restore the database in the examples.\n\u003e \n\u003e Run via `./bin/download.py \u003cURL\u003e ./examples/db/ms_sql/aw_lt_2017.bak`\n\u003e \n\u003e The URL is found at [AdventureWorks sample databases - SQL Server | Microsoft Learn](https://learn.microsoft.com/en-us/sql/samples/adventureworks-install-configure?view=sql-server-ver15\u0026tabs=ssms#download-backup-files).\n\n```bash\n# ms sql\ncd examples/db/ms_sql/\nλ ./main.py\nusing host tcp://127.0.0.1:57781\nStarting MSSQL container...\n...\nRestoring database...\nVerifying database restore...\n\nRestored tables:\n- ErrorLog\n- BuildVersion\n- Address\n- Customer\n- CustomerAddress\n- Product\n- ProductCategory\n- ProductDescription\n- ProductModel\n- ProductModelProductDescription\n- SalesOrderDetail\n- SalesOrderHeader\n\nDatabase restored successfully!\n\nPress Enter to stop the container...\nStopping container...\n```\n\n## TODO\n\n* Write a test that uses a testcontainer\n* Add taskfile for task runners\n* Add more examples\n  * MongoDB\n  * Postgres\n  * Redis\n  * Kafka\n  * Elasticsearch\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythoninthegrass%2Ftest_containers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpythoninthegrass%2Ftest_containers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythoninthegrass%2Ftest_containers/lists"}