Registry / devops / cdktf-cdktf-provider-github

cdktf-cdktf-provider-github

JSON →
library15.3.1pypypi✓ verified 83d ago

Prebuilt Terraform CDK (CDKTF) provider for managing GitHub resources (repositories, teams, webhooks, etc.) programmatically with TypeScript/Python/Java/C#. Version 15.3.1 targets CDKTF 0.20+ and the GitHub Terraform provider ~> 6.0. Follows CDKTF's major version cadence.

pip install cdktf-cdktf-provider-github
INSTALL
IMPORT
SIG · CDKTF-CDKTF-PROVID
C
cdktf-cdktf-provider-github
devopspythonv15.3.1
Install
3.9s avg
Import
Disk
42MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v15.3.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 40.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.9s · import 0.000s · 41MB
42MB installed
● package 42MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GithubProvider
from cdktf_cdktf_provider_github.provider import GithubProvider
from cdktf_cdktf_provider_github import GithubProvider
Common mistake: provider class not at package root
Repository
from cdktf_cdktf_provider_github.repository import Repository
from cdktf_cdktf_provider_github import Repository
Resources are in submodules, not package root
Team
from cdktf_cdktf_provider_github.team import Team
from cdktf_cdktf_provider_github import Team
Same pattern for all resources

Minimal stack to create a public GitHub repository

from constructs import Construct from cdktf import App, TerraformStack from cdktf_cdktf_provider_github.provider import GithubProvider from cdktf_cdktf_provider_github.repository import Repository import os class MyStack(TerraformStack): def __init__(self, scope: Construct, id: str): super().__init__(scope, id) GithubProvider(self, 'github', token = os.environ.get('GITHUB_TOKEN', '') ) Repository(self, 'repo', name = 'my-repo', description = 'Created by CDKTF', visibility = 'public' ) app = App() MyStack(app, 'github-stack') app.synth()
Debug
Known issues
breakingVersion 15.x requires cdktf >=0.20. Using with cdktf 0.19.x will cause import errors.
fix
Upgrade cdktf: pip install 'cdktf>=0.20'
affects: >=15.0.0, <16.0.0
deprecatedThe old `cdktf_cdktf_provider_github.github` module (flat namespace) is deprecated; resources are now in submodules like `repository`, `team`, etc.
fix
Use submodule imports (e.g., `from cdktf_cdktf_provider_github.repository import Repository`)
affects: >=10.0.0
gotchaProvider token must be set via environment variable or explicitly. If not set, resource actions fail with 401.
fix
Export GITHUB_TOKEN or pass token= parameter to GithubProvider
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'cdktf_cdktf_provider_github.github'
Trying to import from flat namespace after refactor to submodules.
fix
Use `from cdktf_cdktf_provider_github.repository import Repository` instead of `from cdktf_cdktf_provider_github import Repository`.
jsii.errors.JSIIError: ...
Version mismatch between cdktf and provider package.
fix
Ensure cdktf and cdktf-cdktf-provider-github are compatible. Check release notes for compatibility matrix.
Upgrade
Version history
15.3.1latest on PyPI · released Dec 10, 2025
Audit
Dependencies
cdktfrequiredRequired runtime dependency
constructsrequiredRequired for CDK constructs
jsiirequiredRequired for cross-language bindings
Agent activity
45 hits · last 30 days
node
36
OpenAI (training)
1
Resources