{"id":30855451,"url":"https://github.com/davix3f/hexdutils","last_synced_at":"2025-09-07T11:06:43.723Z","repository":{"id":57437245,"uuid":"142713436","full_name":"davix3f/hexdutils","owner":"davix3f","description":"Small Python lib for operations with hexadecimals","archived":false,"fork":false,"pushed_at":"2022-08-06T00:45:21.000Z","size":37,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-21T10:54:46.653Z","etag":null,"topics":["hexadecimal","hexadecimal-converter","library","python-library","python-module","python2","python3","utility"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davix3f.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-28T22:12:28.000Z","updated_at":"2022-08-06T00:45:24.000Z","dependencies_parsed_at":"2022-09-11T02:50:37.643Z","dependency_job_id":null,"html_url":"https://github.com/davix3f/hexdutils","commit_stats":null,"previous_names":["davix3f/hexutils"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davix3f/hexdutils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davix3f%2Fhexdutils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davix3f%2Fhexdutils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davix3f%2Fhexdutils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davix3f%2Fhexdutils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davix3f","download_url":"https://codeload.github.com/davix3f/hexdutils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davix3f%2Fhexdutils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274026718,"owners_count":25209740,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hexadecimal","hexadecimal-converter","library","python-library","python-module","python2","python3","utility"],"created_at":"2025-09-07T11:06:42.325Z","updated_at":"2025-09-07T11:06:43.698Z","avatar_url":"https://github.com/davix3f.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# hexdutils\n[![PyPI version](https://img.shields.io/pypi/v/hexdutils.svg)](https://pypi.python.org/pypi/hexdutils/)\n[![GitHub license](https://img.shields.io/github/license/davix3f/hexdutils.svg)](https://github.com/davix3f/hexdutils/blob/master/README.md)\n\n**hexdutils** is a small but useful Python library to deal with hexadecimals.\nInt to hex, hex to int, text-to-hex, operations between hex.\n\nThe code is in **dev** branch.\n\n## Usage\n\nFunction names are very clear by themselves, but here's a guide.\n\n### intohex (`int` number, [`bool` hex_prefix, `bool`uppercase])\n  Returns a the hex value of a number as a string.\n  * **Arguments**:\n    * **Mandatory**:\n      * `int` number: the integer to convert;\n    * **Optional**:\n      * `bool` hex_prefix: adds \"0x\" at the beginning of the output, like the native `hex` Python function. Set as *False* by default;\n      * `bool` uppercase: every letter in the output is uppercased. Set as *False* by default;\n\n### hextoint (`str` target)\n  Returns the value of an hex as an integer.\n  * **Arguments**:\n    * **Mandatory**:\n      * `str` target: the hex value to convert. Accepts also \"0x\" values;\n\n### abctohex (`str` target, `str` conversion, [`bool` verbose, `bool`|`str` prefix, `bool`|`str` individual_prefix])\n  Returns text converted in hex. Randomization available.\n  * **Arguments**\n    * **Mandatory**:\n      * `str` target: text to convert;\n    * **Optional**:\n      * `str` conversion: the letter values to be used. \"alphabet\" uses the position of each letter in the alphabet to assign an integer value (e.g a=1, b=2, etc.). \"ord\" uses the result of `ord(letter)` (e.g `ord(\"a\") = 97`). Set as *\"ord\"* by default:\n      * `bool` verbose: if *True*, some additional logs will\n      be printed. Set as *False* by default\n      * `bool`|`str` prefix: if set as *True*, the \"0x\" prefix\n      will be added to the output. Also, you can type a custom\n      prefix and it will be added. Set as *False* by default.\n      * `bool`|`str` individual_prefix: if set only as True,\n      each hex value in the output will have the \"0x\" prefix.\n      Like `prefix`, you can set this value to a custom prefix string, and use it instead of \"0x\". **Requires `prefix=True` to work**.\n      Set as *False* by default\n\n### hextoabc (`str` target)\n  * **Arguments**:\n      * **Mandatory**:\n         * `str` target: hex value to convert to text.\n\n### Operations\n\n|   Function\t|  Operator \t|\n|:-:\t         |:-:\t|\n|**hex_add**     |  +   |\n|**hex_subtract**|  -   |\n|**hex_multiply**|  *   |\n|**hex_divide**  |  /   |\n|**hex_floor**   |  //  |\n|**hex_mod**     |  %   |\n|**hex_power**   |  **  |\n\n Usage: `operation(\u003cstr\u003evalue_one, \u003cstr\u003evalue_two, [\u003cbool\u003ehex_output, \u003cbool\u003ehex_output_prefix. \u003cbool\u003ehex_output_upper])`\n\n The arguments for those functions are all the same:\n  * **Mandatory**:\n    - `str`  value\\_one;\n    - `str`  value\\_two;\n    - `bool` hex_output: if set as True, the operation result will be returned as an hex value. If set as False, an integer will be returned;\n\n  * **Optional**:\n    - `bool` hex\\_output\\_prefix: If set as True, adds \"0x\" at the beginning of the output. Set as *False* by default;\n    - `bool` hex\\_output\\_upper: If set as True, every letter in the output is uppercased. Set as *False* by default;\n\n\n## The module is not working as it should\nOpen an issue 🆘\n\n## I fixed something or I'd like to contribute\nOpen a pull request 📥\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavix3f%2Fhexdutils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavix3f%2Fhexdutils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavix3f%2Fhexdutils/lists"}