Pulpcore
raw JSON → 3.109.2 verified Mon Apr 27 auth: no python
Pulp 3 is a platform for managing software packages and content repositories. pulpcore is the core Django application providing REST API, task scheduling, and plugin API. Current version 3.109.2, requires Python >=3.11, released monthly with LTS branches.
pip install pulpcore Common errors
error ModuleNotFoundError: No module named 'pulpcore.app.apps' ↓
cause Incorrect import path for PulpPluginAppConfig in newer versions.
fix
Use 'from pulpcore.plugin import PulpPluginAppConfig'
error OperationalError: no such table: core_task ↓
cause Missing migrations or wrong database applied.
fix
Run 'pulpcore-manager migrate' to apply all migrations.
error Invalid syntax: 'match' statement ↓
cause Using Python version earlier than 3.10 (pulpcore 3.109+ uses match statements).
fix
Upgrade Python to >=3.11 as required by pulpcore >=3.109.
Warnings
breaking Pulp 3.0 introduced a completely new API and plugin architecture, incompatible with Pulp 2. ↓
fix Upgrade to pulpcore >= 3.0 and use the new plugin system: from pulpcore.plugin import PulpPluginAppConfig.
deprecated Celery-based task queue is deprecated; use pulpcore-worker (Redis-based) instead. ↓
fix Set WORKER_TYPE='redis' in settings, and run 'pulpcore-worker' instead of 'celery worker'.
gotcha The cleanup_old_versions task can be extremely slow on large databases; in 3.108+ it has been optimized but still may time out. ↓
fix Adjust TASK_PREFER_DEFER or increase timeout settings. For large DBs, consider manual cleanup.
Imports
- pulpcore.app.apps.PulpPluginAppConfig wrong
from pulpcore.app import PulpPluginAppConfigcorrectfrom pulpcore.plugin import PulpPluginAppConfig - Task wrong
from pulpcore.models import Taskcorrectfrom pulpcore.app.models import Task
Quickstart
from pulpcore.app.apps import PulpPluginAppConfig
class MyPluginAppConfig(PulpPluginAppConfig):
name = 'myplugin'
label = 'myplugin'
default = True
# Or for basic API access:
import requests
url = os.environ.get('PULP_BASE_URL', 'https://pulp.example.com')
response = requests.get(f'{url}/pulp/api/v3/status/')
print(response.json())