Skip to main content

🐍🏗️ Pyvider

License Python 3.11+ uv Ruff CI

Pyvider is a Python framework for building Terraform providers. Write infrastructure providers using Python's elegance, type safety, and rich ecosystem while maintaining full compatibility with Terraform Plugin Protocol v6.

✨ Key Features

  • 🐍 Pure Python - Write providers using familiar Python patterns and libraries
  • 🎯 Type-Safe - Leverage type hints and attrs for robust code
  • 🚀 Decorator-Based - Simple registration system handles protocol complexity
  • 📦 Protocol v6 - Full Terraform Plugin Protocol v6 implementation
  • ⚡ Async - Built on modern async/await for high performance
  • 🧪 Testable - Comprehensive testing with pytest integration

Quick Start

from pyvider.providers import register_provider, BaseProvider
from pyvider.resources import register_resource, BaseResource
from pyvider.schema import s_resource, a_str
import attrs

@register_provider("mycloud")
class MyCloudProvider(BaseProvider):
    """Your cloud provider"""
    pass

@register_resource("server")
class Server(BaseResource):
    """Manages a server"""

    @classmethod
    def get_schema(cls):
        return s_resource({
            "name": a_str(required=True),
            "id": a_str(computed=True),
        })

    async def _create_apply(self, ctx):
        # Create your resource
        return State(id="srv-123", name=ctx.config.name), None

    async def read(self, ctx):
        # Read current state
        return ctx.state

See the full example in the Quick Start Guide →

Documentation

📖 Read the Full Documentation →

Development

Quick Start

# Set up environment
uv sync

# Run common tasks
we run test       # Run tests
we run lint       # Check code
we run format     # Format code
we tasks          # See all available commands

Available Commands

This project uses wrknv for task automation. Run we tasks to see all available commands.

Common tasks:

  • we run test - Run all tests
  • we run test.coverage - Run tests with coverage
  • we run test.parallel - Run tests in parallel
  • we run lint - Check code quality
  • we run lint.fix - Auto-fix linting issues
  • we run format - Format code
  • we typecheck - Run type checker

See CLAUDE.md for detailed development instructions and architecture information.

🤝 Contributing

Contributions welcome! See Contributing Guidelines and the Development section above for setup instructions.

📄 License

Apache 2.0 - See LICENSE for details.

📦 Installation

# Using uv (recommended)
uv add pyvider

🚦 Project Status

Version: 0.0.x (Alpha) Protocol: Terraform Plugin Protocol v6 Python: 3.11+

⚠️ Pre-release - APIs may change before 1.0 release. Best suited for internal tooling, experimentation, and learning.


Copyright (c) provide.io LLC.

Release files for pyvider 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyvider 0.8.1
File Size Uploaded
pyvider-0.8.1.tar.gz 234.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyvider 0.8.1
File Interpreter ABI Platform
pyvider-0.8.1-py3-none-any.whl Python 3 none any Details

Total release size: 540.8 kB

Release files / pyvider-0.8.1.tar.gz

Download URL pyvider-0.8.1.tar.gz
Size 234.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cf0b77e2671ededbd1a6e77c210e2efcf9a20a9ce0e0278b3fcb7d7b2b8cce95
BLAKE2b-256 checksum
How to use checksums
c27649ba076d3ca89b96fee02efdc99475f66ba0c6224e5fddc33a67f5db1aa3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.

Transparency log

Release files / pyvider-0.8.1-py3-none-any.whl

Download URL pyvider-0.8.1-py3-none-any.whl
Size 306.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
940d081d7301590952990d8ca6f1f6a89648d6743c1984bbfdb275f7912d3f83
BLAKE2b-256 checksum
How to use checksums
ec896e775ef99207c68e2e1d80c43be35363e6ccd367428c8c141a7c77326ad9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page