envsub 0.1.15__cp313-none-win32.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.
envsub/__init__.py ADDED
@@ -0,0 +1,2 @@
1
+ from .envsub import sub
2
+ __all__ = ["sub"]
envsub/__main__.py ADDED
@@ -0,0 +1,17 @@
1
+ import sys
2
+ from .envsub import sub
3
+
4
+
5
+ def main():
6
+ cnt = 0
7
+ while True:
8
+ cnt += 1
9
+ res = sub(sys.stdin).read()
10
+ if not res:
11
+ return
12
+ else:
13
+ print(res, end="")
14
+
15
+
16
+ if __name__ == "__main__":
17
+ main()
Binary file
envsub/envsub.pyi ADDED
@@ -0,0 +1,12 @@
1
+ """Pyo3 binding interface definition."""
2
+
3
+ from typing import TextIO
4
+
5
+
6
+ def sub(downstream: TextIO) -> TextIO:
7
+ """
8
+ Replace all the envar from a downstream and return an upstream.
9
+
10
+ :downstream: A file-like object that provides text input.
11
+ :return: A file-like object with environment variables replaced.
12
+ """
envsub/py.typed ADDED
File without changes
@@ -0,0 +1,32 @@
1
+ Metadata-Version: 2.3
2
+ Name: envsub
3
+ Version: 0.1.15
4
+ Classifier: License :: OSI Approved :: MIT License
5
+ Classifier: Programming Language :: Python :: 3
6
+ Classifier: Programming Language :: Rust
7
+ License-File: LICENSE
8
+ Summary: A text preprocessing tool with environment variable substitution.
9
+ Keywords: environment,substitution,variables
10
+ Author: Guillaume Gauvrit <guillaume@gauvr.it>
11
+ Author-email: Guillaume Gauvrit <guillaume@gauvr.it>
12
+ License: BSD-3-Clause
13
+ Requires-Python: >=3.9
14
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
15
+
16
+ # envsub
17
+
18
+ **envsub** is a text preprocessing tool that performs environment variable
19
+ substitution in files, with support for default values. Written in Rust and
20
+ callable from Python, it provides a fast and reliable way to inject environment
21
+ variables into text files during runtime.
22
+
23
+ ## Features
24
+
25
+ - Environment variable substitution in any text file.
26
+ - Support for default values when environment variables are missing.
27
+ - Fast performance with Rust under the hood, accessible from Python.
28
+
29
+ ## Installation
30
+
31
+ This project is currently under development 🚧 and has not been released yet
32
+
@@ -0,0 +1,10 @@
1
+ envsub-0.1.15.dist-info/METADATA,sha256=B7t8-Zmq9cG7gJoQMWeGiYZivONfzu0RFCuAwMJSMk0,1150
2
+ envsub-0.1.15.dist-info/WHEEL,sha256=WfGDYcfyrwHJGrJdYOfcTSq__NLnyswWxmOIqe7ZQM0,91
3
+ envsub-0.1.15.dist-info/entry_points.txt,sha256=g12l_7WuetC36PiIyzLD2yY0bMu0WGCwrgUbRga0YdY,36
4
+ envsub-0.1.15.dist-info/licenses/LICENSE,sha256=ndl0A-csaxD-pOZma-CPGYYr33zQKkwH_4nPgbYlAJw,1546
5
+ envsub/envsub.pyi,sha256=Gyes_TF_20u2dtefaPQ-FW91XXFw0Jb3RlBRruPla4k,337
6
+ envsub/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ envsub/__init__.py,sha256=oHm19ZyDSTH3dyjlXTPauesql6c5gJUBoKfTRf3nGt8,44
8
+ envsub/__main__.py,sha256=dzr4SF-je2r-d13Tveih_EMByovfK-THzbf3_wnUBJA,271
9
+ envsub/envsub.cp313-win32.pyd,sha256=PWTkbiCMiGreq72XLORdIyqmq9ZgbZN5oAUFA5hTy30,236544
10
+ envsub-0.1.15.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.7.4)
3
+ Root-Is-Purelib: false
4
+ Tag: cp313-none-win32
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ envsub=envsub:sub
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2024, Guillaume Gauvrit
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ * Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ * Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ * Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.