netherframe.discovery.gitlabhq.gitlab 0.3.0__tar.gz

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,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,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,75 @@
1
+ # GitLab Discovery for Netherframe
2
+
3
+ This package provides resource discovery capabilities for GitLab infrastructure using the GitLab Terraform provider (`gitlabhq/gitlab`).
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install netherframe.discovery.gitlabhq.gitlab
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```python
14
+ from nf.core import App, Stack
15
+ from nf.discovery.gitlabhq.gitlab import GitLabDiscoverer
16
+
17
+ app = App()
18
+ stack = Stack(app, "gitlab-imported")
19
+
20
+ # Configure the discoverer
21
+ config = {
22
+ "token": "your-gitlab-token", # Or use GITLAB_TOKEN env var
23
+ "base_url": "https://gitlab.com/api/v4", # Optional, defaults to gitlab.com
24
+ }
25
+
26
+ # Discover and import resources
27
+ discoverer = GitLabDiscoverer()
28
+ resources, import_blocks = discoverer.discover_and_fold(
29
+ stack=stack,
30
+ config=config,
31
+ filters={
32
+ "project_ids": [123, 456], # Optional: specific projects
33
+ "group_ids": [789], # Optional: specific groups
34
+ "owned": True, # Optional: only owned resources
35
+ },
36
+ )
37
+
38
+ # Synthesize
39
+ app.synth()
40
+ ```
41
+
42
+ ## Supported Resources
43
+
44
+ The discoverer supports all major GitLab resources including:
45
+
46
+ - Projects
47
+ - Groups
48
+ - Users
49
+ - Deploy Keys
50
+ - Project Variables
51
+ - Group Variables
52
+ - Branches
53
+ - Tags
54
+ - Merge Requests
55
+ - Issues
56
+ - Runners
57
+ - And many more...
58
+
59
+ ## Configuration
60
+
61
+ The discoverer requires GitLab API credentials:
62
+
63
+ - `token`: GitLab personal access token (can also use `GITLAB_TOKEN` env var)
64
+ - `base_url`: GitLab API base URL (defaults to `https://gitlab.com/api/v4`)
65
+ - `per_page`: Number of items per page for API requests (defaults to 100)
66
+
67
+ ## Filters
68
+
69
+ You can filter discovered resources using:
70
+
71
+ - `project_ids`: List of specific project IDs to discover
72
+ - `group_ids`: List of specific group IDs to discover
73
+ - `owned`: Only discover resources owned by the authenticated user
74
+ - `membership`: Only discover resources where user is a member
75
+ - `min_access_level`: Minimum access level for discovered resources
@@ -0,0 +1,9 @@
1
+ """GitLab discoverer for GitLabHQ GitLab provider.
2
+
3
+ This package provides resource discovery capabilities for GitLab infrastructure
4
+ using the GitLabHQ GitLab provider.
5
+ """
6
+
7
+ from .discoverer import GitLabDiscoverer
8
+
9
+ __all__ = ["GitLabDiscoverer"]