Skip to content

Commit 072204c

Browse files
committed
Add pulp3 client [RHELDST-38334]
Added 'raw' clienit for pulp3 API for basic operations required for: * repository creation, content search (limited), creation of publication and distribution and some other functions like polling tasks. * written as async using anyio with trio backend, using httpx requests and tenacity for retries * it is expected that this code will undergo further optimization and refactoring with higher level of abstraction Assisted-by: Claude Code
1 parent c4c1b02 commit 072204c

19 files changed

Lines changed: 1438 additions & 0 deletions

docs/api/client_pulp3.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
API: client for Pulp 3
2+
======================
3+
4+
.. autoclass:: pubtools.pulplib.Pulp3Client
5+
:members:
6+
7+
Errors
8+
------
9+
10+
.. autoclass:: pubtools.pulplib.Pulp3Exception
11+
:members:
12+
13+
.. autoclass:: pubtools.pulplib.Pulp3TaskException
14+
:members:
15+

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ A Pulp library for publishing tools.
88
:caption: Contents:
99

1010
api/client
11+
api/client_pulp3
1112
api/pulpcore
1213
api/yum
1314
api/files

requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ frozendict; python_version >= '3.6'
88
pubtools>=0.3.0
99
monotonic; python_version < '3.3'
1010
defusedxml
11+
httpx
12+
tenacity
13+
anyio[trio]

src/pubtools/pulplib/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from ._impl.client import Client, PulpException, TaskFailedException, CopyOptions
2+
from ._impl.client_pulp3 import Pulp3Client
23
from ._impl.criteria import Criteria, Matcher
34
from ._impl.page import Page
45
from ._impl.model import (
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from .client import Pulp3Client
2+
from .errors import Pulp3Exception, Pulp3TaskException

0 commit comments

Comments
 (0)