netherframe.discovery.gitlabhq.gitlab 0.3.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.
- netherframe/discovery/gitlabhq/gitlab/__init__.py +9 -0
- netherframe/discovery/gitlabhq/gitlab/discoverer.py +2301 -0
- netherframe/discovery/gitlabhq/gitlab/py.typed +0 -0
- netherframe_discovery_gitlabhq_gitlab-0.3.0.dist-info/METADATA +94 -0
- netherframe_discovery_gitlabhq_gitlab-0.3.0.dist-info/RECORD +11 -0
- netherframe_discovery_gitlabhq_gitlab-0.3.0.dist-info/WHEEL +4 -0
- netherframe_discovery_gitlabhq_gitlab-0.3.0.dist-info/entry_points.txt +3 -0
- netherframe_discovery_gitlabhq_gitlab-0.3.0.dist-info/licenses/LICENSE +21 -0
- nf/discovery/gitlabhq/gitlab/__init__.py +21 -0
- nf/discovery/gitlabhq/gitlab/discoverer.py +21 -0
- nf/discovery/gitlabhq/gitlab/py.typed +0 -0
|
File without changes
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: netherframe.discovery.gitlabhq.gitlab
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: GitLab resource discovery for Netherframe
|
|
5
|
+
Author: Sourabh Cheedella
|
|
6
|
+
Author-email: Sourabh Cheedella <cheedella.sourabh@gmail.com>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
13
|
+
Requires-Dist: netherframe-core>=0.12.0,<1.0.0
|
|
14
|
+
Requires-Dist: python-gitlab>=8.6.0
|
|
15
|
+
Requires-Python: >=3.14
|
|
16
|
+
Project-URL: Homepage, https://netherframe.arsenal.sh
|
|
17
|
+
Project-URL: Repository, https://github.com/arsenal-sh/netherframe
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# GitLab Discovery for Netherframe
|
|
21
|
+
|
|
22
|
+
This package provides resource discovery capabilities for GitLab infrastructure using the GitLab Terraform provider (`gitlabhq/gitlab`).
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install netherframe.discovery.gitlabhq.gitlab
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
from nf.core import App, Stack
|
|
34
|
+
from nf.discovery.gitlabhq.gitlab import GitLabDiscoverer
|
|
35
|
+
|
|
36
|
+
app = App()
|
|
37
|
+
stack = Stack(app, "gitlab-imported")
|
|
38
|
+
|
|
39
|
+
# Configure the discoverer
|
|
40
|
+
config = {
|
|
41
|
+
"token": "your-gitlab-token", # Or use GITLAB_TOKEN env var
|
|
42
|
+
"base_url": "https://gitlab.com/api/v4", # Optional, defaults to gitlab.com
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
# Discover and import resources
|
|
46
|
+
discoverer = GitLabDiscoverer()
|
|
47
|
+
resources, import_blocks = discoverer.discover_and_fold(
|
|
48
|
+
stack=stack,
|
|
49
|
+
config=config,
|
|
50
|
+
filters={
|
|
51
|
+
"project_ids": [123, 456], # Optional: specific projects
|
|
52
|
+
"group_ids": [789], # Optional: specific groups
|
|
53
|
+
"owned": True, # Optional: only owned resources
|
|
54
|
+
},
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
# Synthesize
|
|
58
|
+
app.synth()
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Supported Resources
|
|
62
|
+
|
|
63
|
+
The discoverer supports all major GitLab resources including:
|
|
64
|
+
|
|
65
|
+
- Projects
|
|
66
|
+
- Groups
|
|
67
|
+
- Users
|
|
68
|
+
- Deploy Keys
|
|
69
|
+
- Project Variables
|
|
70
|
+
- Group Variables
|
|
71
|
+
- Branches
|
|
72
|
+
- Tags
|
|
73
|
+
- Merge Requests
|
|
74
|
+
- Issues
|
|
75
|
+
- Runners
|
|
76
|
+
- And many more...
|
|
77
|
+
|
|
78
|
+
## Configuration
|
|
79
|
+
|
|
80
|
+
The discoverer requires GitLab API credentials:
|
|
81
|
+
|
|
82
|
+
- `token`: GitLab personal access token (can also use `GITLAB_TOKEN` env var)
|
|
83
|
+
- `base_url`: GitLab API base URL (defaults to `https://gitlab.com/api/v4`)
|
|
84
|
+
- `per_page`: Number of items per page for API requests (defaults to 100)
|
|
85
|
+
|
|
86
|
+
## Filters
|
|
87
|
+
|
|
88
|
+
You can filter discovered resources using:
|
|
89
|
+
|
|
90
|
+
- `project_ids`: List of specific project IDs to discover
|
|
91
|
+
- `group_ids`: List of specific group IDs to discover
|
|
92
|
+
- `owned`: Only discover resources owned by the authenticated user
|
|
93
|
+
- `membership`: Only discover resources where user is a member
|
|
94
|
+
- `min_access_level`: Minimum access level for discovered resources
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
netherframe/discovery/gitlabhq/gitlab/__init__.py,sha256=m3zi-aqQ2j09WPv1M1YekpHNMwP3TCK1uEpRurVjlG0,246
|
|
2
|
+
netherframe/discovery/gitlabhq/gitlab/discoverer.py,sha256=6OpNUcnkYnoHGhFUTo1swwUcuOMyW0Ag1QwFgnGt2nA,90020
|
|
3
|
+
netherframe/discovery/gitlabhq/gitlab/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
nf/discovery/gitlabhq/gitlab/__init__.py,sha256=hE82xDWTj03meov5VDUgesJuNYj4x1zZnwGcPRF55mQ,944
|
|
5
|
+
nf/discovery/gitlabhq/gitlab/discoverer.py,sha256=Re2z6cpFTqwfCaTzELrms7SQ8qw2ciatjdWFdayFb2w,988
|
|
6
|
+
nf/discovery/gitlabhq/gitlab/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
+
netherframe_discovery_gitlabhq_gitlab-0.3.0.dist-info/licenses/LICENSE,sha256=CmCIBOHbWRqBeux1f3l5G7rXwtrrtVCZwymYiSoAYoE,1068
|
|
8
|
+
netherframe_discovery_gitlabhq_gitlab-0.3.0.dist-info/WHEEL,sha256=G_-rrEibZr7OEM7zdH1dSO6s-VdjfnS5PA4CLAdI9Vw,80
|
|
9
|
+
netherframe_discovery_gitlabhq_gitlab-0.3.0.dist-info/entry_points.txt,sha256=XL6FVw6lXlFoUczJIl6InzJ-ZCL9ihvdjcd2PpnE53w,82
|
|
10
|
+
netherframe_discovery_gitlabhq_gitlab-0.3.0.dist-info/METADATA,sha256=ZjxKkQPkN0xJQw2YzpiCTA7XhBovaIgmlLDHVsLUaRY,2619
|
|
11
|
+
netherframe_discovery_gitlabhq_gitlab-0.3.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Netherframe
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Generated nf.* alias shim (netherframe.generation.nf_alias_shims); do not edit.
|
|
2
|
+
"""Type-checker view of ``nf.discovery.gitlabhq.gitlab``; at runtime it is ``netherframe.discovery.gitlabhq.gitlab`` itself."""
|
|
3
|
+
|
|
4
|
+
from typing import TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from netherframe.discovery.gitlabhq.gitlab import * # noqa: F403
|
|
8
|
+
else:
|
|
9
|
+
# Runs only without the import hook (python -S, zipimport, some bundlers): install it, so
|
|
10
|
+
# nf.* imports from now on, this module's submodules included, return the netherframe.*
|
|
11
|
+
# modules, and return the netherframe.* module for this import too.
|
|
12
|
+
import importlib as _importlib
|
|
13
|
+
import sys as _sys
|
|
14
|
+
|
|
15
|
+
try:
|
|
16
|
+
import netherframe_nf_alias as _nf_alias
|
|
17
|
+
except ImportError: # netherframe.core, which ships the hook, is not installed
|
|
18
|
+
pass
|
|
19
|
+
else:
|
|
20
|
+
_nf_alias.install()
|
|
21
|
+
_sys.modules[__name__] = _importlib.import_module("netherframe.discovery.gitlabhq.gitlab")
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Generated nf.* alias shim (netherframe.generation.nf_alias_shims); do not edit.
|
|
2
|
+
"""Type-checker view of ``nf.discovery.gitlabhq.gitlab.discoverer``; at runtime it is ``netherframe.discovery.gitlabhq.gitlab.discoverer`` itself."""
|
|
3
|
+
|
|
4
|
+
from typing import TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from netherframe.discovery.gitlabhq.gitlab.discoverer import * # noqa: F403
|
|
8
|
+
else:
|
|
9
|
+
# Runs only without the import hook (python -S, zipimport, some bundlers): install it, so
|
|
10
|
+
# nf.* imports from now on, this module's submodules included, return the netherframe.*
|
|
11
|
+
# modules, and return the netherframe.* module for this import too.
|
|
12
|
+
import importlib as _importlib
|
|
13
|
+
import sys as _sys
|
|
14
|
+
|
|
15
|
+
try:
|
|
16
|
+
import netherframe_nf_alias as _nf_alias
|
|
17
|
+
except ImportError: # netherframe.core, which ships the hook, is not installed
|
|
18
|
+
pass
|
|
19
|
+
else:
|
|
20
|
+
_nf_alias.install()
|
|
21
|
+
_sys.modules[__name__] = _importlib.import_module("netherframe.discovery.gitlabhq.gitlab.discoverer")
|
|
File without changes
|