BUCH 1.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.
@@ -0,0 +1,23 @@
1
+ Metadata-Version: 2.4
2
+ Name: BUCH
3
+ Version: 1.0.2
4
+ Summary: Check whether there is enough free storage space to create backups of files or directories.
5
+ Author-email: Hossein Pirouz <Hossein.P.2013.1391@gmail.com>
6
+ License-Expression: LGPL-3.0-or-later
7
+ Project-URL: Homepage, https://github.com/HP2000C/BUCH
8
+ Project-URL: Repository, https://github.com/HP2000C/BUCH
9
+ Project-URL: Issues, https://github.com/HP2000C/BUCH/issues
10
+ Keywords: backup,storage,space,disk,filesystem,check
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Topic :: Software Development :: Libraries
17
+ Classifier: Topic :: System :: Filesystems
18
+ Classifier: Topic :: Utilities
19
+ Requires-Python: >=3.8
20
+ Description-Content-Type: text/markdown
21
+
22
+ # ✅ BUCH Library
23
+ ### 🧑🏻‍💻 A practical library for checking the feasibility of creating backups for a file or folder, as many times as desired...
@@ -0,0 +1,7 @@
1
+ BUCH.py
2
+ BUCHREADME.md
3
+ pyproject.toml
4
+ BUCH.egg-info/PKG-INFO
5
+ BUCH.egg-info/SOURCES.txt
6
+ BUCH.egg-info/dependency_links.txt
7
+ BUCH.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ BUCH
buch-1.0.2/BUCH.py ADDED
@@ -0,0 +1,26 @@
1
+ import os
2
+ import shutil
3
+
4
+ __version__ = "1.0.0"
5
+
6
+
7
+ def can_backup(path, copies=1):
8
+ if not os.path.exists(path):
9
+ raise FileNotFoundError(f"Path not found: {path}")
10
+
11
+ if os.path.isfile(path):
12
+ size = os.path.getsize(path)
13
+ else:
14
+ size = 0
15
+ for root, _, files in os.walk(path):
16
+ for file in files:
17
+ filepath = os.path.join(root, file)
18
+ try:
19
+ size += os.path.getsize(filepath)
20
+ except OSError:
21
+ pass
22
+
23
+ required = size * copies
24
+ free = shutil.disk_usage(path).free
25
+
26
+ return free >= required
@@ -0,0 +1,2 @@
1
+ # ✅ BUCH Library
2
+ ### 🧑🏻‍💻 A practical library for checking the feasibility of creating backups for a file or folder, as many times as desired...
buch-1.0.2/PKG-INFO ADDED
@@ -0,0 +1,23 @@
1
+ Metadata-Version: 2.4
2
+ Name: BUCH
3
+ Version: 1.0.2
4
+ Summary: Check whether there is enough free storage space to create backups of files or directories.
5
+ Author-email: Hossein Pirouz <Hossein.P.2013.1391@gmail.com>
6
+ License-Expression: LGPL-3.0-or-later
7
+ Project-URL: Homepage, https://github.com/HP2000C/BUCH
8
+ Project-URL: Repository, https://github.com/HP2000C/BUCH
9
+ Project-URL: Issues, https://github.com/HP2000C/BUCH/issues
10
+ Keywords: backup,storage,space,disk,filesystem,check
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Topic :: Software Development :: Libraries
17
+ Classifier: Topic :: System :: Filesystems
18
+ Classifier: Topic :: Utilities
19
+ Requires-Python: >=3.8
20
+ Description-Content-Type: text/markdown
21
+
22
+ # ✅ BUCH Library
23
+ ### 🧑🏻‍💻 A practical library for checking the feasibility of creating backups for a file or folder, as many times as desired...
@@ -0,0 +1,40 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "BUCH"
7
+ version = "1.0.2"
8
+ description = "Check whether there is enough free storage space to create backups of files or directories."
9
+ readme = "BUCHREADME.md"
10
+ requires-python = ">=3.8"
11
+ license = "LGPL-3.0-or-later"
12
+
13
+ authors = [
14
+ { name = "Hossein Pirouz", email = "Hossein.P.2013.1391@gmail.com" }
15
+ ]
16
+
17
+ keywords = [
18
+ "backup",
19
+ "storage",
20
+ "space",
21
+ "disk",
22
+ "filesystem",
23
+ "check"
24
+ ]
25
+
26
+ classifiers = [
27
+ "Development Status :: 5 - Production/Stable",
28
+ "Intended Audience :: Developers",
29
+ "Operating System :: OS Independent",
30
+ "Programming Language :: Python :: 3",
31
+ "Programming Language :: Python :: 3 :: Only",
32
+ "Topic :: Software Development :: Libraries",
33
+ "Topic :: System :: Filesystems",
34
+ "Topic :: Utilities"
35
+ ]
36
+
37
+ [project.urls]
38
+ Homepage = "https://github.com/HP2000C/BUCH"
39
+ Repository = "https://github.com/HP2000C/BUCH"
40
+ Issues = "https://github.com/HP2000C/BUCH/issues"
buch-1.0.2/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+