Registry / devops / actions-python-core

actions-python-core

JSON →
library0.1.3pypypi✓ verified 49d ago

A core library for building GitHub Actions in Python, providing utilities for interacting with the Actions runtime (inputs, outputs, commands, path manipulation). Current version 0.1.3, pre-1.0 with frequent breaking changes.

devops
pip install actions-python-core
Install & Compatibility
Where this runs
tested against v0.1.3 · 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.368s · 22.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.2s · import 0.332s · 23MB
20MB installed
● package 20MB
Code
Verified usage

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

core
from actions import core
import core
'core' is a module under 'actions' package, not top-level.
get_input
from actions.core import get_input
from core import get_input
Direct import of 'core' module without 'actions' package fails.

Minimal GitHub Action that reads input and sets output.

from actions import core try: name = core.get_input('who-to-greet') print(f'Hello {name}') core.set_output('time', '2023-01-01') except Exception as e: core.set_failed(f'Action failed: {e}')
Debug
Known issues
breakingTop-level import path changed from 'core' to 'actions.core' in v0.1.0.
fix
Use 'from actions import core' or 'from actions.core import ...'.
affects: <0.1.0
deprecatedcore.get_input() returns empty string for missing inputs (previously raised error). Rely on required=True for validation.
fix
Use core.get_input('name', required=True) to enforce presence.
affects: >=0.1.0
gotchaset_output and set_failed must be called inside try block or will not propagate error correctly.
fix
Wrap action logic in try/except and call core.set_failed in except.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'core'
Importing 'core' directly instead of 'actions.core'.
fix
Use 'from actions import core' or 'from actions.core import ...'.
AttributeError: module 'actions' has no attribute 'core'
Missing 'actions-python-core' installation or wrong import path.
fix
Run 'pip install actions-python-core' and import as 'from actions import core'.
TypeError: get_input() missing 1 required positional argument: 'name'
Calling get_input() without any arguments.
fix
Provide input name: core.get_input('input-name')
Upgrade
Version history
0.1.3latest on PyPI
Audit
Dependencies

No dependency data recorded yet.

Agent activity
98 hits · last 30 days
node
12
petalbot
4
claudebot
4
ahrefsbot
2
Amazon
1
amazonbot
1
Resources