colemen-py 0.1.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.
Files changed (164) hide show
  1. colemen_py-0.1.0/LICENSE +201 -0
  2. colemen_py-0.1.0/MANIFEST.in +13 -0
  3. colemen_py-0.1.0/PKG-INFO +122 -0
  4. colemen_py-0.1.0/README.md +75 -0
  5. colemen_py-0.1.0/docs/domains/directories/directory-api-reference.md +90 -0
  6. colemen_py-0.1.0/docs/domains/directories/directory-info.md +140 -0
  7. colemen_py-0.1.0/docs/domains/directories/operations.md +233 -0
  8. colemen_py-0.1.0/docs/domains/directories/overview.md +82 -0
  9. colemen_py-0.1.0/docs/domains/files/file-api-reference.md +126 -0
  10. colemen_py-0.1.0/docs/domains/files/file-object.md +212 -0
  11. colemen_py-0.1.0/docs/domains/files/operations.md +147 -0
  12. colemen_py-0.1.0/docs/domains/files/overview.md +102 -0
  13. colemen_py-0.1.0/docs/domains/files/query/README.md +176 -0
  14. colemen_py-0.1.0/docs/domains/files/query/commands.md +187 -0
  15. colemen_py-0.1.0/docs/domains/files/query/expressions.md +269 -0
  16. colemen_py-0.1.0/docs/domains/files/query/fields.md +238 -0
  17. colemen_py-0.1.0/docs/domains/files/query/grammar.md +174 -0
  18. colemen_py-0.1.0/docs/domains/files/query/operators.md +259 -0
  19. colemen_py-0.1.0/docs/domains/files/query/recipes.md +336 -0
  20. colemen_py-0.1.0/docs/domains/files/query/troubleshooting.md +173 -0
  21. colemen_py-0.1.0/docs/domains/files/query/update.md +282 -0
  22. colemen_py-0.1.0/docs/domains/files/reading-writing.md +139 -0
  23. colemen_py-0.1.0/docs/domains/files/recipes/filesystem-recipes.md +157 -0
  24. colemen_py-0.1.0/docs/domains/files/reference/constants.md +146 -0
  25. colemen_py-0.1.0/docs/domains/files/reference/public-api-map.md +67 -0
  26. colemen_py-0.1.0/docs/domains/files/reference/safety-and-limitations.md +83 -0
  27. colemen_py-0.1.0/docs/domains/files/scanning.md +208 -0
  28. colemen_py-0.1.0/docs/domains/files/video/Audio Extraction.md +1313 -0
  29. colemen_py-0.1.0/docs/domains/files/video/Video Conversion.md +80 -0
  30. colemen_py-0.1.0/docs/domains/randoms/animals.md +125 -0
  31. colemen_py-0.1.0/pyproject.toml +110 -0
  32. colemen_py-0.1.0/setup.cfg +4 -0
  33. colemen_py-0.1.0/src/colemen_py/__init__.py +69 -0
  34. colemen_py-0.1.0/src/colemen_py/binaries/linux/.gitkeep +0 -0
  35. colemen_py-0.1.0/src/colemen_py/binaries/macos/.gitkeep +0 -0
  36. colemen_py-0.1.0/src/colemen_py/binaries/windows/.gitkeep +0 -0
  37. colemen_py-0.1.0/src/colemen_py/binaries/windows/colemen_copy_windows_v020.exe +0 -0
  38. colemen_py-0.1.0/src/colemen_py/binaries/windows/exiftool.exe +0 -0
  39. colemen_py-0.1.0/src/colemen_py/binaries/windows/shredator_windows_v020.exe +0 -0
  40. colemen_py-0.1.0/src/colemen_py/core/__init__.py +6 -0
  41. colemen_py-0.1.0/src/colemen_py/core/paths.py +36 -0
  42. colemen_py-0.1.0/src/colemen_py/core/result.py +64 -0
  43. colemen_py-0.1.0/src/colemen_py/domains/arrays/__init__.py +3 -0
  44. colemen_py-0.1.0/src/colemen_py/domains/arrays/api.py +190 -0
  45. colemen_py-0.1.0/src/colemen_py/domains/console/__init__.py +3 -0
  46. colemen_py-0.1.0/src/colemen_py/domains/console/api.py +189 -0
  47. colemen_py-0.1.0/src/colemen_py/domains/constants/__init__.py +3 -0
  48. colemen_py-0.1.0/src/colemen_py/domains/constants/api.py +51 -0
  49. colemen_py-0.1.0/src/colemen_py/domains/constants/data/adjectives.txt +4840 -0
  50. colemen_py-0.1.0/src/colemen_py/domains/constants/data/animals.jsonc +3814 -0
  51. colemen_py-0.1.0/src/colemen_py/domains/constants/data/common_animals.txt +144 -0
  52. colemen_py-0.1.0/src/colemen_py/domains/constants/data/latin_words.txt +522 -0
  53. colemen_py-0.1.0/src/colemen_py/domains/constants/data/mime_types.json +3054 -0
  54. colemen_py-0.1.0/src/colemen_py/domains/constants/data/months.jsonc +98 -0
  55. colemen_py-0.1.0/src/colemen_py/domains/constants/data/nouns.txt +11342 -0
  56. colemen_py-0.1.0/src/colemen_py/domains/constants/file_constants.py +443 -0
  57. colemen_py-0.1.0/src/colemen_py/domains/constants/time_constants.py +323 -0
  58. colemen_py-0.1.0/src/colemen_py/domains/constants/web_constants.py +90 -0
  59. colemen_py-0.1.0/src/colemen_py/domains/constants/word_constants.py +181 -0
  60. colemen_py-0.1.0/src/colemen_py/domains/directories/__init__.py +4 -0
  61. colemen_py-0.1.0/src/colemen_py/domains/directories/api.py +248 -0
  62. colemen_py-0.1.0/src/colemen_py/domains/directories/info.py +343 -0
  63. colemen_py-0.1.0/src/colemen_py/domains/directories/ops.py +367 -0
  64. colemen_py-0.1.0/src/colemen_py/domains/directories/scan.py +113 -0
  65. colemen_py-0.1.0/src/colemen_py/domains/files/__init__.py +36 -0
  66. colemen_py-0.1.0/src/colemen_py/domains/files/api.py +695 -0
  67. colemen_py-0.1.0/src/colemen_py/domains/files/constants.py +102 -0
  68. colemen_py-0.1.0/src/colemen_py/domains/files/factory.py +53 -0
  69. colemen_py-0.1.0/src/colemen_py/domains/files/info.py +511 -0
  70. colemen_py-0.1.0/src/colemen_py/domains/files/ops.py +351 -0
  71. colemen_py-0.1.0/src/colemen_py/domains/files/query.py +2539 -0
  72. colemen_py-0.1.0/src/colemen_py/domains/files/read.py +124 -0
  73. colemen_py-0.1.0/src/colemen_py/domains/files/scan.py +180 -0
  74. colemen_py-0.1.0/src/colemen_py/domains/files/wait.py +39 -0
  75. colemen_py-0.1.0/src/colemen_py/domains/files/write.py +132 -0
  76. colemen_py-0.1.0/src/colemen_py/domains/maths/__init__.py +3 -0
  77. colemen_py-0.1.0/src/colemen_py/domains/maths/api.py +49 -0
  78. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/__init__.py +4 -0
  79. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/_conversion_common.py +456 -0
  80. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/acceleration_conversion_utils.py +234 -0
  81. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/angle_conversion_utils.py +244 -0
  82. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/angular_velocity_conversion_utils.py +238 -0
  83. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/area_conversion_utils.py +295 -0
  84. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/density_conversion_utils.py +241 -0
  85. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/digital_storage_conversion_utils.py +374 -0
  86. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/electrical_conversion_utils.py +269 -0
  87. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/electrical_current_density_conversion_utils.py +229 -0
  88. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/energy_conversion_utils.py +247 -0
  89. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/energy_efficiency_conversion_utils.py +233 -0
  90. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/fluid_concentration_conversion_utils.py +253 -0
  91. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/fluid_flow_conversion_utils.py +309 -0
  92. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/fluid_surface_tension_conversion_utils.py +220 -0
  93. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/fluid_viscosity_conversion_utils.py +244 -0
  94. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/force_conversion_utils.py +253 -0
  95. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/frequency_conversion_utils.py +252 -0
  96. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/heat_capacity_conversion_utils.py +223 -0
  97. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/heat_density_conversion_utils.py +238 -0
  98. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/inertia_conversion_utils.py +232 -0
  99. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/length_conversion_utils.py +491 -0
  100. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/luminance_conversion_utils.py +241 -0
  101. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/power_conversion_utils.py +265 -0
  102. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/pressure_conversion_utils.py +255 -0
  103. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/resolution_conversion_utils.py +229 -0
  104. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/sound_conversion_utils.py +222 -0
  105. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/temperature_conversion_utils.py +219 -0
  106. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/time_conversion_utils.py +527 -0
  107. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/torque_conversion_utils.py +229 -0
  108. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/velocity_conversion_utils.py +321 -0
  109. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/volume_conversion_utils.py +300 -0
  110. colemen_py-0.1.0/src/colemen_py/domains/maths/conversion/weight_conversion_utils.py +281 -0
  111. colemen_py-0.1.0/src/colemen_py/domains/maths/convert.py +1429 -0
  112. colemen_py-0.1.0/src/colemen_py/domains/maths/math_types.py +9 -0
  113. colemen_py-0.1.0/src/colemen_py/domains/media/__init__.py +31 -0
  114. colemen_py-0.1.0/src/colemen_py/domains/media/api.py +164 -0
  115. colemen_py-0.1.0/src/colemen_py/domains/media/audio.py +277 -0
  116. colemen_py-0.1.0/src/colemen_py/domains/media/exiftool.py +232 -0
  117. colemen_py-0.1.0/src/colemen_py/domains/media/guards.py +35 -0
  118. colemen_py-0.1.0/src/colemen_py/domains/media/image.py +729 -0
  119. colemen_py-0.1.0/src/colemen_py/domains/media/video.py +1850 -0
  120. colemen_py-0.1.0/src/colemen_py/domains/objects/__init__.py +3 -0
  121. colemen_py-0.1.0/src/colemen_py/domains/objects/api.py +185 -0
  122. colemen_py-0.1.0/src/colemen_py/domains/randoms/__init__.py +4 -0
  123. colemen_py-0.1.0/src/colemen_py/domains/randoms/api.py +303 -0
  124. colemen_py-0.1.0/src/colemen_py/domains/randoms/file.py +185 -0
  125. colemen_py-0.1.0/src/colemen_py/domains/randoms/random_constants.py +154 -0
  126. colemen_py-0.1.0/src/colemen_py/domains/randoms/string.py +229 -0
  127. colemen_py-0.1.0/src/colemen_py/domains/randoms/time.py +248 -0
  128. colemen_py-0.1.0/src/colemen_py/domains/randoms/web.py +85 -0
  129. colemen_py-0.1.0/src/colemen_py/domains/randoms/word.py +315 -0
  130. colemen_py-0.1.0/src/colemen_py/domains/strings/__init__.py +3 -0
  131. colemen_py-0.1.0/src/colemen_py/domains/strings/api.py +132 -0
  132. colemen_py-0.1.0/src/colemen_py/domains/strings/wildcard_extrapolation.py +149 -0
  133. colemen_py-0.1.0/src/colemen_py/domains/times/__init__.py +3 -0
  134. colemen_py-0.1.0/src/colemen_py/domains/times/api.py +116 -0
  135. colemen_py-0.1.0/src/colemen_py/domains/types/__init__.py +3 -0
  136. colemen_py-0.1.0/src/colemen_py/domains/types/api.py +91 -0
  137. colemen_py-0.1.0/src/colemen_py/domains/validation/__init__.py +3 -0
  138. colemen_py-0.1.0/src/colemen_py/domains/validation/api.py +87 -0
  139. colemen_py-0.1.0/src/colemen_py/external/__init__.py +24 -0
  140. colemen_py-0.1.0/src/colemen_py/external/api.py +120 -0
  141. colemen_py-0.1.0/src/colemen_py/external/base.py +35 -0
  142. colemen_py-0.1.0/src/colemen_py/external/binary_locator.py +134 -0
  143. colemen_py-0.1.0/src/colemen_py/external/colemen_copy/__init__.py +21 -0
  144. colemen_py-0.1.0/src/colemen_py/external/colemen_copy/engine.py +455 -0
  145. colemen_py-0.1.0/src/colemen_py/external/command_runner.py +93 -0
  146. colemen_py-0.1.0/src/colemen_py/external/machine.py +85 -0
  147. colemen_py-0.1.0/src/colemen_py/external/shredator/__init__.py +19 -0
  148. colemen_py-0.1.0/src/colemen_py/external/shredator/engine.py +365 -0
  149. colemen_py-0.1.0/src/colemen_py/py.typed +0 -0
  150. colemen_py-0.1.0/src/colemen_py.egg-info/SOURCES.txt +161 -0
  151. colemen_py-0.1.0/tests/test_array.py +20 -0
  152. colemen_py-0.1.0/tests/test_console_media.py +18 -0
  153. colemen_py-0.1.0/tests/test_directory_stage3.py +103 -0
  154. colemen_py-0.1.0/tests/test_file_and_dir.py +50 -0
  155. colemen_py-0.1.0/tests/test_file_base_stage4.py +100 -0
  156. colemen_py-0.1.0/tests/test_file_query.py +152 -0
  157. colemen_py-0.1.0/tests/test_file_stage2.py +107 -0
  158. colemen_py-0.1.0/tests/test_media_stage5.py +125 -0
  159. colemen_py-0.1.0/tests/test_misc_domains.py +37 -0
  160. colemen_py-0.1.0/tests/test_object.py +25 -0
  161. colemen_py-0.1.0/tests/test_public_api.py +18 -0
  162. colemen_py-0.1.0/tests/test_randoms.py +215 -0
  163. colemen_py-0.1.0/tests/test_string.py +21 -0
  164. colemen_py-0.1.0/tests/test_type_guards_stage6.py +47 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,13 @@
