uflash3 3.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.
uflash3-3.0.0/AUTHORS ADDED
@@ -0,0 +1,6 @@
1
+ Blackteahamburger (blackteahamburger@outlook.com)
2
+ Nicholas H.Tollervey (ntoll@ntoll.org)
3
+ Matt Wheeler (m@funkyhat.org)
4
+ Tom Viner (uflash@viner.tv)
5
+ Tom Gurion (nagasaki45@gmail.com)
6
+ Scott Webster (ScottDWebsterNJ@gmail.com)
@@ -0,0 +1,177 @@
1
+ Release History
2
+ ===============
3
+
4
+ 3.0.0
5
+ -----
6
+
7
+ * The `flash` function is rewritten, see the docstring for more information.
8
+ * Updated to the latest version of MicroPython for micro:bit (1.1.1, 2.1.2).
9
+ * --runtime is reintroduced to specify a custom MicroPython runtime.
10
+ * The script is always minified by nudatus before flashing (original --minify).
11
+ * The `uextract` command is introduced to extract Python scripts
12
+ from a hex file.
13
+ * The module is changed to be a package.
14
+ * ... And many more,
15
+ see function docstrings and command line help for more details.
16
+
17
+ 2.0.0
18
+ -----
19
+
20
+ * Update Universal Hex with MicroPython v2.0.0 (for micro:bit V2).
21
+
22
+ 1.2.4
23
+ -----
24
+
25
+ * Updated to the latest version of MicroPython for micro:bit (1.0.1).
26
+ * This is the version of uflash to be used in Mu 1.0.2.
27
+
28
+ 1.2.3
29
+ -----
30
+
31
+ * Update to the latest version of MicroPython for micro:bit (1.0.0).
32
+ * This is the version of uflash to be used in Mu 1.0.1.
33
+
34
+ 1.2.2
35
+ -----
36
+
37
+ * Update to latest version of MicroPython for micro:bit (1.0.0-rc.3).
38
+
39
+ 1.2.1
40
+ -----
41
+
42
+ * Update to latest version of MicroPython. Thanks to Damien George and Carlos
43
+ Pereira Atencio for their hard work.
44
+ * This is the version of uflash to be used in Mu 1.0.0 (final).
45
+
46
+ 1.2.0
47
+ -----
48
+
49
+ * Update to latest version of MicroPython. Thanks to Damien George.
50
+ * Add attribute called MICROPYTHON_VERSION to report the version of MicroPython
51
+ bundled with uflash.
52
+
53
+ 1.1.1
54
+ -----
55
+
56
+ * Update to the latest version of MicroPython for the BBC micro:bit -- fixes a
57
+ bug relating to flooding and the radio module. As always, many thanks to
58
+ Damien George for his work on MicroPython.
59
+
60
+ 1.1.0
61
+ -----
62
+
63
+ * Update to latest version of MicroPython for the BBC micro:bit
64
+ (many thanks to Damien George for his amazing efforts!).
65
+ * Add a --version flag to uflash that
66
+ causes it to print the current version number
67
+ (many thanks to Lenz Grimmer for this work).
68
+ * Allow uflash to accept the content of a script
69
+ as well as the path to a script
70
+ (many thanks to Zander Brown for this work).
71
+ * Ensure uflash works nicely / better with external tools
72
+ (many thanks to Lex Robinson for this work).
73
+ * Added copyright and license information to the start of the script.
74
+
75
+ 1.0.8
76
+ -----
77
+
78
+ * Refactor hex extraction to not depend on extended address record before
79
+ script (thanks Carlos).
80
+ * Refactor tox tests to fix Windows related Gremlin (thanks again, Carlos).
81
+
82
+ 1.0.7
83
+ -----
84
+
85
+ * Watch for changes in a script. Automatically flash on save.
86
+
87
+ 1.0.5
88
+ -----
89
+
90
+ * Update runtime to include latest bug fixes and inclusion of input() builtin.
91
+ * Detecting drives on Windows 10 no longer causes pop-ups in certain
92
+ situations.
93
+ * Documentation updates.
94
+
95
+ 1.0.4
96
+ -----
97
+
98
+ * Add support for flash multiple microbits.
99
+
100
+ 1.0.3
101
+ -----
102
+
103
+ * Update runtime to include audio and speech modules.
104
+
105
+ 1.0.2
106
+ -----
107
+
108
+ * Update runtime to include the new radio module.
109
+
110
+ 1.0.1
111
+ -----
112
+
113
+ * Update runtime to include file system related changes.
114
+
115
+ 1.0.0.final.0
116
+ -------------
117
+
118
+ * Runtime updated to version 1.0 of MicroPython for the BBC micro:bit.
119
+
120
+ 1.0.0.beta.7
121
+ ------------
122
+
123
+ * Runtime update to fix display related bug.
124
+
125
+ 1.0.0.beta.6
126
+ ------------
127
+
128
+ * Runtime update to latest version of the DAL (swaps pins 4 and 5).
129
+
130
+ 1.0.0.beta.5
131
+ ------------
132
+
133
+ * Runtime update to fix error reporting bug.
134
+
135
+ 1.0.0.beta.4
136
+ ------------
137
+
138
+ * Documentation update.
139
+ * Help text update.
140
+
141
+ 1.0.0.beta.3
142
+ ------------
143
+
144
+ * Add ability to specify a MicroPython runtime to use.
145
+ * Test fixes.
146
+
147
+ 1.0.0.beta.2
148
+ ------------
149
+
150
+ * Updated to latest version of MicroPython runtime.
151
+
152
+ 1.0.0.beta.1
153
+ ------------
154
+
155
+ * Works with Python 2.7 (thanks to @Funkyhat).
156
+ * Updated to the latest build of MicroPython for the BBC micro:bit.
157
+ * Minor refactoring and updates to the test suite due to MicroPython updates.
158
+
159
+ 0.9.17
160
+ ------
161
+
162
+ * Minor code refactor.
163
+ * Documentation update.
164
+
165
+ 0.9.14
166
+ ------
167
+
168
+ * Feature complete.
169
+ * Comprehensive test suite - 100% coverage.
170
+ * Tested on Linux and Windows.
171
+ * Documentation.
172
+ * Access via the "uflash" command.
173
+
174
+ 0.0.1
175
+ -----
176
+
177
+ * Initial release. Basic functionality.
uflash3-3.0.0/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2025 Blackteahamburger <blackteahamburger@outlook.com>
2
+
3
+ Copyright (c) 2015-2018 Nicholas H.Tollervey and others.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ 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, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,6 @@
1
+ include uflash/*.hex
2
+ include uflash/RT_LIVE_VERINFO
3
+ include CHANGES.rst
4
+ include README.rst
5
+ include LICENSE
6
+ include *.pyi py.typed
uflash3-3.0.0/PKG-INFO ADDED
@@ -0,0 +1,108 @@
1
+ Metadata-Version: 2.4
2
+ Name: uflash3
3
+ Version: 3.0.0
4
+ Summary: A module and utility to flash Python onto the BBC micro:bit.
5
+ Author-email: Blackteahamburger <blackteahamburger@outlook.com>
6
+ Maintainer-email: Blackteahamburger <blackteahamburger@outlook.com>
7
+ License-Expression: MIT
8
+ Project-URL: Homepage, https://github.com/blackteahamburger/uflash
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: Education
13
+ Classifier: Operating System :: Microsoft :: Windows
14
+ Classifier: Operating System :: POSIX
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Education
20
+ Classifier: Topic :: Software Development :: Embedded Systems
21
+ Requires-Python: >=3.10
22
+ Description-Content-Type: text/x-rst
23
+ License-File: AUTHORS
24
+ License-File: LICENSE
25
+ Requires-Dist: microfs2>=2.0.6
26
+ Requires-Dist: nudatus>=0.0.2
27
+ Requires-Dist: semver
28
+ Provides-Extra: dev
29
+ Requires-Dist: coverage; extra == "dev"
30
+ Requires-Dist: pytest-cov; extra == "dev"
31
+ Requires-Dist: pytest>=5; extra == "dev"
32
+ Requires-Dist: ruff; extra == "dev"
33
+ Requires-Dist: sphinx; extra == "dev"
34
+ Dynamic: license-file
35
+
36
+ uFlash
37
+ ======
38
+
39
+ A community fork of `uFlash <https://github.com/ntoll/uflash>`_.
40
+
41
+ A utility for flashing the BBC micro:bit with Python scripts and the
42
+ MicroPython runtime. You pronounce the name of this utility "micro-flash". ;-)
43
+
44
+ It provides three services:
45
+
46
+ 1. A library of functions to programatically create a hex file and
47
+ flash it onto a BBC micro:bit.
48
+ 2. A command line utility called `uflash` that will flash Python scripts
49
+ onto a BBC micro:bit.
50
+ 3. A command line utility called `uextract` that will extract
51
+ Python scripts from a hex file created by uFlash.
52
+
53
+ Several essential operations are implemented:
54
+
55
+ * Encode Python into the hex format.
56
+ * Embed the resulting hexified Python into the MicroPython runtime hex.
57
+ * Extract an encoded Python script from a MicroPython hex file.
58
+ * Discover the connected micro:bit.
59
+ * Copy the resulting hex onto the micro:bit, thus flashing the device.
60
+ * Specify the MicroPython runtime hex in which to embed your Python code.
61
+
62
+ Installation
63
+ ------------
64
+
65
+ To install simply type::
66
+
67
+ $ pip install uflash3
68
+
69
+ **NB:** You must use a USB *data* cable to connect the micro:bit to your
70
+ computer (some cables are power only). You're in good shape if, when plugged
71
+ in, the micro:bit appears as a USB storage device on your file system.
72
+
73
+ Linux users: For uflash to work you must ensure the micro:bit is mounted as a
74
+ USB storage device. Usually this is done automatically. If not you've probably
75
+ configured automounting to be off. If that's the case, we assume you
76
+ have the technical knowledge to mount the device yourself or to install the
77
+ required kernel modules if they're missing. Default installs of popular Linux
78
+ distros "should just work" (tm) out of the box given a default install.
79
+
80
+ Command Usage
81
+ -------------
82
+
83
+ To read help simply type::
84
+
85
+ $ uflash --help
86
+
87
+ or::
88
+
89
+ $ uextract --help
90
+
91
+ Development
92
+ -----------
93
+
94
+ The source code is hosted in GitHub. Please feel free to fork the repository.
95
+ Assuming you have Git installed you can download the code from the canonical
96
+ repository with the following command::
97
+
98
+ $ git clone https://github.com/blackteahamburger/uflash.git
99
+
100
+ To locally install your development version of the module into a virtualenv,
101
+ run the following command::
102
+
103
+ $ pip install -e ".[dev]"
104
+
105
+ This also ensures that you have the correct dependencies for development.
106
+
107
+ There is a Makefile that helps with most of the common workflows
108
+ associated with development.
@@ -0,0 +1,73 @@
1
+ uFlash
2
+ ======
3
+
4
+ A community fork of `uFlash <https://github.com/ntoll/uflash>`_.
5
+
6
+ A utility for flashing the BBC micro:bit with Python scripts and the
7
+ MicroPython runtime. You pronounce the name of this utility "micro-flash". ;-)
8
+
9
+ It provides three services:
10
+
11
+ 1. A library of functions to programatically create a hex file and
12
+ flash it onto a BBC micro:bit.
13
+ 2. A command line utility called `uflash` that will flash Python scripts
14
+ onto a BBC micro:bit.
15
+ 3. A command line utility called `uextract` that will extract
16
+ Python scripts from a hex file created by uFlash.
17
+
18
+ Several essential operations are implemented:
19
+
20
+ * Encode Python into the hex format.
21
+ * Embed the resulting hexified Python into the MicroPython runtime hex.
22
+ * Extract an encoded Python script from a MicroPython hex file.
23
+ * Discover the connected micro:bit.
24
+ * Copy the resulting hex onto the micro:bit, thus flashing the device.
25
+ * Specify the MicroPython runtime hex in which to embed your Python code.
26
+
27
+ Installation
28
+ ------------
29
+
30
+ To install simply type::
31
+
32
+ $ pip install uflash3
33
+
34
+ **NB:** You must use a USB *data* cable to connect the micro:bit to your
35
+ computer (some cables are power only). You're in good shape if, when plugged
36
+ in, the micro:bit appears as a USB storage device on your file system.
37
+
38
+ Linux users: For uflash to work you must ensure the micro:bit is mounted as a
39
+ USB storage device. Usually this is done automatically. If not you've probably
40
+ configured automounting to be off. If that's the case, we assume you
41
+ have the technical knowledge to mount the device yourself or to install the
42
+ required kernel modules if they're missing. Default installs of popular Linux
43
+ distros "should just work" (tm) out of the box given a default install.
44
+
45
+ Command Usage
46
+ -------------
47
+
48
+ To read help simply type::
49
+
50
+ $ uflash --help
51
+
52
+ or::
53
+
54
+ $ uextract --help
55
+
56
+ Development
57
+ -----------
58
+
59
+ The source code is hosted in GitHub. Please feel free to fork the repository.
60
+ Assuming you have Git installed you can download the code from the canonical
61
+ repository with the following command::
62
+
63
+ $ git clone https://github.com/blackteahamburger/uflash.git
64
+
65
+ To locally install your development version of the module into a virtualenv,
66
+ run the following command::
67
+
68
+ $ pip install -e ".[dev]"
69
+
70
+ This also ensures that you have the correct dependencies for development.
71
+
72
+ There is a Makefile that helps with most of the common workflows
73
+ associated with development.
@@ -0,0 +1,46 @@
1
+ [build-system]
2
+ build-backend = "setuptools.build_meta"
3
+ requires = ["setuptools>=77.0.3"]
4
+
5
+ [project]
6
+ authors = [
7
+ { name = "Blackteahamburger", email = "blackteahamburger@outlook.com" },
8
+ ]
9
+ classifiers = [
10
+ "Development Status :: 5 - Production/Stable",
11
+ "Environment :: Console",
12
+ "Intended Audience :: Developers",
13
+ "Intended Audience :: Education",
14
+ "Operating System :: Microsoft :: Windows",
15
+ "Operating System :: POSIX",
16
+ "Programming Language :: Python :: 3.10",
17
+ "Programming Language :: Python :: 3.11",
18
+ "Programming Language :: Python :: 3.12",
19
+ "Programming Language :: Python :: 3.13",
20
+ "Topic :: Education",
21
+ "Topic :: Software Development :: Embedded Systems",
22
+ ]
23
+ dependencies = ["microfs2>=2.0.6", "nudatus>=0.0.2", "semver"]
24
+ description = "A module and utility to flash Python onto the BBC micro:bit."
25
+ license = "MIT"
26
+ license-files = ["AUTHORS", "LICENSE"]
27
+ maintainers = [
28
+ { name = "Blackteahamburger", email = "blackteahamburger@outlook.com" },
29
+ ]
30
+ name = "uflash3"
31
+ readme = "README.rst"
32
+ requires-python = ">=3.10"
33
+ version = "3.0.0"
34
+
35
+ [project.optional-dependencies]
36
+ dev = ["coverage", "pytest-cov", "pytest>=5", "ruff", "sphinx"]
37
+
38
+ [project.urls]
39
+ Homepage = "https://github.com/blackteahamburger/uflash"
40
+
41
+ [project.scripts]
42
+ uextract = "uflash.uextract:uextract"
43
+ uflash = "uflash.main:main"
44
+
45
+ [tool.coverage.run]
46
+ omit = ["uflash/__main__.py"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+