Skip to main content

**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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

podsmith-0.2-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file podsmith-0.2-py3-none-any.whl.

File metadata

  • Download URL: podsmith-0.2-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for podsmith-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 33738abf4c3ab68128435d7cc57a3e779f8d94f7a303345c9172f1a1390a0cdd
MD5 339b8a3bc05de9fac266f31001096bfd
BLAKE2b-256 434f5cfb44e5fb473125d5fb2b06c54ae27937412509f1d9d7b26b58c4cc7c6b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page