Name | vbrpytools JSON |
Version |
3.2.0.post0
JSON |
| download |
home_page | None |
Summary | Package grouping functions that I'm using in multiple places |
upload_time | 2025-01-12 17:02:43 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | MIT License
Copyright (c) 2024 Vincent Brettnacher
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
keywords |
development
personal
tools
utilities
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<font size="8">vbrpytools</font>
vbrpytools is a Python library of general functions that I use in all my other packages.
- [Install Package](#install-package)
- [Use Package](#use-package)
- [misctools](#misctools)
- [dicjsontools](#dicjsontools)
- [exceltojson](#exceltojson)
- [License](#license)
# Install Package
```bash
pip install vbrpytools
```
# Use Package
Functions are grouped in the following modules:
## misctools
Support library to ease development
* verbose management
* progress bar display
* open with file preservation
* input argument management
* command line execution
* Handling stdout encoding to match PYTHONIOENCODING envvar (needed when bundling python script in a exe)
```python
from vbrpytools import misctools
# decorator to manage verbose & display execution information
@misctools.with_verbose
# Call in a loop to create terminal progress bar or revolving character
misctools.iterate_and_display_progress(iterable)
# Make a copy of an existing file before opening it in write mode + enforce encoding to UTF-8 by default
misctools.open_preserve(filename)
# all-in-one argument definition, parse & read
misctools.get_args(arg_defs)
# Yields successive chunks from a list until all is parsed
misctools.divide_list(list, size)
# Put the input string in the clipboard
misctools.copy_to_clipboard(string)
# If program is running in piping mode enforce stdout encoding to PYTHONIOENCODING.
misctools.force_stdout_encoding()
# Execute a command line in a separate subprocess and return the STD OUT
misctools.execute_cmd(cmd)
# Ask a yes/no question via and return answer.
misctools.query_yes_no(question)
# Transform a string into a date, trying to decode it.
misctools.parse_str_date(string)
```
## dicjsontools
Support library to ease dict & JSON management:
* dictionary manipulation (extraction, merge, ...)
* json file load, save, update
```python
from vbrpytools import dicjsontools
# Retrieve a subdict of a given dic "master" key
dicjsontools.sub_dict(dic, key, subkeys)
# merges 2 dictionaries, dict_b into dict_a
dicjsontools.merge_dict(dic_a, dic_b, options)
# Creates a dic from a list of key by nesting them
dicjsontools.create_nested_dict(keys, last_key_val)
# transform all relevant dictionary keys from string to integer
dicjsontools.dict_keys_to_int(dic)
# Load a json file into a dictionary with key conversion
dicjsontools.load_json_file(filename)
# Append a json dictionary to an existing json file
dicjsontools.append_json_file(filename, dic)
# Dump a dictionary in a json file
dicjsontools.save_json_file(dic, filename)
```
## exceltojson
Open an excel file table and save it as a json file
Available as executable script.
```bash
exceltojson *args*
python -m exceltojson *args*
```
# License
ref: [LICENSE](.\LICENSE)
`vbrpytools` is distributed under the terms of MIT.
Raw data
{
"_id": null,
"home_page": null,
"name": "vbrpytools",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "development, personal, tools, utilities",
"author": null,
"author_email": "Vincent Brettnacher <vincent.brettnacher@veoneer.com>",
"download_url": "https://files.pythonhosted.org/packages/6f/ca/086919f897511fe17dc772d4d25b4baa928311a9c556e385274ea4c38849/vbrpytools-3.2.0.post0.tar.gz",
"platform": null,
"description": "<font size=\"8\">vbrpytools</font>\n\nvbrpytools is a Python library of general functions that I use in all my other packages.\n\n- [Install Package](#install-package)\n- [Use Package](#use-package)\n - [misctools](#misctools)\n - [dicjsontools](#dicjsontools)\n - [exceltojson](#exceltojson)\n- [License](#license)\n\n# Install Package\n\n```bash\npip install vbrpytools\n```\n\n# Use Package\n\nFunctions are grouped in the following modules:\n\n## misctools\n\nSupport library to ease development\n* verbose management\n* progress bar display\n* open with file preservation\n* input argument management\n* command line execution\n* Handling stdout encoding to match PYTHONIOENCODING envvar (needed when bundling python script in a exe)\n\n```python\nfrom vbrpytools import misctools\n\n# decorator to manage verbose & display execution information\n@misctools.with_verbose\n\n# Call in a loop to create terminal progress bar or revolving character\nmisctools.iterate_and_display_progress(iterable)\n\n# Make a copy of an existing file before opening it in write mode + enforce encoding to UTF-8 by default\nmisctools.open_preserve(filename)\n\n# all-in-one argument definition, parse & read\nmisctools.get_args(arg_defs)\n\n# Yields successive chunks from a list until all is parsed\nmisctools.divide_list(list, size)\n\n# Put the input string in the clipboard\nmisctools.copy_to_clipboard(string)\n\n# If program is running in piping mode enforce stdout encoding to PYTHONIOENCODING.\nmisctools.force_stdout_encoding()\n\n# Execute a command line in a separate subprocess and return the STD OUT\nmisctools.execute_cmd(cmd)\n\n# Ask a yes/no question via and return answer.\nmisctools.query_yes_no(question)\n\n# Transform a string into a date, trying to decode it.\nmisctools.parse_str_date(string)\n```\n\n## dicjsontools\n\nSupport library to ease dict & JSON management:\n* dictionary manipulation (extraction, merge, ...)\n* json file load, save, update\n\n```python\nfrom vbrpytools import dicjsontools\n\n# Retrieve a subdict of a given dic \"master\" key\ndicjsontools.sub_dict(dic, key, subkeys)\n\n# merges 2 dictionaries, dict_b into dict_a\ndicjsontools.merge_dict(dic_a, dic_b, options)\n\n# Creates a dic from a list of key by nesting them\ndicjsontools.create_nested_dict(keys, last_key_val)\n\n# transform all relevant dictionary keys from string to integer\ndicjsontools.dict_keys_to_int(dic)\n\n# Load a json file into a dictionary with key conversion\ndicjsontools.load_json_file(filename)\n\n# Append a json dictionary to an existing json file\ndicjsontools.append_json_file(filename, dic)\n\n# Dump a dictionary in a json file\ndicjsontools.save_json_file(dic, filename)\n```\n\n## exceltojson\n\nOpen an excel file table and save it as a json file\nAvailable as executable script.\n\n```bash\nexceltojson *args*\npython -m exceltojson *args*\n```\n\n# License\n\nref: [LICENSE](.\\LICENSE)\n`vbrpytools` is distributed under the terms of MIT.",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2024 Vincent Brettnacher\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "Package grouping functions that I'm using in multiple places",
"version": "3.2.0.post0",
"project_urls": {
"Documentation": "https://github.com/vbrett/vbrpytools/blob/master/README.md",
"Issues": "https://github.com/vbrett/vbrpytools/issues",
"Repository": "https://github.com/vbrett/vbrpytools.git",
"source": "https://github.com/vbrett/vbrpytools"
},
"split_keywords": [
"development",
" personal",
" tools",
" utilities"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "197f9b93ad5bce9ce0c10e3e8a9214332fa30cda2bc2ef7494eea70d512548f6",
"md5": "24d9b151a5492c94c85296b618c166b0",
"sha256": "f984f3eed2eec639895ce494d23a67a22fedf28ad0ea792c7c2ff9d430e82e6a"
},
"downloads": -1,
"filename": "vbrpytools-3.2.0.post0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "24d9b151a5492c94c85296b618c166b0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 14631,
"upload_time": "2025-01-12T17:02:40",
"upload_time_iso_8601": "2025-01-12T17:02:40.524504Z",
"url": "https://files.pythonhosted.org/packages/19/7f/9b93ad5bce9ce0c10e3e8a9214332fa30cda2bc2ef7494eea70d512548f6/vbrpytools-3.2.0.post0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "6fca086919f897511fe17dc772d4d25b4baa928311a9c556e385274ea4c38849",
"md5": "a839307807b68a55d941352f467bbc00",
"sha256": "af4b7b0115d8f9a13cc322390145b2bb95f80b92f26db28958df41067f3f4d77"
},
"downloads": -1,
"filename": "vbrpytools-3.2.0.post0.tar.gz",
"has_sig": false,
"md5_digest": "a839307807b68a55d941352f467bbc00",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 13957,
"upload_time": "2025-01-12T17:02:43",
"upload_time_iso_8601": "2025-01-12T17:02:43.094963Z",
"url": "https://files.pythonhosted.org/packages/6f/ca/086919f897511fe17dc772d4d25b4baa928311a9c556e385274ea4c38849/vbrpytools-3.2.0.post0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-12 17:02:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "vbrett",
"github_project": "vbrpytools",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "vbrpytools"
}