**Podsmith** is a Python toolkit for managing Kubernetes-based test dependencies, enabling dynamic or pre-provisioned environments for integration testing.
Project description
Podsmith
Podsmith is a Python toolkit for managing Kubernetes-based test dependencies, enabling dynamic or pre-provisioned environments for integration testing.
Inspired by Testcontainers, Podsmith lets you define service dependencies as code and run your tests locally or remotely, with full control over whether resources are deployed on-the-fly or expected to be pre-provisioned.
✨ (Planned) Features
- 🛠 Deploy Kubernetes resources from Python definitions
- 🔍 Optionally reuse existing resources
- ⏳ Built-in support for readiness checks (e.g., pod status, HTTP, service endpoints)
- 📦 Snapshot current test environment for reusable kubernetes manifests
- 🧪 Integrates with
pytest - 🚀 Works with local clusters (e.g.,
k3s,kind) or remote CI (e.g., Testkube)
🔧 Installation
pip install podsmith
🚀 Quickstart
WIP -- AI generated example, not accurate.
from podsmith import KubeResource
with KubeResource("redis", manifest="manifests/redis.yaml", mode="deploy") as redis:
redis.wait_until_ready()
url = redis.service_url(port=6379)
# Use redis service in your test
Set the mode via environment variable:
export PODSMITH_MODE=deploy # or "reuse"
📸 Snapshot Test Manifests
WIP -- AI generated example, not accurate.
Generate a manifest snapshot of your test environment:
podsmith snapshot --namespace test-env --output ./snapshots/
Apply in CI:
kubectl apply -f ./snapshots/
📚 Documentation
📝 License
MIT License
🤝 Contributing
Contributions, ideas, and bug reports are welcome! Please open an issue or PR on GitHub.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file podsmith-0.3-py3-none-any.whl.
File metadata
- Download URL: podsmith-0.3-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6136944a32212364edc1f87f472f8fd160d51eb6c4053e275237af97d944065e
|
|
| MD5 |
2ccaa98b1293feecb9738760979b56dc
|
|
| BLAKE2b-256 |
af2e912bf53fda102f1b69f7986366d7869b055e5e6a6c608cf9b3ccf9f0287e
|