napt 0.3.1__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.
napt/__init__.py ADDED
@@ -0,0 +1,91 @@
1
+ # Copyright 2025 Roger Cibrian
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """NAPT - Not a Pkg Tool
16
+
17
+ A Python-based CLI tool for automating Windows application packaging and
18
+ deployment to Microsoft Intune using PSAppDeployToolkit (PSADT).
19
+
20
+ NAPT provides:
21
+
22
+ - YAML-based recipe configuration
23
+ - Automatic version discovery from multiple sources
24
+ - Robust download with conditional requests and integrity verification
25
+ - Automatic update policies (version-based, hash-based, or combined)
26
+ - PSADT package generation with Template_v4
27
+ - .intunewin package creation for Intune deployment
28
+ - Direct upload to Microsoft Intune (planned)
29
+ - Deployment wave/ring management (planned)
30
+
31
+ Quick Start:
32
+ Validate recipe syntax:
33
+
34
+ $ napt validate recipes/Google/chrome.yaml
35
+
36
+ Discover latest version and download installer:
37
+
38
+ $ napt discover recipes/Google/chrome.yaml
39
+
40
+ For full CLI documentation:
41
+
42
+ $ napt --help
43
+
44
+ For more details, see the individual module docstrings.
45
+ """
46
+
47
+ __version__ = "0.3.1"
48
+ __author__ = "Roger Cibrian"
49
+ __license__ = "Apache-2.0"
50
+ __description__ = "Not a Pkg Tool - Windows/Intune packaging with PSADT"
51
+
52
+ # Re-export commonly used functions for convenience
53
+ from napt.config import load_effective_config
54
+ from napt.core import discover_recipe
55
+ from napt.exceptions import (
56
+ ConfigError,
57
+ NAPTError,
58
+ NetworkError,
59
+ PackagingError,
60
+ )
61
+ from napt.io import download_file
62
+ from napt.results import (
63
+ BuildResult,
64
+ DiscoverResult,
65
+ PackageResult,
66
+ ValidationResult,
67
+ )
68
+ from napt.validation import validate_recipe
69
+ from napt.versioning import DiscoveredVersion, compare_any, is_newer_any
70
+
71
+ __all__ = [
72
+ "__version__",
73
+ "__author__",
74
+ "__license__",
75
+ "BuildResult",
76
+ "DiscoverResult",
77
+ "PackageResult",
78
+ "ValidationResult",
79
+ "__description__",
80
+ "discover_recipe",
81
+ "validate_recipe",
82
+ "load_effective_config",
83
+ "download_file",
84
+ "compare_any",
85
+ "is_newer_any",
86
+ "DiscoveredVersion",
87
+ "NAPTError",
88
+ "ConfigError",
89
+ "NetworkError",
90
+ "PackagingError",
91
+ ]
napt/build/__init__.py ADDED
@@ -0,0 +1,47 @@
1
+ # Copyright 2025 Roger Cibrian
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """
16
+ PSADT package building for NAPT.
17
+
18
+ This module handles building PSAppDeployToolkit packages from recipes and
19
+ downloaded installers. It orchestrates PSADT release management, script
20
+ generation, file copying, and branding application.
21
+
22
+ Example:
23
+ from pathlib import Path
24
+ from napt.build import build_package, create_intunewin
25
+
26
+ # Build PSADT package
27
+ build_result = build_package(
28
+ recipe_path=Path("recipes/Google/chrome.yaml"),
29
+ downloads_dir=Path("downloads"),
30
+ verbose=True
31
+ )
32
+
33
+ print(f"Built: {build_result.build_dir}")
34
+
35
+ # Create .intunewin
36
+ package_result = create_intunewin(
37
+ build_dir=build_result.build_dir,
38
+ verbose=True
39
+ )
40
+
41
+ print(f"Package: {package_result.package_path}")
42
+ """
43
+
44
+ from .manager import build_package
45
+ from .packager import create_intunewin
46
+
47
+ __all__ = ["build_package", "create_intunewin"]