IDKit 1.0.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,135 @@
1
+ Metadata-Version: 2.4
2
+ Name: IDKit
3
+ Version: 1.0.0
4
+ Summary: A typed, dot-notation identifier system for Python 3.12+.
5
+ Author: Ryan Kohl
6
+ License-Expression: MIT
7
+ Keywords: identifier,typing,enum,dsl
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Classifier: Typing :: Typed
13
+ Requires-Python: >=3.12
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Dynamic: license-file
17
+
18
+ # IDKit
19
+
20
+ A small typed identifier system for Python 3.12+.
21
+
22
+ It lets you build structured identifiers using dot notation:
23
+
24
+ ```python
25
+ from idkit import ID
26
+
27
+ identifier = ID.system.runtime.agent.analyzer
28
+
29
+ print(identifier)
30
+ # system::runtime-agent+analyzer
31
+
32
+ print(identifier.namespace)
33
+ # system::runtime-agent
34
+
35
+ print(identifier.path)
36
+ # system/runtime/agent/analyzer
37
+
38
+ print(identifier.slug)
39
+ # system-runtime-agent-analyzer
40
+ ```
41
+
42
+ ## Format
43
+
44
+ ```text
45
+ Group::Source[-Component][+Role]
46
+ ```
47
+
48
+ Examples:
49
+
50
+ ```text
51
+ system::runtime
52
+ system::runtime-agent
53
+ system::runtime-agent+analyzer
54
+ service::data-resource+ingester
55
+ manage::workflow-pipeline+runner
56
+ ```
57
+
58
+ ## Type aliases
59
+
60
+ ```python
61
+ from idkit import IDKitIdentifier, IDKitIdentifierLike, IDKitIdentifiable
62
+ ```
63
+
64
+ Use `IDKitIdentifier` when you want the concrete implementation.
65
+
66
+ Use `IDKitIdentifierLike` when your function only needs the public identifier interface.
67
+
68
+ Use `IDKitIdentifiable` when your object exposes an `.identifier` property.
69
+
70
+ Compatibility aliases are also exported:
71
+
72
+ ```python
73
+ from idkit import AppIdentifier, AppIdentifierLike, AppIdentifiable
74
+ ```
75
+
76
+ ```python
77
+ def register(identifier: IDKitIdentifierLike) -> None:
78
+ identifier.require_complete()
79
+ print(identifier.value)
80
+ ```
81
+
82
+ ## Installation
83
+
84
+ ```bash
85
+ pip install idkit
86
+ ```
87
+
88
+ ## Parsing
89
+
90
+ ```python
91
+ parsed = ID.parse("system::runtime-agent+analyzer")
92
+
93
+ assert parsed == ID.system.runtime.agent.analyzer
94
+ ```
95
+
96
+ ## Matching
97
+
98
+ ```python
99
+ identifier = ID.system.runtime.agent.analyzer
100
+
101
+ identifier.matches(ID.system)
102
+ # True
103
+
104
+ identifier.matches(ID.system.runtime)
105
+ # True
106
+
107
+ identifier.matches(ID.system.runtime.agent)
108
+ # True
109
+
110
+ identifier.matches(ID.service)
111
+ # False
112
+ ```
113
+
114
+ ## Parent traversal
115
+
116
+ ```python
117
+ identifier = ID.system.runtime.agent.analyzer
118
+
119
+ identifier.parent
120
+ # Identifier('system::runtime-agent')
121
+
122
+ identifier.parent.parent
123
+ # Identifier('system::runtime')
124
+
125
+ identifier.parent.parent.parent
126
+ # Identifier('system')
127
+ ```
128
+
129
+ ## Development
130
+
131
+ Run tests:
132
+
133
+ ```bash
134
+ python3 -m pytest
135
+ ```
@@ -0,0 +1,20 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ IDKit.egg-info/PKG-INFO
5
+ IDKit.egg-info/SOURCES.txt
6
+ IDKit.egg-info/dependency_links.txt
7
+ IDKit.egg-info/top_level.txt
8
+ idkit/__init__.py
9
+ idkit/exceptions.py
10
+ idkit/identifier.py
11
+ idkit/idkit.py
12
+ idkit/protocols.py
13
+ idkit/py.typed
14
+ idkit/root.py
15
+ idkit/enums/__init__.py
16
+ idkit/enums/group.py
17
+ idkit/enums/operation.py
18
+ idkit/enums/role.py
19
+ idkit/enums/source.py
20
+ tests/test_identifier.py
@@ -0,0 +1 @@
1
+ idkit
idkit-1.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ryan Kohl
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.
idkit-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,135 @@
1
+ Metadata-Version: 2.4
2
+ Name: IDKit
3
+ Version: 1.0.0
4
+ Summary: A typed, dot-notation identifier system for Python 3.12+.
5
+ Author: Ryan Kohl
6
+ License-Expression: MIT
7
+ Keywords: identifier,typing,enum,dsl
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Classifier: Typing :: Typed
13
+ Requires-Python: >=3.12
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Dynamic: license-file
17
+
18
+ # IDKit
19
+
20
+ A small typed identifier system for Python 3.12+.
21
+
22
+ It lets you build structured identifiers using dot notation:
23
+
24
+ ```python
25
+ from idkit import ID
26
+
27
+ identifier = ID.system.runtime.agent.analyzer
28
+
29
+ print(identifier)
30
+ # system::runtime-agent+analyzer
31
+
32
+ print(identifier.namespace)
33
+ # system::runtime-agent
34
+
35
+ print(identifier.path)
36
+ # system/runtime/agent/analyzer
37
+
38
+ print(identifier.slug)
39
+ # system-runtime-agent-analyzer
40
+ ```
41
+
42
+ ## Format
43
+
44
+ ```text
45
+ Group::Source[-Component][+Role]
46
+ ```
47
+
48
+ Examples:
49
+
50
+ ```text
51
+ system::runtime
52
+ system::runtime-agent
53
+ system::runtime-agent+analyzer
54
+ service::data-resource+ingester
55
+ manage::workflow-pipeline+runner
56
+ ```
57
+
58
+ ## Type aliases
59
+
60
+ ```python
61
+ from idkit import IDKitIdentifier, IDKitIdentifierLike, IDKitIdentifiable
62
+ ```
63
+
64
+ Use `IDKitIdentifier` when you want the concrete implementation.
65
+
66
+ Use `IDKitIdentifierLike` when your function only needs the public identifier interface.
67
+
68
+ Use `IDKitIdentifiable` when your object exposes an `.identifier` property.
69
+
70
+ Compatibility aliases are also exported:
71
+
72
+ ```python
73
+ from idkit import AppIdentifier, AppIdentifierLike, AppIdentifiable
74
+ ```
75
+
76
+ ```python
77
+ def register(identifier: IDKitIdentifierLike) -> None:
78
+ identifier.require_complete()
79
+ print(identifier.value)
80
+ ```
81
+
82
+ ## Installation
83
+
84
+ ```bash
85
+ pip install idkit
86
+ ```
87
+
88
+ ## Parsing
89
+
90
+ ```python
91
+ parsed = ID.parse("system::runtime-agent+analyzer")
92
+
93
+ assert parsed == ID.system.runtime.agent.analyzer
94
+ ```
95
+
96
+ ## Matching
97
+
98
+ ```python
99
+ identifier = ID.system.runtime.agent.analyzer
100
+
101
+ identifier.matches(ID.system)
102
+ # True
103
+
104
+ identifier.matches(ID.system.runtime)
105
+ # True
106
+
107
+ identifier.matches(ID.system.runtime.agent)
108
+ # True
109
+
110
+ identifier.matches(ID.service)
111
+ # False
112
+ ```
113
+
114
+ ## Parent traversal
115
+
116
+ ```python
117
+ identifier = ID.system.runtime.agent.analyzer
118
+
119
+ identifier.parent
120
+ # Identifier('system::runtime-agent')
121
+
122
+ identifier.parent.parent
123
+ # Identifier('system::runtime')
124
+
125
+ identifier.parent.parent.parent
126
+ # Identifier('system')
127
+ ```
128
+
129
+ ## Development
130
+
131
+ Run tests:
132
+
133
+ ```bash
134
+ python3 -m pytest
135
+ ```
idkit-1.0.0/README.md ADDED
@@ -0,0 +1,118 @@
1
+ # IDKit
2
+
3
+ A small typed identifier system for Python 3.12+.
4
+
5
+ It lets you build structured identifiers using dot notation:
6
+
7
+ ```python
8
+ from idkit import ID
9
+
10
+ identifier = ID.system.runtime.agent.analyzer
11
+
12
+ print(identifier)
13
+ # system::runtime-agent+analyzer
14
+
15
+ print(identifier.namespace)
16
+ # system::runtime-agent
17
+
18
+ print(identifier.path)
19
+ # system/runtime/agent/analyzer
20
+
21
+ print(identifier.slug)
22
+ # system-runtime-agent-analyzer
23
+ ```
24
+
25
+ ## Format
26
+
27
+ ```text
28
+ Group::Source[-Component][+Role]
29
+ ```
30
+
31
+ Examples:
32
+
33
+ ```text
34
+ system::runtime
35
+ system::runtime-agent
36
+ system::runtime-agent+analyzer
37
+ service::data-resource+ingester
38
+ manage::workflow-pipeline+runner
39
+ ```
40
+
41
+ ## Type aliases
42
+
43
+ ```python
44
+ from idkit import IDKitIdentifier, IDKitIdentifierLike, IDKitIdentifiable
45
+ ```
46
+
47
+ Use `IDKitIdentifier` when you want the concrete implementation.
48
+
49
+ Use `IDKitIdentifierLike` when your function only needs the public identifier interface.
50
+
51
+ Use `IDKitIdentifiable` when your object exposes an `.identifier` property.
52
+
53
+ Compatibility aliases are also exported:
54
+
55
+ ```python
56
+ from idkit import AppIdentifier, AppIdentifierLike, AppIdentifiable
57
+ ```
58
+
59
+ ```python
60
+ def register(identifier: IDKitIdentifierLike) -> None:
61
+ identifier.require_complete()
62
+ print(identifier.value)
63
+ ```
64
+
65
+ ## Installation
66
+
67
+ ```bash
68
+ pip install idkit
69
+ ```
70
+
71
+ ## Parsing
72
+
73
+ ```python
74
+ parsed = ID.parse("system::runtime-agent+analyzer")
75
+
76
+ assert parsed == ID.system.runtime.agent.analyzer
77
+ ```
78
+
79
+ ## Matching
80
+
81
+ ```python
82
+ identifier = ID.system.runtime.agent.analyzer
83
+
84
+ identifier.matches(ID.system)
85
+ # True
86
+
87
+ identifier.matches(ID.system.runtime)
88
+ # True
89
+
90
+ identifier.matches(ID.system.runtime.agent)
91
+ # True
92
+
93
+ identifier.matches(ID.service)
94
+ # False
95
+ ```
96
+
97
+ ## Parent traversal
98
+
99
+ ```python
100
+ identifier = ID.system.runtime.agent.analyzer
101
+
102
+ identifier.parent
103
+ # Identifier('system::runtime-agent')
104
+
105
+ identifier.parent.parent
106
+ # Identifier('system::runtime')
107
+
108
+ identifier.parent.parent.parent
109
+ # Identifier('system')
110
+ ```
111
+
112
+ ## Development
113
+
114
+ Run tests:
115
+
116
+ ```bash
117
+ python3 -m pytest
118
+ ```
@@ -0,0 +1,51 @@
1
+ from .exceptions import (
2
+ IdentifierError,
3
+ IdentifierParseError,
4
+ IdentifierValidationError,
5
+ )
6
+
7
+ from .idkit import (
8
+ ID,
9
+ AppIdentifiable,
10
+ AppIdentifier,
11
+ AppIdentifierLike,
12
+ AppIdentifierRoot,
13
+ IDKitIdentifiable,
14
+ IDKitIdentifier,
15
+ IDKitIdentifierLike,
16
+ IDKitIdentifierRoot,
17
+ IDKitOperationIdentifier,
18
+ IdentifierGroup,
19
+ IdentifierSource,
20
+ IdentifierRole,
21
+ IdentifierOperation,
22
+ )
23
+ from .identifier import Identifier
24
+ from .protocols import SupportsIdentifier, Identifiable
25
+ from .root import IdentifierRoot, IDRoot
26
+
27
+
28
+ __all__ = [
29
+ "ID",
30
+ "AppIdentifier",
31
+ "AppIdentifierRoot",
32
+ "AppIdentifierLike",
33
+ "AppIdentifiable",
34
+ "IdentifierGroup",
35
+ "IdentifierSource",
36
+ "IdentifierRole",
37
+ "IdentifierOperation",
38
+ "Identifier",
39
+ "IdentifierRoot",
40
+ "IDRoot",
41
+ "IDKitIdentifier",
42
+ "IDKitOperationIdentifier",
43
+ "IDKitIdentifierRoot",
44
+ "IDKitIdentifierLike",
45
+ "IDKitIdentifiable",
46
+ "SupportsIdentifier",
47
+ "Identifiable",
48
+ "IdentifierError",
49
+ "IdentifierParseError",
50
+ "IdentifierValidationError",
51
+ ]
@@ -0,0 +1,12 @@
1
+ from .group import IdentifierGroup
2
+ from .source import IdentifierSource
3
+ from .role import IdentifierRole
4
+ from .operation import IdentifierOperation
5
+
6
+
7
+ __all__ = [
8
+ "IdentifierGroup",
9
+ "IdentifierSource",
10
+ "IdentifierRole",
11
+ "IdentifierOperation",
12
+ ]
@@ -0,0 +1,158 @@
1
+ from enum import StrEnum, auto
2
+
3
+
4
+ class IdentifierGroup(StrEnum):
5
+ """
6
+ The `Group` defines the primary classification or architectural domain of the `identifier` in the first segment. It represents the highest level of organization (e.g., `system`, `service`, `manage`).
7
+
8
+ Default namespace values used as the first segment of an identifier.
9
+
10
+ Group — Where does it belong?
11
+ Source — What is it?
12
+ Component — Which part of it?
13
+ Action — What does it do?
14
+ """
15
+
16
+ system = auto()
17
+ service = auto()
18
+ core = auto()
19
+ utility = auto()
20
+ library = auto()
21
+ package = auto()
22
+ module = auto()
23
+ framework = auto()
24
+ application = auto()
25
+ platform = auto()
26
+ runtime = auto()
27
+ database = auto()
28
+ storage = auto()
29
+ cache = auto()
30
+ network = auto()
31
+ transport = auto()
32
+ filesystem = auto()
33
+ cloud = auto()
34
+ cluster = auto()
35
+ node = auto()
36
+ host = auto()
37
+ container = auto()
38
+ source = auto()
39
+ stream = auto()
40
+ pipeline = auto()
41
+ warehouse = auto()
42
+ analytics = auto()
43
+ reporting = auto()
44
+ api = auto()
45
+ web = auto()
46
+ cli = auto()
47
+ shell = auto()
48
+ desktop = auto()
49
+ mobile = auto()
50
+ ui = auto()
51
+ domain = auto()
52
+ business = auto()
53
+ user = auto()
54
+ account = auto()
55
+ tenant = auto()
56
+ organization = auto()
57
+ project = auto()
58
+ workspace = auto()
59
+ workflow = auto()
60
+ scheduler = auto()
61
+ worker = auto()
62
+ job = auto()
63
+ queue = auto()
64
+ event = auto()
65
+ message = auto()
66
+ bot = auto()
67
+ agent = auto()
68
+ ai = auto()
69
+ testing = auto()
70
+ development = auto()
71
+ staging = auto()
72
+ production = auto()
73
+ build = auto()
74
+ deploy = auto()
75
+ migration = auto()
76
+ script = auto()
77
+
78
+
79
+ class Architecture(StrEnum):
80
+ system = auto()
81
+ service = auto()
82
+ core = auto()
83
+ utility = auto()
84
+ library = auto()
85
+ package = auto()
86
+ module = auto()
87
+ framework = auto()
88
+ application = auto()
89
+ platform = auto()
90
+ runtime = auto()
91
+
92
+
93
+ class Infrastructure(StrEnum):
94
+ database = auto()
95
+ storage = auto()
96
+ cache = auto()
97
+ network = auto()
98
+ transport = auto()
99
+ filesystem = auto()
100
+ cloud = auto()
101
+ cluster = auto()
102
+ node = auto()
103
+ host = auto()
104
+ container = auto()
105
+
106
+
107
+ class Data(StrEnum):
108
+ source = auto()
109
+ stream = auto()
110
+ pipeline = auto()
111
+ warehouse = auto()
112
+ analytics = auto()
113
+ reporting = auto()
114
+
115
+
116
+ class Interface(StrEnum):
117
+ api = auto()
118
+ web = auto()
119
+ cli = auto()
120
+ shell = auto()
121
+ desktop = auto()
122
+ mobile = auto()
123
+ ui = auto()
124
+
125
+
126
+ class Business(StrEnum):
127
+ domain = auto()
128
+ business = auto()
129
+ user = auto()
130
+ account = auto()
131
+ tenant = auto()
132
+ organization = auto()
133
+ project = auto()
134
+ workspace = auto()
135
+
136
+
137
+ class Automation(StrEnum):
138
+ workflow = auto()
139
+ scheduler = auto()
140
+ worker = auto()
141
+ job = auto()
142
+ queue = auto()
143
+ event = auto()
144
+ message = auto()
145
+ bot = auto()
146
+ agent = auto()
147
+ ai = auto()
148
+
149
+
150
+ class Development(StrEnum):
151
+ testing = auto()
152
+ development = auto()
153
+ staging = auto()
154
+ production = auto()
155
+ build = auto()
156
+ deploy = auto()
157
+ migration = auto()
158
+ script = auto()