turbopipe 1.0.0__cp39-cp39-macosx_11_0_arm64.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.

Potentially problematic release.


This version of turbopipe might be problematic. Click here for more details.

turbopipe/__init__.py ADDED
@@ -0,0 +1,41 @@
1
+ from io import IOBase
2
+
3
+ from moderngl import Buffer
4
+
5
+ from turbopipe import _turbopipe
6
+
7
+
8
+ def pipe(buffer: Buffer, file: IOBase) -> None:
9
+ """
10
+ Pipe the content of a moderngl.Buffer to a file descriptor,
11
+ Fast, threaded and non-blocking. Call `sync()` when done!
12
+
13
+ Usage:
14
+ ```python
15
+ # Assuming `buffer = ctx.buffer(...)`
16
+ # Note: Use as `fbo.read_into(buffer)`
17
+
18
+ # As a open() file
19
+ with open("file.bin", "wb") as file:
20
+ turbopipe.pipe(buffer, file)
21
+
22
+ # As a subprocess
23
+ child = subprocess.Popen(..., stdin=subprocess.PIPE)
24
+ turbopipe.pipe(buffer, child.stdin.fileno())
25
+ ```
26
+ """
27
+ _turbopipe.pipe(buffer.mglo, file)
28
+
29
+ def sync() -> None:
30
+ """Waits for all jobs to finish"""
31
+ _turbopipe.sync()
32
+
33
+ def close() -> None:
34
+ """Syncs and deletes objects"""
35
+ _turbopipe.close()
36
+
37
+ __all__ = [
38
+ "pipe",
39
+ "sync",
40
+ "close"
41
+ ]
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Gabriel Tremeschin
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,34 @@
1
+ Metadata-Version: 2.1
2
+ Name: turbopipe
3
+ Version: 1.0.0
4
+ Summary: 🌀 Faster ModernGL Buffer inter process data transfers
5
+ Home-page: https://brokensrc.dev
6
+ Author-Email: Tremeschin <29046864+Tremeschin@users.noreply.github.com>
7
+ License: MIT License
8
+
9
+ Copyright (c) 2024 Gabriel Tremeschin
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
28
+ Project-URL: Issues, https://github.com/BrokenSource/TurboPipe/issues
29
+ Project-URL: Repository, https://github.com/BrokenSource/TurboPipe
30
+ Project-URL: Documentation, https://github.com/BrokenSource/TurboPipe
31
+ Project-URL: Homepage, https://brokensrc.dev
32
+ Requires-Python: >=3.7
33
+ Requires-Dist: moderngl
34
+ Description-Content-Type: text/markdown
@@ -0,0 +1,6 @@
1
+ turbopipe/_turbopipe.cpython-39-darwin.so,sha256=ir2KHNFm9SQVqil-T_amnHyMrWXPhwHkkmppBxNJrY4,126848
2
+ turbopipe/__init__.py,sha256=M8IwBGd_kGaL8JEUygsg_w_m1QWT7O9r0ImCvVjTAko,920
3
+ turbopipe-1.0.0.dist-info/License.md,sha256=it5BPGKEP68XuUE54o2wVWR8NeWowkvb5dQO62UPeo8,1075
4
+ turbopipe-1.0.0.dist-info/RECORD,,
5
+ turbopipe-1.0.0.dist-info/WHEEL,sha256=rFEbl7VGpdcTiWMLyPHKRieKvxwiToMCxVXFuj50F_A,91
6
+ turbopipe-1.0.0.dist-info/METADATA,sha256=ySIKauflXJw0WGBG9-MLAPGqkKiPP3j8xDT4H-3e1KQ,1807
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: meson
3
+ Root-Is-Purelib: false
4
+ Tag: cp39-cp39-macosx_11_0_arm64