1
+ include LICENSE
2
+ include README.md
3
+ include pyproject.toml
4
+ recursive-include docs *.md
5
+ recursive-include src/colemen_py/domains/constants/data *.json *.jsonc *.txt
6
+ recursive-include src/colemen_py/binaries *.exe .gitkeep
7
+ recursive-exclude * __pycache__
8
+ recursive-exclude * *.py[cod]
9
+ recursive-exclude * *.pyo
10
+ recursive-exclude * .pytest_cache
11
+ prune build
12
+ prune dist
13
+ prune src/colemen_py.egg-info
@@ -0,0 +1,122 @@
1
+ Metadata-Version: 2.4
2
+ Name: colemen-py
3
+ Version: 0.1.0
4
+ Summary: A dot-accessible Python utility toolkit for files, directories, media, math conversions, random values, strings, validation, and external tooling.
5
+ Author: Colemen Atwood
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/r146023/colemen_py
8
+ Project-URL: Repository, https://github.com/r146023/colemen_py
9
+ Project-URL: Issues, https://github.com/r146023/colemen_py/issues
10
+ Project-URL: Documentation, https://github.com/r146023/colemen_py/tree/main/docs
11
+ Keywords: utilities,files,directories,media,metadata,math,conversion,strings,validation,automation
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Topic :: Utilities
22
+ Classifier: Typing :: Typed
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: python-dateutil>=2.8.2
27
+ Provides-Extra: image
28
+ Requires-Dist: Pillow>=10; extra == "image"
29
+ Provides-Extra: audio
30
+ Requires-Dist: mutagen>=1.47; extra == "audio"
31
+ Provides-Extra: video
32
+ Requires-Dist: opencv-python>=4.8; extra == "video"
33
+ Provides-Extra: media
34
+ Requires-Dist: Pillow>=10; extra == "media"
35
+ Requires-Dist: mutagen>=1.47; extra == "media"
36
+ Requires-Dist: opencv-python>=4.8; extra == "media"
37
+ Provides-Extra: windows
38
+ Requires-Dist: win32-setctime>=1.1; platform_system == "Windows" and extra == "windows"
39
+ Provides-Extra: dev
40
+ Requires-Dist: pytest>=8; extra == "dev"
41
+ Requires-Dist: pytest-cov>=5; extra == "dev"
42
+ Requires-Dist: ruff>=0.5; extra == "dev"
43
+ Requires-Dist: mypy>=1.10; extra == "dev"
44
+ Requires-Dist: build>=1.2; extra == "dev"
45
+ Requires-Dist: twine>=5; extra == "dev"
46
+ Dynamic: license-file
47
+
48
+ # colemen_py
49
+
50
+ `colemen_py` is a dot-accessible Python utility toolkit rebuilt from the older `colemen_utils` ecosystem.
51
+
52
+ The public API is intentionally discoverable from a single import:
53
+
54
+ ```python
55
+ import colemen_py as c
56
+
57
+ c.file.exists("notes.txt")
58
+ c.string.to_snake_case("Hello World")
59
+ c.rand.uuid()
60
+ ```
61
+
62
+
63
+ ## Installation
64
+
65
+ Base install:
66
+
67
+ ```bash
68
+ pip install colemen-py
69
+ ```
70
+
71
+ Optional feature groups:
72
+
73
+ ```bash
74
+ pip install "colemen-py[image]" # Pillow-backed image helpers
75
+ pip install "colemen-py[audio]" # Mutagen-backed audio metadata helpers
76
+ pip install "colemen-py[video]" # OpenCV-backed video frame scoring helpers
77
+ pip install "colemen-py[media]" # image + audio + video optional dependencies
78
+ pip install "colemen-py[dev]" # test/build/lint tooling
79
+ ```
80
+
81
+ The import package name is still `colemen_py`:
82
+
83
+ ```python
84
+ import colemen_py as c
85
+ ```
86
+
87
+ ## Design principles
88
+
89
+ - One installable package, many internal modules.
90
+ - Dot-accessible namespaces for IDE autocomplete.
91
+ - Pythonic `snake_case` method names, with selected compatibility aliases where useful.
92
+ - Public functions include type hints and docstrings.
93
+ - No expensive work at import time.
94
+ - `str` and `pathlib.Path` are accepted for path-based helpers.
95
+ - Generic file utilities live in `c.file`; media-specific behavior lives in `c.media`.
96
+
97
+ ## Public namespaces
98
+
99
+ ```python
100
+ c.array # list/sequence utilities
101
+ c.list # alias to c.array
102
+ c.object # dictionary/object utilities
103
+ c.dict # alias to c.object
104
+ c.string # string utilities
105
+ c.file # file utilities
106
+ c.dir # directory utilities
107
+ c.directory # alias to c.dir
108
+ c.console # console output/timers
109
+ c.rand # random values/ids
110
+ c.random # alias to c.rand
111
+ c.time # time/duration utilities
112
+ c.type # type checks/coercion
113
+ c.validation # validation helpers
114
+ c.math # math helpers
115
+ c.media # media/binary utilities
116
+ ```
117
+
118
+ ## Stage 1 status
119
+
120
+ This is the foundation package. The old `colemen_utils` source has not been blindly copied in. Instead, the core utility surface has been rebuilt with clean internals and tests.
121
+
122
+ The package can use bundled binaries when present and can also fall back to compatible tools available on `PATH`. Current media wrappers may rely on external executables such as ExifTool, FFmpeg, FFprobe, `colemen_copy`, and Shredator depending on the feature being used.
@@ -0,0 +1,75 @@
1
+ # colemen_py
2
+
3
+ `colemen_py` is a dot-accessible Python utility toolkit rebuilt from the older `colemen_utils` ecosystem.
4
+
5
+ The public API is intentionally discoverable from a single import:
6
+
7
+ ```python
8
+ import colemen_py as c
9
+
10
+ c.file.exists("notes.txt")
11
+ c.string.to_snake_case("Hello World")
12
+ c.rand.uuid()
13
+ ```
14
+
15
+
16
+ ## Installation
17
+
18
+ Base install:
19
+
20
+ ```bash
21
+ pip install colemen-py
22
+ ```
23
+
24
+ Optional feature groups:
25
+
26
+ ```bash
27
+ pip install "colemen-py[image]" # Pillow-backed image helpers
28
+ pip install "colemen-py[audio]" # Mutagen-backed audio metadata helpers
29
+ pip install "colemen-py[video]" # OpenCV-backed video frame scoring helpers
30
+ pip install "colemen-py[media]" # image + audio + video optional dependencies
31
+ pip install "colemen-py[dev]" # test/build/lint tooling
32
+ ```
33
+
34
+ The import package name is still `colemen_py`:
35
+
36
+ ```python
37
+ import colemen_py as c
38
+ ```
39
+
40
+ ## Design principles
41
+
42
+ - One installable package, many internal modules.
43
+ - Dot-accessible namespaces for IDE autocomplete.
44
+ - Pythonic `snake_case` method names, with selected compatibility aliases where useful.
45
+ - Public functions include type hints and docstrings.
46
+ - No expensive work at import time.
47
+ - `str` and `pathlib.Path` are accepted for path-based helpers.
48
+ - Generic file utilities live in `c.file`; media-specific behavior lives in `c.media`.
49
+
50
+ ## Public namespaces
51
+
52
+ ```python
53
+ c.array # list/sequence utilities
54
+ c.list # alias to c.array
55
+ c.object # dictionary/object utilities
56
+ c.dict # alias to c.object
57
+ c.string # string utilities
58
+ c.file # file utilities
59
+ c.dir # directory utilities
60
+ c.directory # alias to c.dir
61
+ c.console # console output/timers
62
+ c.rand # random values/ids
63
+ c.random # alias to c.rand
64
+ c.time # time/duration utilities
65
+ c.type # type checks/coercion
66
+ c.validation # validation helpers
67
+ c.math # math helpers
68
+ c.media # media/binary utilities
69
+ ```
70
+
71
+ ## Stage 1 status
72
+
73
+ This is the foundation package. The old `colemen_utils` source has not been blindly copied in. Instead, the core utility surface has been rebuilt with clean internals and tests.
74
+
75
+ The package can use bundled binaries when present and can also fall back to compatible tools available on `PATH`. Current media wrappers may rely on external executables such as ExifTool, FFmpeg, FFprobe, `colemen_copy`, and Shredator depending on the feature being used.
@@ -0,0 +1,90 @@
1
+ # DirectoryAPI reference
2
+
3
+ `DirectoryAPI` is the dot-access namespace exported as `directory`.
4
+
5
+ ## Public methods
6
+
7
+ | Name | Signature | Purpose |
8
+ |---|---|---|
9
+ | `exists` | `exists(self, path: PathLike)` | Return True if ``path`` exists and is a directory. |
10
+ | `ensure` | `ensure(self, path: PathLike, dir_name: str \| bool=False)` | Create a directory if it does not already exist and return it. |
11
+ | `info` | `info(self, path: PathLike, *, must_exist: bool=True)` | Return a ``DirectoryInfo`` object. |
12
+ | `get_data` | `get_data(self, path: PathLike, *, include: Iterable[str] \| None=None)` | Return legacy-friendly directory data. |
13
+ | `delete` | `delete(self, path: PathLike, *, missing_ok: bool=True, persistent: bool=False)` | Delete a directory recursively. |
14
+ | `empty` | `empty(self, path: PathLike, *, create: bool=True)` | Remove all contents from a directory while keeping the directory itself. |
15
+ | `files` | `files(self, path: PathLike, *, recursive: bool=False, exclude: str \| Iterable[str] \| None=None, include: str \| Iterable[str] \| None=None, extensions: str \| Iterable[str] \| None=None, return_data: bool=False)` | Return files contained by a directory. |
16
+ | `dirs` | `dirs(self, path: PathLike='.', *, recursive: bool=False, exclude: str \| Iterable[str] \| None=None, include: str \| Iterable[str] \| None=None, use_objects: bool=False, paths_only: bool=False)` | Return child directories. |
17
+ | `objects` | `objects(self, path: PathLike='.', *, recursive: bool=True, exclude: str \| Iterable[str] \| None=None, include: str \| Iterable[str] \| None=None)` | Return folders as ``DirectoryInfo`` objects. |
18
+ | `walk` | `walk(self, path: PathLike)` | Yield ``os.walk``-style tuples using POSIX string paths. |
19
+ | `copy` | `copy(self, src: PathLike, dst: PathLike, **kwargs)` | Copy/mirror a directory to another location. |
20
+ | `mirror` | `mirror(self, src: PathLike, dst: PathLike, **kwargs)` | Mirror a directory tree to another location. |
21
+ | `copy_with_colemen_copy` | `copy_with_colemen_copy(self, src: PathLike, dst: PathLike, **kwargs)` | Copy a directory tree through the colemen_copy external engine. |
22
+ | `mirror_with_colemen_copy` | `mirror_with_colemen_copy(self, src: PathLike, dst: PathLike, **kwargs)` | Mirror a directory tree through the colemen_copy external engine. |
23
+ | `move_with_colemen_copy` | `move_with_colemen_copy(self, src: PathLike, dst: PathLike, **kwargs)` | Move a directory tree through the colemen_copy external engine. |
24
+ | `clone_structure` | `clone_structure(self, src: PathLike, dst: PathLike, **kwargs)` | Create a zero-byte skeleton tree through the colemen_copy external engine. |
25
+ | `sync_child_folders` | `sync_child_folders(self, src: PathLike, dst: PathLike, **kwargs)` | Mirror direct child folders through the colemen_copy external engine. |
26
+ | `move` | `move(self, src: PathLike, dst: PathLike, *, overwrite: bool=True)` | Move a directory to another path. |
27
+ | `create_zip` | `create_zip(self, src: PathLike, dst: PathLike \| None=None, *, delete_after: bool=False, overwrite: bool=True, timestamps: bool=True)` | Create a zip archive from a directory. |
28
+ | `by_name` | `by_name(self, dir_name: str \| Iterable[str], search_path: PathLike='.', *, recursive: bool=True, case_sensitive: bool=True, exact_match: bool=True, regex: bool=False)` | Search for directories by name. |
29
+ | `size` | `size(self, path: PathLike)` | Return the total size of contained files in bytes. |
30
+ | `content_hash` | `content_hash(self, path: PathLike)` | Return a hash of contained file paths/sizes/modified times. |
31
+
32
+ ## Common aliases
33
+
34
+ | Canonical | Aliases |
35
+ |---|---|
36
+ | `exists()` | `is_dir()` |
37
+ | `ensure()` | `create()`, `mkdir()` |
38
+ | `info()` | `get_folder()` |
39
+ | `empty()` | `clear()` |
40
+ | `files()` | `get_files()` |
41
+ | `dirs()` | `get_folders()`, `folders()` |
42
+ | `objects()` | `get_folders_obj()` |
43
+ | `copy_with_colemen_copy()` | `copy_tree()`, `engine_copy()` |
44
+ | `mirror_with_colemen_copy()` | `mirror_tree()`, `engine_mirror()` |
45
+ | `move_with_colemen_copy()` | `move_tree()`, `engine_move()` |
46
+ | `clone_structure()` | `clone_structure_with_colemen_copy()` |
47
+ | `sync_child_folders()` | `sync_child_folders_with_colemen_copy()` |
48
+ | `create_zip()` | `zip()` |
49
+ | `by_name()` | `search_by_name()` |
50
+
51
+ ## Practical usage
52
+
53
+ ```python
54
+ # Create folders.
55
+ c.directory.ensure("K:/Archive/Images")
56
+ c.directory.ensure("K:/Archive", dir_name="Images")
57
+
58
+ # Empty a folder but keep the folder.
59
+ c.directory.empty("K:/Archive/_temp")
60
+
61
+ # Delete recursively.
62
+ c.directory.delete("K:/Archive/_old", missing_ok=True)
63
+
64
+ # Inspect.
65
+ info = c.directory.info("K:/Archive")
66
+ print(info.name, info.size, info.content_hash)
67
+
68
+ # Walk.
69
+ for root, dirs, files in c.directory.walk("K:/Archive"):
70
+ print(root, len(dirs), len(files))
71
+ ```
72
+
73
+ ## Local mirror/copy
74
+
75
+ `copy()` is an alias for the local `mirror()` implementation.
76
+
77
+ ```python
78
+ c.directory.copy("K:/Source", "D:/Backup/Source")
79
+ c.directory.mirror("K:/Source", "D:/Backup/Source")
80
+ ```
81
+
82
+ ## External engine copy/mirror/move
83
+
84
+ ```python
85
+ c.directory.copy_with_colemen_copy("K:/Source", "D:/Backup/Source")
86
+ c.directory.mirror_with_colemen_copy("K:/Source", "D:/Backup/Source")
87
+ c.directory.move_with_colemen_copy("K:/Source", "D:/Archive/Source")
88
+ ```
89
+
90
+ These methods require the external `colemen_copy` integration to exist in the full project.
@@ -0,0 +1,140 @@
1
+ # `DirectoryInfo` object
2
+
3
+ `DirectoryInfo` wraps one directory path and provides lazy size/files lookup, timestamps, child folder/file helpers, archive helpers, and external-engine convenience methods.
4
+
5
+ ## Construction
6
+
7
+ ```python
8
+ info = c.directory.info("K:/Archive")
9
+
10
+ from colemen_py.domains.directories import DirectoryInfo
11
+ info = DirectoryInfo("K:/Archive")
12
+ ```
13
+
14
+ ## Public methods
15
+
16
+ | Name | Signature | Purpose |
17
+ |---|---|---|
18
+ | `file_path` | `file_path(self)` | Directory path as a POSIX-style string. |
19
+ | `dir_path` | `dir_path(self)` | Parent directory path as a POSIX-style string. |
20
+ | `name` | `name(self)` | Directory name. |
21
+ | `drive` | `drive(self)` | Drive or anchor for the directory path. |
22
+ | `exists` | `exists(self)` | Return True when the directory exists. |
23
+ | `modified` | `modified(self)` | Directory modified timestamp. |
24
+ | `modified` | `modified(self, value: float \| datetime)` | |
25
+ | `accessed` | `accessed(self)` | Directory accessed timestamp. |
26
+ | `accessed` | `accessed(self, value: float \| datetime)` | |
27
+ | `created` | `created(self)` | Directory created/change timestamp reported by the OS. |
28
+ | `modified_datetime` | `modified_datetime(self)` | Modified timestamp as a ``datetime``. |
29
+ | `accessed_datetime` | `accessed_datetime(self)` | Accessed timestamp as a ``datetime``. |
30
+ | `created_datetime` | `created_datetime(self)` | Created/change timestamp as a ``datetime``. |
31
+ | `modified_mdy` | `modified_mdy(self)` | Modified date formatted as MM-DD-YYYY. |
32
+ | `accessed_mdy` | `accessed_mdy(self)` | Accessed date formatted as MM-DD-YYYY. |
33
+ | `created_mdy` | `created_mdy(self)` | Created/change date formatted as MM-DD-YYYY. |
34
+ | `size` | `size(self)` | Total size of files contained by this directory, in bytes. |
35
+ | `files` | `files(self)` | Immediate child files as ``FileInfo`` objects. |
36
+ | `get_files` | `get_files(self, *, recursive: bool=False, exclude: str \| Iterable[str] \| None=None, include: str \| Iterable[str] \| None=None, extensions: str \| Iterable[str] \| None=None)` | Return files contained by this directory. |
37
+ | `get_dirs` | `get_dirs(self, *, recursive: bool=False, exclude: str \| Iterable[str] \| None=None, include: str \| Iterable[str] \| None=None)` | Return child directories as ``DirectoryInfo`` objects. |
38
+ | `has_file` | `has_file(self, file_name: str)` | Return a matching immediate child file, or False. |
39
+ | `most_recent_modification` | `most_recent_modification(self)` | Most recent modified timestamp among all contained files. |
40
+ | `content_hash` | `content_hash(self)` | Stable-ish hash of contained file paths, sizes, and modified times. |
41
+ | `summary` | `summary(self)` | Legacy-friendly summary dictionary. |
42
+ | `to_dict` | `to_dict(self, include: Iterable[str] \| None=None)` | Return selected directory data as a dictionary. |
43
+ | `create_zip` | `create_zip(self, file_name: str \| None=None, *, delete_after: bool=False, overwrite: bool=True, timestamps: bool=True)` | Create a zip archive from this directory. |
44
+ | `delete` | `delete(self, *, missing_ok: bool=True)` | Delete this directory recursively. |
45
+ | `copy_to` | `copy_to(self, destination: PathLike, **kwargs)` | Copy this directory with the colemen_copy external engine. |
46
+ | `mirror_to` | `mirror_to(self, destination: PathLike, **kwargs)` | Mirror this directory with the colemen_copy external engine. |
47
+ | `move_to` | `move_to(self, destination: PathLike, **kwargs)` | Move this directory with the colemen_copy external engine. |
48
+ | `clone_structure_to` | `clone_structure_to(self, destination: PathLike, **kwargs)` | Create a zero-byte skeleton of this directory with colemen_copy. |
49
+ | `sync_child_folders_to` | `sync_child_folders_to(self, destination: PathLike, **kwargs)` | Mirror this directory's direct child folders with colemen_copy. |
50
+ | `shred` | `shred(self, *, passes: int=3, pattern: str='random', force: bool=True, zero_names: bool=False, strict_warnings: bool=False, missing_ok: bool=True, verify: bool=True, timeout: float \| None=None, binary_path: PathLike \| None=None)` | Securely delete this directory through the Shredator external engine. |
51
+
52
+ ## Core properties
53
+
54
+ ```python
55
+ info.file_path # POSIX-style directory path
56
+ info.dir_path # parent directory path
57
+ info.name # directory name
58
+ info.drive # drive or anchor
59
+ info.exists # True if directory exists
60
+ info.size # recursive byte size of contained files
61
+ info.content_hash # sha256 hash of file paths/sizes/modified times
62
+ info.summary # dictionary
63
+ ```
64
+
65
+ ## Timestamps
66
+
67
+ ```python
68
+ info.modified
69
+ info.accessed
70
+ info.created
71
+
72
+ info.modified_datetime
73
+ info.accessed_datetime
74
+ info.created_datetime
75
+
76
+ info.modified_mdy
77
+ info.accessed_mdy
78
+ info.created_mdy
79
+ ```
80
+
81
+ `modified` and `accessed` are writable through `os.utime()`:
82
+
83
+ ```python
84
+ from datetime import datetime
85
+
86
+ info.modified = datetime(2024, 6, 1, 12, 0, 0)
87
+ info.accessed = 1717243200.0
88
+ ```
89
+
90
+ ## Files and child folders
91
+
92
+ ```python
93
+ # Immediate child files cached on first access.
94
+ files = info.files
95
+
96
+ # Explicit scans.
97
+ all_images = info.get_files(recursive=True, extensions="image")
98
+ child_dirs = info.get_dirs(recursive=False)
99
+ ```
100
+
101
+ `has_file()` checks immediate child files by exact file name or by stem when no extension is provided:
102
+
103
+ ```python
104
+ match = info.has_file("notes.txt")
105
+ match = info.has_file("notes")
106
+
107
+ if match:
108
+ print(match.file_path)
109
+ ```
110
+
111
+ ## Most recent modification
112
+
113
+ ```python
114
+ latest = info.most_recent_modification
115
+ ```
116
+
117
+ This returns the newest modified timestamp among the directory itself and all contained files.
118
+
119
+ ## Dictionary output
120
+
121
+ ```python
122
+ info.to_dict()
123
+ info.to_dict(["file_path", "name", "size"])
124
+ info.data_as_dict()
125
+ ```
126
+
127
+ ## Operations
128
+
129
+ ```python
130
+ info.create_zip()
131
+ info.delete()
132
+ info.copy_to("D:/Backup/Archive")
133
+ info.mirror_to("D:/Mirror/Archive")
134
+ info.move_to("D:/ArchiveMoved")
135
+ info.clone_structure_to("D:/Skeleton/Archive")
136
+ info.sync_child_folders_to("D:/BackupChildren")
137
+ info.shred()
138
+ ```
139
+
140
+ The external-engine methods call `colemen_copy` or Shredator integrations when available.