Name | byte-decoder JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | A simple Python library for decoding bytes |
upload_time | 2024-10-18 22:50:31 |
maintainer | None |
docs_url | None |
author | Muhammad Daffa |
requires_python | >=3.7 |
license | MIT License Copyright (c) 2024 Muhammad Daffa 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 |
bytes
decoder
utility
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Byte Decoder
A simple Python Library for decoding bytes into various data types.
## Installation
```bash
pip install byte-decoder
```
## Usage
```python
from byte_decoder import ByteDecoder
decoder = ByteDecoder()
# Decode to integer
int_value = decoder.decode_to_int(b'\x00\0f')
print(int_value) # output: 15
# Decode to string
string_value = decoder.decode_to_string(b'Hello')
print(string_value) # Output: 'Hello'
# Decode to float
float_value = decoder.decode_to_float(b'@I\x0f\xdb')
print(float_value) # Output: 3.14159
# Decode to list
list_value = decoder.decode_to_list(b'\x01\x02\x03\x04', 2)
print(list_value) # Output: [b'\x01\x02', b'\x03\x04']
```
## License
This Project is licensed under the MIT License - see the LICENSE file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "byte-decoder",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "bytes, decoder, utility",
"author": "Muhammad Daffa",
"author_email": "Muhammad Daffa <mdaffa2301@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/58/7b/066c915cc37b62c5dc35786029c40330b3b80a9db4662de9b12726ad3820/byte_decoder-0.1.0.tar.gz",
"platform": null,
"description": "# Byte Decoder\n\nA simple Python Library for decoding bytes into various data types.\n\n## Installation\n\n```bash\npip install byte-decoder\n```\n\n## Usage\n\n```python\nfrom byte_decoder import ByteDecoder\n\ndecoder = ByteDecoder()\n\n# Decode to integer\nint_value = decoder.decode_to_int(b'\\x00\\0f')\nprint(int_value) # output: 15\n\n# Decode to string\nstring_value = decoder.decode_to_string(b'Hello')\nprint(string_value) # Output: 'Hello'\n\n# Decode to float\nfloat_value = decoder.decode_to_float(b'@I\\x0f\\xdb')\nprint(float_value) # Output: 3.14159\n\n# Decode to list\nlist_value = decoder.decode_to_list(b'\\x01\\x02\\x03\\x04', 2)\nprint(list_value) # Output: [b'\\x01\\x02', b'\\x03\\x04']\n```\n\n## License\n\nThis Project is licensed under the MIT License - see the LICENSE file for details.\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Muhammad Daffa 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. ",
"summary": "A simple Python library for decoding bytes",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/dap23/byte_decoder"
},
"split_keywords": [
"bytes",
" decoder",
" utility"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2e3a1551bf90471c293fe5177ad31b78a30362aa5922cdef4817958d999b3a43",
"md5": "ff43adb414bd6e23a90b396c048b369a",
"sha256": "7ccedfd36d57261bd9dc71cc4a93b788b6ffa750d1552df8eb63a81e9085ed37"
},
"downloads": -1,
"filename": "byte_decoder-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ff43adb414bd6e23a90b396c048b369a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 3679,
"upload_time": "2024-10-18T22:50:29",
"upload_time_iso_8601": "2024-10-18T22:50:29.836099Z",
"url": "https://files.pythonhosted.org/packages/2e/3a/1551bf90471c293fe5177ad31b78a30362aa5922cdef4817958d999b3a43/byte_decoder-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "587b066c915cc37b62c5dc35786029c40330b3b80a9db4662de9b12726ad3820",
"md5": "b72dbd90ab1b3aec215252d49caa3ea2",
"sha256": "0358630e792b4c94a30f19ca03c97f24124f03eeaf3c9c273f8bdfb34eb822b2"
},
"downloads": -1,
"filename": "byte_decoder-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "b72dbd90ab1b3aec215252d49caa3ea2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 3365,
"upload_time": "2024-10-18T22:50:31",
"upload_time_iso_8601": "2024-10-18T22:50:31.854969Z",
"url": "https://files.pythonhosted.org/packages/58/7b/066c915cc37b62c5dc35786029c40330b3b80a9db4662de9b12726ad3820/byte_decoder-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-18 22:50:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dap23",
"github_project": "byte_decoder",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "byte-decoder"
}