SerialPy 0.1.0
Precision Data Format Manager · Report Bug · Request Feature
Table of Contents
About The Project
SerialPy is a Python package designed to streamline search and replace operations on data formats: yaml, toml, and json.
Built to use with additional shell scripting to semi-automate workflows involving OpenAPI and Swagger files, making it ideal for companies aiming to maintain consistency within their specification sheets.
Features include search and replace, allowing for precise control of serial data. SerialPy empowers users to ensure accuracy and reliability, making it an invaluable tool for specification sheet maintenance.
Getting Started
Installation
Simply run:
pip install SerialPy
Usage
Serialpy supports the -h flag at the main and all subcommands so more details can be found there.
Command-Line Interface (CLI)
Search for any key within the data in the given file path that is "test" and return a list of values associated with the key.
serialpy search path/to/file "test" --find="key" --ret="value"
Replace any instance of "var1" from the data in the given file path to "var2" and return True if successfully written back to the file.
serialpy replace path/to/file "var1" "var2"
Library
Import the module at the top of your python script.
The following snippet of code runs search on all values in "path/to/file" for 5 and returns all keys associated with the value, 5.
The next line checks to see if the replace function successfully converted all instances of 5 in "path/to/file" with 6 and wrote the changes back into the file.
from serialpy import search, replace
found = search.values("path/to/file", "5", "keys") # add False as last argument to disable console printing
if (replace.all("path/to/file", "5", "6"):
# code to run after successfully replacing 5 with 6
Tasks
- Add
replacefeature - Add support for
.toml - Update README.md
-
searchandreplacecontained within aCerealobject that stores serial data - Add support for multiple documents at once
- Add project parser to automatically insert supported file types
See the open issues for a full list of issues and proposed features.
Contributing
- Fork the Project
- Create your Feature/Update Branch (
git checkout -b feature/NewFeatureorgit checkout -b update/Feature) - Commit your Changes (
git commit -m 'Add some Feature') - Push to the Branch (
git push origin feature/NewFeatureorgit push origin update/Feature) - Open a Pull Request
License
Distributed under the GPL-3.0 License. See LICENSE.txt for more information.
Contact
Michael Montanaro - LinkedIn - mcmontanaro01@gmail.com
Project Link: https://github.com/montymi/SerialPy
Acknowledgments
Metadata
Release files for SerialPy 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| SerialPy-0.1.0.tar.gz | 46.4 kB | Without provenance | Details for SerialPy-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| SerialPy-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for SerialPy-0.1.0-py3-none-any.whl |
Total release size: 79.4 kB
Release files / SerialPy-0.1.0.tar.gz
| Download URL | SerialPy-0.1.0.tar.gz |
|---|---|
| Size | 46.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4c45ca18203064983857d2f5c6a9aca8a2a9db72c2ba68d4f190a9a5c9eae5f
|
|
BLAKE2b-256 checksum How to use checksums |
619bd23d2871fe97f499923247158642a2734c58e3e18067abfb5d7c5486d8af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / SerialPy-0.1.0-py3-none-any.whl
| Download URL | SerialPy-0.1.0-py3-none-any.whl |
|---|---|
| Size | 32.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a7f39a13ba54057f9593d56060171c1f42d003cea43100fc8b6e8a39e4964d5d
|
|
BLAKE2b-256 checksum How to use checksums |
a64fd823283c78e5547b73d32f2abbc64dfbeb169f4a887f0b3a1fcdacc680a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for SerialPy 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.