pjdev-gitlab 5.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,129 @@
1
+ Metadata-Version: 2.4
2
+ Name: pjdev-gitlab
3
+ Version: 5.0.0
4
+ Project-URL: Documentation, https://gitlab.purplejay.io/keystone/python/-/tree/main/pjdev-gitlab/README.md
5
+ Project-URL: Issues, https://gitlab.purplejay.io/keystone/python/-/issues
6
+ Project-URL: Source, https://gitlab.purplejay.io/keystone/python
7
+ Author-email: Purple Jay LLC <developers@purplejay.io>
8
+ License-Expression: MIT
9
+ License-File: LICENSE.txt
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Programming Language :: Python
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: Implementation :: CPython
14
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
15
+ Requires-Python: >=3.12
16
+ Requires-Dist: httpx
17
+ Requires-Dist: loguru
18
+ Requires-Dist: pydantic-settings>=2.13.1
19
+ Requires-Dist: pydantic>=2.12.5
20
+ Provides-Extra: dev
21
+ Requires-Dist: ruff; extra == 'dev'
22
+ Provides-Extra: test
23
+ Requires-Dist: coverage; extra == 'test'
24
+ Requires-Dist: pytest; extra == 'test'
25
+ Requires-Dist: pytest-asyncio; extra == 'test'
26
+ Requires-Dist: respx; extra == 'test'
27
+ Description-Content-Type: text/markdown
28
+
29
+ # pjdev-gitlab
30
+
31
+ [![PyPI - Version](https://img.shields.io/pypi/v/pjdev-gitlab.svg)](https://pypi.org/project/pjdev-gitlab)
32
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pjdev-gitlab.svg)](https://pypi.org/project/pjdev-gitlab)
33
+
34
+ Async GitLab automation SDK. Wraps the GitLab REST API v4 directly with `httpx.AsyncClient` and Pydantic models. Covers issues, merge requests, repository files, and the generic package registry.
35
+
36
+ -----
37
+
38
+ ## Installation
39
+
40
+ ```console
41
+ pip install pjdev-gitlab
42
+ ```
43
+
44
+ ## Configuration
45
+
46
+ `pjdev-gitlab` reads `GL_*` environment variables (or accepts the same values
47
+ via `init()`):
48
+
49
+ | variable | required | purpose |
50
+ | --- | --- | --- |
51
+ | `GL_TOKEN` | yes | personal/group/project access token (`api` scope) |
52
+ | `GL_GITLAB_URL` | yes | base URL, e.g. `https://gitlab.com` |
53
+ | `GL_DEFAULT_PROJECT_ID` | no | default project for service helpers |
54
+ | `GL_OUTPUT_PATH` | no | directory for downloaded files |
55
+
56
+ ### Recommended: 1Password + `op run`
57
+
58
+ On a developer laptop, keep the token in 1Password and inject it into the host
59
+ process with [`op run`](https://developer.1password.com/docs/cli/secrets-environment-variables/) —
60
+ the secret never sits in your shell environment or on disk in plaintext.
61
+
62
+ 1. Install the 1Password CLI (`brew install --cask 1password-cli`) and turn on
63
+ **Settings → Developer → Integrate with 1Password CLI** in the desktop app.
64
+ 2. Store the token in 1Password (e.g. an API Credential titled
65
+ `GitLab — purplejay` with a `credential` field).
66
+ 3. Drop a committable `.env.op` next to your project — references only, no
67
+ real secrets:
68
+
69
+ ```bash
70
+ # .env.op
71
+ GL_TOKEN="op://Private/GitLab — purplejay/credential"
72
+ GL_GITLAB_URL="https://gitlab.purplejay.io"
73
+ ```
74
+
75
+ 4. Launch your script — or the entire Claude Code session that will use this
76
+ library — under `op run`:
77
+
78
+ ```bash
79
+ op run --env-file=.env.op -- python my_script.py
80
+ op run --env-file=.env.op -- claude
81
+ ```
82
+
83
+ `op run` resolves the references, exports them to the subprocess, and tears
84
+ them down on exit. Inside Python, just call `config_service.init()` with no
85
+ arguments and the values flow in from the environment.
86
+
87
+ In CI, skip 1Password and set `GL_TOKEN`/`GL_GITLAB_URL` from the job's
88
+ existing variables (e.g. `CI_JOB_TOKEN` for project-scoped operations).
89
+
90
+ ## Usage
91
+
92
+ ```python
93
+ import asyncio
94
+ from pjdev_gitlab import config_service, issues_service
95
+ from pjdev_gitlab.models import StateEvent
96
+
97
+ async def main() -> None:
98
+ # Token & URL come from GL_TOKEN / GL_GITLAB_URL (e.g. via `op run`).
99
+ config_service.init(default_project_id="my-group/my-project")
100
+
101
+ issue = await issues_service.create_issue(
102
+ project_id="my-group/my-project",
103
+ title="Bug: timeout on /widgets",
104
+ description="The endpoint times out under load.\n\n/label ~bug ~priority::high",
105
+ labels=["bug"],
106
+ )
107
+ await issues_service.comment_on_issue(
108
+ project_id="my-group/my-project",
109
+ issue_iid=issue.iid,
110
+ body="Investigating now.",
111
+ )
112
+ await issues_service.set_issue_state(
113
+ project_id="my-group/my-project",
114
+ issue_iid=issue.iid,
115
+ state_event=StateEvent.close,
116
+ )
117
+
118
+ asyncio.run(main())
119
+ ```
120
+
121
+ Run it: `op run --env-file=.env.op -- python my_script.py`.
122
+
123
+ ## Bundled agent skills
124
+
125
+ Skill files for AI agents ship under `.agents/skills/` inside the installed package, following the [library-skills.io](https://library-skills.io/create/) convention. Topics: issues, merge requests, repository files, generic packages.
126
+
127
+ ## License
128
+
129
+ `pjdev-gitlab` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
@@ -0,0 +1,18 @@
1
+ pjdev_gitlab/__about__.py,sha256=rUlD2WaYtPvU-OYwEm6hUlV4qN_4-kAn0l2DZgA2pD8,129
2
+ pjdev_gitlab/__init__.py,sha256=MMhNcAGlucxjMpJk-JjrvFQY5h6i8kHN2REqZxyEw_M,340
3
+ pjdev_gitlab/api_utilities.py,sha256=OvuER708mGBoUmmzDX3Lap8jgKbaHZ-9QmGnKqhZq-w,6666
4
+ pjdev_gitlab/config_service.py,sha256=LUOvKzzIKuJK2ox6pMCcRnlAjIjfZairDp_LB7Az4MQ,1654
5
+ pjdev_gitlab/issues_service.py,sha256=yrhgeqx3rmtCD4JomBJfZ2HBENpYIkCU7nLM_LFid5o,13892
6
+ pjdev_gitlab/merge_requests_service.py,sha256=oGMnyFzs-bi3Hub3HZZ5QCDMIBnya68pvGWlu-8kRAs,7249
7
+ pjdev_gitlab/models.py,sha256=zxupOP15xUv40QGsGyb07IlPf-6KBaMB0D919gY7F_4,4075
8
+ pjdev_gitlab/packages_service.py,sha256=2F5xYMqeLUcn4Pq0-GiMsfCayoVHyayxX5vLXc-92LE,4164
9
+ pjdev_gitlab/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ pjdev_gitlab/repo_files_service.py,sha256=OIYFRT2A-vghbgNgETtBLCvyEH2DMQN2whdn7oDRfyM,4397
11
+ pjdev_gitlab/.agents/skills/pjdev_gitlab_issues/SKILL.md,sha256=Kf_AjD355m0CdsmTrNvr-MIvgWfLtY_eA8NE-R528Vs,5184
12
+ pjdev_gitlab/.agents/skills/pjdev_gitlab_merge_requests/SKILL.md,sha256=KVMj29mHXE9YH-I6pdTy4PwqWsjkJUeiJr6s45yv9pY,3687
13
+ pjdev_gitlab/.agents/skills/pjdev_gitlab_packages/SKILL.md,sha256=yp08b-ADQoeLrvn-F3fPO6rywamsuu6MA0kDet_97jQ,2669
14
+ pjdev_gitlab/.agents/skills/pjdev_gitlab_repo_files/SKILL.md,sha256=wyyQT2zIo347yOG3xLpAMQY66Mg_Vl4SffdIfAihkrE,3054
15
+ pjdev_gitlab-5.0.0.dist-info/METADATA,sha256=W4TFCyrGo2GiyGss7PIppuNGlE2_gVol5DZeQHh6Tcc,4757
16
+ pjdev_gitlab-5.0.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
17
+ pjdev_gitlab-5.0.0.dist-info/licenses/LICENSE.txt,sha256=lsBCQyCWJBNssHxGJFROYAUl6CVjKJ52uHHydxCxr4c,1099
18
+ pjdev_gitlab-5.0.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026-present Chris O'Neill <chris@purplejay.io>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.