# random_names
Convert int to random name, like tree_dance and convert it back to same int.
Like [git-name](https://pypi.org/project/git-name/) which converts hashes to memorable names and back.
Also like the [Mnemonic Major System](https://en.wikipedia.org/wiki/Mnemonic_major_system) which converts
strings of numbers it phrases to aid in memorization, implemented here [mnemonic-major-encoder](https://pypi.org/project/mnemonic-major-encoder/)
In action here: https://major-system.info/en/
Usage
-----
```
from random_names.make_names import number_to_name,number_from_name
# TODO: needs a user specified separator
name = number_to_name(100,"prefix","q")
print(name) # prefix_q_activated
number = number_from_name(name)
assert number==100
```
# Why
Lets say that your users need to type in a long number, 48342342. It would be easier to
type in tree_dance. But your app still needs that number, so you need to convert it
back. This is similar to [docker container names](https://github.com/moby/moby/blob/master/pkg/namesgenerator/names-generator.go), except reversable.
# How
I map 10,000 words to 4 digits, twice. That yields two words
covering 100,000,000 numbers.
If you use a short word list, you can't generate enough names.
If you use any dictionary, you get a lot of funny, obscene or offensive names. So
I ran the world list through cuss word detection & removed most of the worst.
Docs
----
- [To do](TODO.md)
Related Pypi Packages
--
Crypocurrency related
- [mnemonic](https://pypi.org/project/mnemonic/) Words to cryptocurrency "wallet"
Mneumonic Major System
- [major_system](https://pypi.org/project/major_system/)
- [mnemonic-major-encoder](https://pypi.org/project/mnemonic-major-encoder/)
Converting arabic numbers, e.g. 22, to spoken equivalent, e.g. twenty-two and back.
- [inflect](https://pypi.org/project/inflect/) Converts, 22 to twenty-two
- [words2num](https://pypi.org/project/words2num/) Converts twenty-two to 22.
- [num2words](https://pypi.org/project/num2words/) Converts 22 to twenty-two
- [text2num](https://pypi.org/project/text2num/) Converts twenty-two to 22. Multilingual
- [num2rus](https://pypi.org/project/num2rus/) Converts 22 to Russian currency
- [num2fawords](https://pypi.org/project/num2fawords/) Convert number to Persian
- [zahlwort2num](https://pypi.org/project/zahlwort2num/) Convert german to 22.
Converting numbers to a shorter string, like [Ascii85](https://en.wikipedia.org/wiki/Ascii85)
- [num-shorty](https://pypi.org/project/num-shorty/)
- [ascii85](https://github.com/euske/pdfminer/blob/master/pdfminer/ascii85.py)
Random names, just random names. No way to convert to a number
- [pypi search](https://pypi.org/search/?q=random+name) To many to list, mostly just a function or two.
Raw data
{
"_id": null,
"home_page": "https://github.com/matthewdeanmartin/random_names",
"name": "random-names",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "mneumonic,pseudorandom,name-generator",
"author": "Matthew Martin",
"author_email": "matthewdeanmartin@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/7d/08/304c0d0f806c1fe090b71f9a6bbc97604caa6ddba0c815c728d021172037/random_names-0.2.0.tar.gz",
"platform": null,
"description": "# random_names\nConvert int to random name, like tree_dance and convert it back to same int.\n\nLike [git-name](https://pypi.org/project/git-name/) which converts hashes to memorable names and back.\n\nAlso like the [Mnemonic Major System](https://en.wikipedia.org/wiki/Mnemonic_major_system) which converts\nstrings of numbers it phrases to aid in memorization, implemented here [mnemonic-major-encoder](https://pypi.org/project/mnemonic-major-encoder/)\nIn action here: https://major-system.info/en/\n\nUsage\n-----\n```\nfrom random_names.make_names import number_to_name,number_from_name\n\n# TODO: needs a user specified separator\nname = number_to_name(100,\"prefix\",\"q\")\nprint(name) # prefix_q_activated\n\nnumber = number_from_name(name)\nassert number==100\n```\n\n# Why\nLets say that your users need to type in a long number, 48342342. It would be easier to\ntype in tree_dance. But your app still needs that number, so you need to convert it\nback. This is similar to [docker container names](https://github.com/moby/moby/blob/master/pkg/namesgenerator/names-generator.go), except reversable.\n\n# How\nI map 10,000 words to 4 digits, twice. That yields two words\ncovering 100,000,000 numbers.\n\nIf you use a short word list, you can't generate enough names.\n\nIf you use any dictionary, you get a lot of funny, obscene or offensive names. So\nI ran the world list through cuss word detection & removed most of the worst.\n\nDocs\n----\n- [To do](TODO.md)\n\n\nRelated Pypi Packages\n--\nCrypocurrency related\n- [mnemonic](https://pypi.org/project/mnemonic/) Words to cryptocurrency \"wallet\"\n\nMneumonic Major System\n- [major_system](https://pypi.org/project/major_system/)\n- [mnemonic-major-encoder](https://pypi.org/project/mnemonic-major-encoder/)\n\nConverting arabic numbers, e.g. 22, to spoken equivalent, e.g. twenty-two and back.\n- [inflect](https://pypi.org/project/inflect/) Converts, 22 to twenty-two\n- [words2num](https://pypi.org/project/words2num/) Converts twenty-two to 22.\n- [num2words](https://pypi.org/project/num2words/) Converts 22 to twenty-two\n- [text2num](https://pypi.org/project/text2num/) Converts twenty-two to 22. Multilingual\n- [num2rus](https://pypi.org/project/num2rus/) Converts 22 to Russian currency\n- [num2fawords](https://pypi.org/project/num2fawords/) Convert number to Persian\n- [zahlwort2num](https://pypi.org/project/zahlwort2num/) Convert german to 22.\n\nConverting numbers to a shorter string, like [Ascii85](https://en.wikipedia.org/wiki/Ascii85)\n- [num-shorty](https://pypi.org/project/num-shorty/)\n- [ascii85](https://github.com/euske/pdfminer/blob/master/pdfminer/ascii85.py)\n\nRandom names, just random names. No way to convert to a number\n- [pypi search](https://pypi.org/search/?q=random+name) To many to list, mostly just a function or two.\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Convert int to random name, like tree_dance and convert it back to same int.",
"version": "0.2.0",
"project_urls": {
"Bug Tracker": "https://github.com/matthewdeanmartin/random_names/issues",
"Change Log": "https://github.com/matthewdeanmartin/random_names/blob/main/docs/CHANGES.md",
"Documentation": "https://github.com/matthewdeanmartin/random_names",
"Homepage": "https://github.com/matthewdeanmartin/random_names",
"Repository": "https://github.com/matthewdeanmartin/random_names"
},
"split_keywords": [
"mneumonic",
"pseudorandom",
"name-generator"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ef832ca6fb2d79cd34d0aa2688b67dad30dc0fcc7112c89979b7fe7b3886c99c",
"md5": "aa85ea51d35d0c989669e68d5115d99b",
"sha256": "ee9a052f8cc8627d7e0002c0f3eb047ff0f7a197e6ec7c082fe9bfb484117a31"
},
"downloads": -1,
"filename": "random_names-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "aa85ea51d35d0c989669e68d5115d99b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 189232,
"upload_time": "2023-05-28T23:20:19",
"upload_time_iso_8601": "2023-05-28T23:20:19.991167Z",
"url": "https://files.pythonhosted.org/packages/ef/83/2ca6fb2d79cd34d0aa2688b67dad30dc0fcc7112c89979b7fe7b3886c99c/random_names-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7d08304c0d0f806c1fe090b71f9a6bbc97604caa6ddba0c815c728d021172037",
"md5": "a25828854c08e5221d5c42d589e0db56",
"sha256": "d61c65d75c72588c04d223bc688f1f4752d74a17611b277eae13a6b0890b3e4d"
},
"downloads": -1,
"filename": "random_names-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "a25828854c08e5221d5c42d589e0db56",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 189931,
"upload_time": "2023-05-28T23:20:22",
"upload_time_iso_8601": "2023-05-28T23:20:22.347300Z",
"url": "https://files.pythonhosted.org/packages/7d/08/304c0d0f806c1fe090b71f9a6bbc97604caa6ddba0c815c728d021172037/random_names-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-28 23:20:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "matthewdeanmartin",
"github_project": "random_names",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "random-names"
}