Python Terraform Provider Framework
Project description
🐍🏗️ Pyvider
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 →
Quick Links
- Installation Guide - Get up and running
- Quick Start Tutorial - Build your first provider in 5 minutes
- Architecture Overview - Understand how Pyvider works
- API Reference - Complete API documentation
- Examples - 100+ working examples
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 testswe run test.coverage- Run tests with coveragewe run test.parallel- Run tests in parallelwe run lint- Check code qualitywe run lint.fix- Auto-fix linting issueswe run format- Format codewe 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.
🔗 Links
- Documentation - Complete documentation
- Examples - Working examples
- PyPI - Package repository
- Discussions - Community support
Made with ❤️ by Provide
Copyright (c) provide.io LLC.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 pyvider-0.3.31.tar.gz.
File metadata
- Download URL: pyvider-0.3.31.tar.gz
- Upload date:
- Size: 124.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a649fa6773ea9599e1ce05ed8fa8cf8fb28615b0ba6486199e95245a1a29dfdb
|
|
| MD5 |
d55410cdeaac9bb3987fce77e51a1156
|
|
| BLAKE2b-256 |
e3b64c2f207bcbddf89d164233247fe88ff3e2ee9d0cd47bd6481808f1dcd24b
|
Provenance
The following attestation bundles were made for pyvider-0.3.31.tar.gz:
Publisher:
release.yml on provide-io/pyvider
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyvider-0.3.31.tar.gz -
Subject digest:
a649fa6773ea9599e1ce05ed8fa8cf8fb28615b0ba6486199e95245a1a29dfdb - Sigstore transparency entry: 1207876328
- Sigstore integration time:
-
Permalink:
provide-io/pyvider@d6136165110ab3b8f211a0ebeb523210f1875a7c -
Branch / Tag:
refs/tags/v0.3.31 - Owner: https://github.com/provide-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d6136165110ab3b8f211a0ebeb523210f1875a7c -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyvider-0.3.31-py3-none-any.whl.
File metadata
- Download URL: pyvider-0.3.31-py3-none-any.whl
- Upload date:
- Size: 178.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2ea0e162bd200ba70d05806a52ed0ac4230c2b5f5f791cd6f81b6b05f5ddaa4
|
|
| MD5 |
09f8e3c38a3e109ca0fe84ceb2786e6c
|
|
| BLAKE2b-256 |
eb445420dbfd472f93ebbd91834d61899ad4e945527499d491f73819e401f13a
|
Provenance
The following attestation bundles were made for pyvider-0.3.31-py3-none-any.whl:
Publisher:
release.yml on provide-io/pyvider
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyvider-0.3.31-py3-none-any.whl -
Subject digest:
e2ea0e162bd200ba70d05806a52ed0ac4230c2b5f5f791cd6f81b6b05f5ddaa4 - Sigstore transparency entry: 1207876381
- Sigstore integration time:
-
Permalink:
provide-io/pyvider@d6136165110ab3b8f211a0ebeb523210f1875a7c -
Branch / Tag:
refs/tags/v0.3.31 - Owner: https://github.com/provide-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d6136165110ab3b8f211a0ebeb523210f1875a7c -
Trigger Event:
release
-
Statement type: