{"id":15678278,"url":"https://github.com/siznax/khnum","last_synced_at":"2025-05-07T02:28:55.397Z","repository":{"id":62574167,"uuid":"204050414","full_name":"siznax/khnum","owner":"siznax","description":"The god of human readable numbers","archived":false,"fork":false,"pushed_at":"2019-10-18T16:45:29.000Z","size":8,"stargazers_count":13,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T02:28:47.758Z","etag":null,"topics":["formatter","human","human-readable-numbers","numbers","python","readability"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siznax.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":"2019-08-23T18:28:03.000Z","updated_at":"2025-04-30T12:46:03.000Z","dependencies_parsed_at":"2022-11-03T18:41:41.535Z","dependency_job_id":null,"html_url":"https://github.com/siznax/khnum","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siznax%2Fkhnum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siznax%2Fkhnum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siznax%2Fkhnum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siznax%2Fkhnum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siznax","download_url":"https://codeload.github.com/siznax/khnum/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252801233,"owners_count":21806279,"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","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":["formatter","human","human-readable-numbers","numbers","python","readability"],"created_at":"2024-10-03T16:19:32.240Z","updated_at":"2025-05-07T02:28:55.350Z","avatar_url":"https://github.com/siznax.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"khnum 𓎹𓃝\n==========\n\n\u003ca href=\"https://en.wikipedia.org/wiki/Khnum\"\u003e\u003cimg\n alt=\"Khnum image\" align=\"right\"\n src=\"https://upload.wikimedia.org/wikipedia/commons/5/5e/Khnum.svg\"\u003e\u003c/a\u003e\n\nthe god of human readable numbers\n\n\nInstall\n-------\n\n```\npip install khnum\n𓎹𓃝\n```\n\nUsage\n-----\n\n```\nimport khnum\n```\n\nExamples\n--------\n\n```\n\u003e\u003e\u003e khnum.cnum(1234567890)\n'1,234,567,890'\n```\n\n```\n\u003e\u003e\u003e khnum.hnum(1234567890)\n'1.2B'\n```\n\n```\n\u003e\u003e\u003e khnum.hnum(1234567890, 'bytes')\n'1.2GB'\n```\n\n```\n\u003e\u003e\u003e khnum.hnum(1234567890, 'si')\n'1.1GiB'\n```\n\n```\n\u003e\u003e\u003e num = khnum.num(1234567890, 'b')\n\u003e\u003e\u003e print(num)\n{\n    \"_num\": 1234567890,\n    \"cnum\": \"1,234,567,890\",\n    \"hnum\": \"1.2GB\",\n    \"line\": \"1.2GB (1,234,567,890)\",\n    \"type\": \"\u003cclass 'int'\u003e\",\n    \"units\": \"b\"\n}\n```\n\n\nHelp\n----\n\n```\n$ pydoc khnum\n```\n\n```\n\u003e\u003e\u003e help(khnum)\n```\n\n\nTest\n----\n\n```\n$ pytest\n```\n\n\nContributors\n------------\n\n* [Fred Cirera](https://stackoverflow.com/questions/1094841/reusable-library-to-get-human-readable-version-of-file-size)\n\n\n@siznax\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiznax%2Fkhnum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiznax%2Fkhnum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiznax%2Fkhnum/lists"}