FileBackup 0.1.0__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.
@@ -0,0 +1,92 @@
1
+ # ----------------------------------------------------------------------
2
+ # |
3
+ # | Copyright (c) 2024 David Brownell
4
+ # | Distributed under the MIT License.
5
+ # |
6
+ # ----------------------------------------------------------------------
7
+ """This file serves as an example of how to create scripts that can be invoked from the command line once the package is installed."""
8
+
9
+ import sys
10
+
11
+ import typer
12
+
13
+ from typer.core import TyperGroup # type: ignore [import-untyped]
14
+
15
+ from FileBackup import Math, __version__
16
+
17
+
18
+ # ----------------------------------------------------------------------
19
+ class NaturalOrderGrouper(TyperGroup):
20
+ # pylint: disable=missing-class-docstring
21
+ # ----------------------------------------------------------------------
22
+ def list_commands(self, *args, **kwargs): # pylint: disable=unused-argument
23
+ return self.commands.keys()
24
+
25
+
26
+ # ----------------------------------------------------------------------
27
+ app = typer.Typer(
28
+ cls=NaturalOrderGrouper,
29
+ help=__doc__,
30
+ no_args_is_help=True,
31
+ pretty_exceptions_show_locals=False,
32
+ pretty_exceptions_enable=False,
33
+ )
34
+
35
+
36
+ # ----------------------------------------------------------------------
37
+ @app.command("Add")
38
+ def Add(
39
+ x: int,
40
+ y: int,
41
+ ) -> None:
42
+ """Adds 2 values."""
43
+
44
+ sys.stdout.write(str(Math.Add(x, y)))
45
+
46
+
47
+ # ----------------------------------------------------------------------
48
+ @app.command("Sub")
49
+ def Sub(
50
+ x: int,
51
+ y: int,
52
+ ) -> None:
53
+ """Subtracts 2 values."""
54
+
55
+ sys.stdout.write(str(Math.Sub(x, y)))
56
+
57
+
58
+ # ----------------------------------------------------------------------
59
+ @app.command("Mult")
60
+ def Mult(
61
+ x: int,
62
+ y: int,
63
+ ) -> None:
64
+ """Multiplies 2 values."""
65
+
66
+ sys.stdout.write(str(Math.Mult(x, y)))
67
+
68
+
69
+ # ----------------------------------------------------------------------
70
+ @app.command("Div")
71
+ def Div(
72
+ x: int,
73
+ y: int,
74
+ ) -> None:
75
+ """Divides 1 value by another."""
76
+
77
+ sys.stdout.write(str(Math.Div(x, y)))
78
+
79
+
80
+ # ----------------------------------------------------------------------
81
+ @app.command("Version")
82
+ def Version() -> None:
83
+ """Prints the version of the package."""
84
+
85
+ sys.stdout.write(__version__)
86
+
87
+
88
+ # ----------------------------------------------------------------------
89
+ # ----------------------------------------------------------------------
90
+ # ----------------------------------------------------------------------
91
+ if __name__ == "__main__":
92
+ app() # pragma: no cover
FileBackup/Math.py ADDED
@@ -0,0 +1,27 @@
1
+ # ----------------------------------------------------------------------
2
+ # |
3
+ # | Copyright (c) 2024 David Brownell
4
+ # | Distributed under the MIT License.
5
+ # |
6
+ # ----------------------------------------------------------------------
7
+ """Basic math functions. This file illustrates how to create a python package that contains functions that can be invoked by other python code."""
8
+
9
+
10
+ # ----------------------------------------------------------------------
11
+ def Add(x, y):
12
+ return x + y
13
+
14
+
15
+ # ----------------------------------------------------------------------
16
+ def Sub(x, y):
17
+ return x - y
18
+
19
+
20
+ # ----------------------------------------------------------------------
21
+ def Mult(x, y):
22
+ return x * y
23
+
24
+
25
+ # ----------------------------------------------------------------------
26
+ def Div(x, y):
27
+ return x / y
FileBackup/__init__.py ADDED
@@ -0,0 +1,14 @@
1
+ # ----------------------------------------------------------------------
2
+ # |
3
+ # | Copyright (c) 2024 David Brownell
4
+ # | Distributed under the MIT License.
5
+ # |
6
+ # ----------------------------------------------------------------------
7
+ # pylint: disable=missing-module-docstring,invalid-name
8
+
9
+ # Note that this value will be overwritten by calls to `python ../../Build.py update_version` based
10
+ # on changes observed in the git repository. The default value below will be used until the value
11
+ # here is explicitly updated by the Continuous Integration system as part of a commit.
12
+ __version__ = "0.1.0"
13
+
14
+ from .Math import Add, Sub, Mult, Div
@@ -0,0 +1,21 @@
1
+ MIT LICENSE
2
+
3
+ Copyright (c) 2024 David Brownell
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,53 @@
1
+ Metadata-Version: 2.1
2
+ Name: FileBackup
3
+ Version: 0.1.0
4
+ Summary: Tool for creating and restoring file system backups.
5
+ Author-email: David Brownell <db@DavidBrownell.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/davidbrownell/FileBackup
8
+ Project-URL: Documentation, https://github.com/davidbrownell/FileBackup
9
+ Project-URL: Repository, https://github.com/davidbrownell/FileBackup
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: MacOS
12
+ Classifier: Operating System :: Microsoft :: Windows
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Classifier: Programming Language :: Python
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE.txt
20
+ Requires-Dist: typer ~=0.9
21
+ Provides-Extra: dev
22
+ Requires-Dist: dbrownell-DevTools ; extra == 'dev'
23
+ Provides-Extra: package
24
+ Requires-Dist: build ~=1.2 ; extra == 'package'
25
+ Requires-Dist: cx-Freeze ~=6.15 ; extra == 'package'
26
+ Requires-Dist: twine ~=4.0 ; extra == 'package'
27
+
28
+ # FileBackup
29
+
30
+
31
+
32
+ Tool for creating and restoring file system backups.
33
+
34
+
35
+
36
+ ## Overview
37
+
38
+ TODO: Complete this section
39
+
40
+ ### How to use FileBackup
41
+
42
+ TODO: Complete this section
43
+
44
+
45
+
46
+ ## Vulnerability Reporting (Security Issues)
47
+ Please privately report vulnerabilities you find so we can fix them!
48
+
49
+ See [SECURITY.md](https://github.com/davidbrownell/FileBackup/blob/main/SECURITY.md) for information on how to privately report vulnerabilities.
50
+
51
+ ## License
52
+
53
+ FileBackup is licensed under the <a href="https://choosealicense.com/licenses/mit/" target="_blank">MIT</a> license.
@@ -0,0 +1,9 @@
1
+ FileBackup/EntryPoint.py,sha256=03gYjKoAyKjm1MmKvm6L6aMbZ4y6O41ICQIK-zA3WGU,2531
2
+ FileBackup/Math.py,sha256=MtgI9Z0NRqGDttTofzM2UPlD3u4Lm91pxKX5Dl65nIQ,836
3
+ FileBackup/__init__.py,sha256=cNJUaqD75ik7caZw0N_c6pLhso3QEHMnPu1YW-M6jOI,636
4
+ FileBackup-0.1.0.dist-info/LICENSE.txt,sha256=P0fqGEJwVh6ADlvhWsPNxwWII2O0VaoyMKUcjDqsOOM,1092
5
+ FileBackup-0.1.0.dist-info/METADATA,sha256=m1K2Qia9S57v-F0KjrGQ33zGPJURFHamlrEfV6gBT4Y,1674
6
+ FileBackup-0.1.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
7
+ FileBackup-0.1.0.dist-info/entry_points.txt,sha256=yAP7Q5zpFpXJVQ6dUoLHFaOBuN55_I8O6hjw9oDgCVE,57
8
+ FileBackup-0.1.0.dist-info/top_level.txt,sha256=mXd2b6GEOpQCnmzgYEb6c_rfwlgP3RgmMuVDkQasxKw,11
9
+ FileBackup-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.43.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ FileBackup = FileBackup:EntryPoint.app
@@ -0,0 +1 @@
1
+ FileBackup