Python Terraform Provider Framework
Project description
🐍 Pyvider: Build Terraform Providers in Pure Python
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
📦 Installation
# Using pip
pip install pyvider
# Using uv (recommended)
uv add pyvider
🚀 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
🚦 Project Status
Version: 0.0.x (Alpha) Protocol: Terraform Plugin Protocol v6 Python: 3.11+
⚠️ Alpha Software - APIs may change before 1.0 release. Best suited for internal tooling, experimentation, and learning. See the Roadmap for details.
🤝 Contributing
Contributions welcome! See Contributing Guidelines.
# Development setup
uv sync
uv run pytest
uv run ruff check
📄 License
Apache 2.0 - See LICENSE for details.
🔗 Links
- Documentation - Complete documentation
- Examples - Working examples
- PyPI - Package repository
- Discussions - Community support
Made with ❤️ by Provide
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.0.1102.tar.gz.
File metadata
- Download URL: pyvider-0.0.1102.tar.gz
- Upload date:
- Size: 114.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93354c6939b15ee9d2a80faa06fd460ccc4ce67120723d9092d45c8c3096e6a1
|
|
| MD5 |
6a682cbba4c269764efafdb045ca916e
|
|
| BLAKE2b-256 |
cea9c685a9267a76d3d9fec6610a9722e3f40f65d6c66cec11f8644c35d1f5cf
|
File details
Details for the file pyvider-0.0.1102-py3-none-any.whl.
File metadata
- Download URL: pyvider-0.0.1102-py3-none-any.whl
- Upload date:
- Size: 173.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9ac4c43e323ffd9631b3653e1bd2fbccf848740fca6d214a2cfe5f504e1d721
|
|
| MD5 |
9b12c1090c7aff28a73d225b52f15d01
|
|
| BLAKE2b-256 |
4edb08f845c7f2d80054f69c16beccbdc3cae1e15391184039a2a21fca7688b3
|