{"id":22937836,"url":"https://github.com/dimitryzub/randomit","last_synced_at":"2025-07-06T15:34:25.244Z","repository":{"id":57459857,"uuid":"411753239","full_name":"dimitryzub/randomit","owner":"dimitryzub","description":"A Python package to generate random things.","archived":false,"fork":false,"pushed_at":"2021-11-13T10:18:25.000Z","size":299,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-07T14:39:03.944Z","etag":null,"topics":["generator","python","random","random-generation","randomit","randomizer","randomly"],"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/dimitryzub.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":"2021-09-29T16:40:18.000Z","updated_at":"2021-11-13T10:18:28.000Z","dependencies_parsed_at":"2022-09-09T22:52:02.275Z","dependency_job_id":null,"html_url":"https://github.com/dimitryzub/randomit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitryzub%2Frandomit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitryzub%2Frandomit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitryzub%2Frandomit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitryzub%2Frandomit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimitryzub","download_url":"https://codeload.github.com/dimitryzub/randomit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246700083,"owners_count":20819823,"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":["generator","python","random","random-generation","randomit","randomizer","randomly"],"created_at":"2024-12-14T12:14:45.661Z","updated_at":"2025-04-01T19:32:36.367Z","avatar_url":"https://github.com/dimitryzub.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Randomit 🎲\n\nA Python library to generate random things.\n\n[![codecov coverage](https://codecov.io/gh/dimitryzub/randomit/branch/main/graph/badge.svg?token=B2XA8Y3R5M)](https://codecov.io/gh/dimitryzub/randomit)\n![example workflow](https://github.com/dimitryzub/randomit/actions/workflows/ci.yml/badge.svg)\n\n![pypi package badge brought by Gemfury](https://badge.fury.io/py/randomit.svg)\n[![Downloads](https://static.pepy.tech/personalized-badge/randomit?period=month\u0026units=international_system\u0026left_color=grey\u0026right_color=brightgreen\u0026left_text=Downloads)](https://pepy.tech/project/randomit)\n\n![pypi package versions brought by shields.io](https://img.shields.io/pypi/pyversions/randomit)\n![licence brought by shields.io](https://img.shields.io/github/license/dimitryzub/randomit?color=blue)\n![repo size](https://img.shields.io/github/repo-size/dimitryzub/randomit)\n\n![twitter account brought by shield.io](https://img.shields.io/twitter/follow/DimitryZub?style=social)\n___\nCurrently, `randomit` can:\n- Generate [random word(s)](https://github.com/dimitryzub/randomit#get-random-words) based on a given [theme](https://github.com/dimitryzub/randomit#look-for-available-built-in-themes).\n- [Load your files](https://github.com/dimitryzub/randomit#load-and-pass-file-with-words) that _contain **words**_ to randomize them. \n- [Randomize images](https://github.com/dimitryzub/randomit#get-random-images) based on a given query.\n- Generate random [phone numbers](https://dimitryzub.github.io/randomit/docs/docs.html#get-phone-number).\n- Generate/randomize [email address](https://dimitryzub.github.io/randomit/docs/docs.html#get-email-address). \n\nTo see what's coming next, see [open projects](https://github.com/dimitryzub/randomit/projects).\n\n## 💡Usage\n\n\u003e *Words/addresses will always be different on each execution no matter what arguments being passed.*\n\n### Get Random Words\n\n```python\nfrom randomit.randomizer import Words\n\n# return one word\nWords(theme='random words').randomize(return_one_word=True)\n# cabinet\n# bristlecone pine\n# dim - bright\n\nWords(theme='random words').randomize()  # returns a list of 17k words\nWords(theme='random words').randomize(amount_to_return=3)  # ['axis', 'overabundant', 'superuser']\n\nWords(theme='random words').randomize(letter_starts_with='A')  # returns all words that starts with letter \"A\" \nWords(theme='random words').randomize(letter_starts_with='A', amount_to_return=3)  # ['abandoned', 'able', 'absolute']\nWords(theme='names').randomize(letter_starts_with='A', amount_to_return=3, capitalize=True)  # ['Apron', 'Ashes', 'Anvil']\n```\n\n### Get Random Addresses\n\n```python\nimport json\n\naddress_list = Words(theme='address').randomize(amount_to_return=1, return_dict=True)\n\nprint(json.dumps(address_list, indent=2))\n\n'''\n[\n  {\n    \"address\": \"279 troy road\",\n    \"city\": \"east greenbush\",\n    \"state\": \"ny\",\n    \"zip\": \"12061\"\n  }\n]\n'''\n\n# if \"return_dict\" argument isn't specified it will return a list():\n'''\n[\"2465 hempstead turnpike, east meadow ny 11554\"]\n'''\n```\n\n_If you want to add your list of addresses, have a look at `addresses_list.txt` and format it as it's formatted there to work properly._\n\nFormat:`address, city, state, zip`\n\n### Look for available built-in themes\n\n_If \"**theme**\" argument is not specified ➡ defaults to \"**random words**\"_.\n\n```python\nWords().available_themes()\n# ['random words', 'names', 'surnames', 'cities', 'countries', 'address']\n```\n\n### Specify theme you want to get words from\n\n```python\nWords(theme='cities').randomize()  # pass available arguments\n```\n\n### Load and pass file with words\n_Make sure all words are **lowercase**, and start on a **new line** (`\\n`), otherwise it won't work._\n\n```python\n# call your words\nWords(file=YOUR_FILE).randomize(capitalize=True, return_one_word=True)\n\n# Bazinga!\n```\n\n___\n\n### Get Random Images\n\n_Enter any query, and it will return a random image(s) URL based on the provided query, and it will be random on each execution._ \n\n\n\n```python\nfrom randomit.randomizer import Images\n\nImages(query='cats', amount_to_return=3).get_randomized() \n# ['https://images.pexels.com/photos/1170986/pexels-photo-1170986.jpeg', 'https://images.pexels.com/photos/1056251/pexels-photo-1056251.jpeg', 'https://images.pexels.com/photos/1056251/pexels-photo-1056251.jpeg']\n\n# if \"amount_to_return\" argument is not specified -\u003e defaults to batch of 100 images.\n```\n\n\u003e Note: If you don't need this feature and want to get rid of dependencies, [use `poetry remove package_name`](https://python-poetry.org/docs/cli/#remove)\n\nIn this case:\n\n```lang-none\npoetry remove lxml\npoetry remove requests\npoetry remove bs4\n```\n\n___\n\n## 📡 Installation\n\n```\npip install randomit\n```\n\n```\ngit clone https://github.com/dimitryzub/randomit.git\n```\n\n## 👾 Suggestions\n\nIf you have any suggestions or ideas what will be good to add, get involved in [discussions](https://github.com/dimitryzub/randomit/discussions) section.\n\n## 🔬 Issues\n\nFor issues, visit [issues page](https://github.com/dimitryzub/randomit/issues) 🙃\n\nNote for [replit.com](https://replit.com/) users. If you’re using `randomit` on replit, it will throw an error for no obvious for me reason. If you know how to fix it, please, let me know. \n\nInstalling package locally via `pip` doesn’t produce such error as it should (_tested in Pycharm and VSCode_).\n\n## 📜 Docs\n\nTo read more in-depth about something, visit [documentation](https://dimitryzub.github.io/randomit/docs/docs.html) page. Currently, there's nothing there. It's under development. Soon there will be more examples. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimitryzub%2Frandomit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimitryzub%2Frandomit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimitryzub%2Frandomit/lists"}