developer-disk-image 0.0.1__tar.gz → 0.0.2__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.
- {developer_disk_image-0.0.1 → developer_disk_image-0.0.2}/PKG-INFO +6 -4
- {developer_disk_image-0.0.1 → developer_disk_image-0.0.2}/README.md +5 -3
- developer_disk_image-0.0.2/developer_disk_image/exceptions.py +6 -0
- {developer_disk_image-0.0.1 → developer_disk_image-0.0.2}/developer_disk_image/repo.py +13 -4
- {developer_disk_image-0.0.1 → developer_disk_image-0.0.2}/developer_disk_image.egg-info/PKG-INFO +6 -4
- {developer_disk_image-0.0.1 → developer_disk_image-0.0.2}/developer_disk_image.egg-info/SOURCES.txt +1 -0
- {developer_disk_image-0.0.1 → developer_disk_image-0.0.2}/pyproject.toml +1 -1
- {developer_disk_image-0.0.1 → developer_disk_image-0.0.2}/tests/test_repo.py +5 -0
- {developer_disk_image-0.0.1 → developer_disk_image-0.0.2}/developer_disk_image/__init__.py +0 -0
- {developer_disk_image-0.0.1 → developer_disk_image-0.0.2}/developer_disk_image.egg-info/dependency_links.txt +0 -0
- {developer_disk_image-0.0.1 → developer_disk_image-0.0.2}/developer_disk_image.egg-info/entry_points.txt +0 -0
- {developer_disk_image-0.0.1 → developer_disk_image-0.0.2}/developer_disk_image.egg-info/requires.txt +0 -0
- {developer_disk_image-0.0.1 → developer_disk_image-0.0.2}/developer_disk_image.egg-info/top_level.txt +0 -0
- {developer_disk_image-0.0.1 → developer_disk_image-0.0.2}/requirements.txt +0 -0
- {developer_disk_image-0.0.1 → developer_disk_image-0.0.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: developer_disk_image
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.2
|
|
4
4
|
Summary: Download DeveloperDiskImage ans Personalized images from GitHub
|
|
5
5
|
Author-email: doronz88 <doron88@gmail.com>
|
|
6
6
|
Maintainer-email: doronz88 <doron88@gmail.com>
|
|
@@ -19,6 +19,8 @@ Requires-Python: >=3.8
|
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
Provides-Extra: test
|
|
21
21
|
|
|
22
|
+
[](https://pypi.org/project/developer_disk_image/ "PyPi package")
|
|
23
|
+
|
|
22
24
|
# Overview
|
|
23
25
|
|
|
24
26
|
Store both types of Apple's DeveloperDiskImage files:
|
|
@@ -30,8 +32,8 @@ Store both types of Apple's DeveloperDiskImage files:
|
|
|
30
32
|
- `BuildManifest.plist`
|
|
31
33
|
- Trustcache
|
|
32
34
|
|
|
33
|
-
The split of the new format is requires for OS* other
|
|
34
|
-
inside: `~/Library/Developer/DeveloperDiskImages`.
|
|
35
|
+
The split of the new format is requires for OS* other than macOS that will have trouble extracting the original APFS
|
|
36
|
+
image inside: `~/Library/Developer/DeveloperDiskImages`.
|
|
35
37
|
|
|
36
38
|
# Python package
|
|
37
39
|
|
|
@@ -39,7 +41,7 @@ Additionally, this repo provides a python API for accessing this repository.
|
|
|
39
41
|
You can install it as follows:
|
|
40
42
|
|
|
41
43
|
```shell
|
|
42
|
-
python3 -m pip install developer_disk_image
|
|
44
|
+
python3 -m pip install -U developer_disk_image
|
|
43
45
|
```
|
|
44
46
|
|
|
45
47
|
## Example usage
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
[](https://pypi.org/project/developer_disk_image/ "PyPi package")
|
|
2
|
+
|
|
1
3
|
# Overview
|
|
2
4
|
|
|
3
5
|
Store both types of Apple's DeveloperDiskImage files:
|
|
@@ -9,8 +11,8 @@ Store both types of Apple's DeveloperDiskImage files:
|
|
|
9
11
|
- `BuildManifest.plist`
|
|
10
12
|
- Trustcache
|
|
11
13
|
|
|
12
|
-
The split of the new format is requires for OS* other
|
|
13
|
-
inside: `~/Library/Developer/DeveloperDiskImages`.
|
|
14
|
+
The split of the new format is requires for OS* other than macOS that will have trouble extracting the original APFS
|
|
15
|
+
image inside: `~/Library/Developer/DeveloperDiskImages`.
|
|
14
16
|
|
|
15
17
|
# Python package
|
|
16
18
|
|
|
@@ -18,7 +20,7 @@ Additionally, this repo provides a python API for accessing this repository.
|
|
|
18
20
|
You can install it as follows:
|
|
19
21
|
|
|
20
22
|
```shell
|
|
21
|
-
python3 -m pip install developer_disk_image
|
|
23
|
+
python3 -m pip install -U developer_disk_image
|
|
22
24
|
```
|
|
23
25
|
|
|
24
26
|
## Example usage
|
|
@@ -5,6 +5,8 @@ from typing import Mapping, Optional
|
|
|
5
5
|
|
|
6
6
|
import requests
|
|
7
7
|
|
|
8
|
+
from developer_disk_image.exceptions import GithubRateLimitExceededError
|
|
9
|
+
|
|
8
10
|
DEVELOPER_DISK_IMAGE_REPO_TREE_URL = \
|
|
9
11
|
'https://api.github.com/repos/doronz88/DeveloperDiskImage/git/trees/main?recursive=true'
|
|
10
12
|
|
|
@@ -23,9 +25,9 @@ class PersonalizedImage:
|
|
|
23
25
|
|
|
24
26
|
|
|
25
27
|
class DeveloperDiskImageRepository:
|
|
26
|
-
@
|
|
27
|
-
def create() -> 'DeveloperDiskImageRepository':
|
|
28
|
-
return
|
|
28
|
+
@classmethod
|
|
29
|
+
def create(cls) -> 'DeveloperDiskImageRepository':
|
|
30
|
+
return cls(cls._query(DEVELOPER_DISK_IMAGE_REPO_TREE_URL)['tree'])
|
|
29
31
|
|
|
30
32
|
def __init__(self, tree: Mapping):
|
|
31
33
|
self._path_urls = {}
|
|
@@ -52,4 +54,11 @@ class DeveloperDiskImageRepository:
|
|
|
52
54
|
url = self._path_urls.get(path, {}).get('url')
|
|
53
55
|
if url is None:
|
|
54
56
|
return None
|
|
55
|
-
return base64.b64decode(
|
|
57
|
+
return base64.b64decode(self._query(url)['content'])
|
|
58
|
+
|
|
59
|
+
@staticmethod
|
|
60
|
+
def _query(url: str) -> Mapping:
|
|
61
|
+
response = json.loads(requests.get(url).text)
|
|
62
|
+
if response.get('message', '').startswith('API rate limit exceeded'):
|
|
63
|
+
raise GithubRateLimitExceededError()
|
|
64
|
+
return response
|
{developer_disk_image-0.0.1 → developer_disk_image-0.0.2}/developer_disk_image.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: developer-disk-image
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.2
|
|
4
4
|
Summary: Download DeveloperDiskImage ans Personalized images from GitHub
|
|
5
5
|
Author-email: doronz88 <doron88@gmail.com>
|
|
6
6
|
Maintainer-email: doronz88 <doron88@gmail.com>
|
|
@@ -19,6 +19,8 @@ Requires-Python: >=3.8
|
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
Provides-Extra: test
|
|
21
21
|
|
|
22
|
+
[](https://pypi.org/project/developer_disk_image/ "PyPi package")
|
|
23
|
+
|
|
22
24
|
# Overview
|
|
23
25
|
|
|
24
26
|
Store both types of Apple's DeveloperDiskImage files:
|
|
@@ -30,8 +32,8 @@ Store both types of Apple's DeveloperDiskImage files:
|
|
|
30
32
|
- `BuildManifest.plist`
|
|
31
33
|
- Trustcache
|
|
32
34
|
|
|
33
|
-
The split of the new format is requires for OS* other
|
|
34
|
-
inside: `~/Library/Developer/DeveloperDiskImages`.
|
|
35
|
+
The split of the new format is requires for OS* other than macOS that will have trouble extracting the original APFS
|
|
36
|
+
image inside: `~/Library/Developer/DeveloperDiskImages`.
|
|
35
37
|
|
|
36
38
|
# Python package
|
|
37
39
|
|
|
@@ -39,7 +41,7 @@ Additionally, this repo provides a python API for accessing this repository.
|
|
|
39
41
|
You can install it as follows:
|
|
40
42
|
|
|
41
43
|
```shell
|
|
42
|
-
python3 -m pip install developer_disk_image
|
|
44
|
+
python3 -m pip install -U developer_disk_image
|
|
43
45
|
```
|
|
44
46
|
|
|
45
47
|
## Example usage
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
|
|
3
|
+
from developer_disk_image.exceptions import GithubRateLimitExceededError
|
|
1
4
|
from developer_disk_image.repo import DeveloperDiskImageRepository
|
|
2
5
|
|
|
3
6
|
|
|
7
|
+
@pytest.mark.xfail(raises=GithubRateLimitExceededError)
|
|
4
8
|
def test_developer_disk_image():
|
|
5
9
|
repo = DeveloperDiskImageRepository.create()
|
|
6
10
|
assert repo.get_developer_disk_image('16.4') is not None
|
|
7
11
|
assert repo.get_developer_disk_image('16.4aaaa') is None
|
|
8
12
|
|
|
9
13
|
|
|
14
|
+
@pytest.mark.xfail(raises=GithubRateLimitExceededError)
|
|
10
15
|
def test_personalized_disk_image():
|
|
11
16
|
repo = DeveloperDiskImageRepository.create()
|
|
12
17
|
assert repo.get_personalized_disk_image() is not None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{developer_disk_image-0.0.1 → developer_disk_image-0.0.2}/developer_disk_image.egg-info/requires.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|