# a function to create random usernames
## Tested against Windows / Python 3.11 / Anaconda
## pip install genranddata
```python
Generate random data using a given function and input data, while ensuring uniqueness and handling exceptions.
Parameters:
fu (callable): The function used to generate new data.
data (Union[list, tuple]): The input data to be used in the generation process.
created_already (list): A list of data that has already been created.
limit (int): The maximum number of new data to be generated.
**kwargs: Additional keyword arguments to be passed to the function.
Returns:
list: A list of randomly generated data, with a length not exceeding the specified limit.
```
```python
from genranddata import create_random_data, load_data, save_data, genfunction
u = [
"Agent",
"Alex",
"Alonzo",
"Amon",
"Angel",
"Annie",
"Anton",
"August",
"Bane",
"Buddy",
"Calvin",
"Candyman",
"Captain",
"Catherine",
"Chucky",
"Colin",
"Commodus",
"Count",
"Cruella",
"Darth",
"Davy",
"Deadly",
"Death",
"Dolores",
"Dr",
"Elijah",
"Erik",
"Ernst",
"Esther",
"Frank",
"Freddy",
"Ghostface",
"Godzilla",
"Gollum",
"Gordon",
"Gozer",
"Green",
"HAL",
"Harry",
"Howard",
"Immortan",
"Ivan",
"Jack",
"Jason",
"Jigsaw",
"John",
"Joker",
"Judge",
"Khan",
"Koba",
"Lee",
"Lex",
"Lil",
"Lord",
"Lots",
"Maleficent",
"Margaret",
"Max",
"Michael",
"Miranda",
"Miss",
"Mrs",
"Norman",
"Nurse",
"Palpatine",
"Pazuzu",
"Pennywise",
"Predator",
"Queen",
"Raoul",
"Regina",
"Roger",
"Roy",
"Sauron",
"Scar",
"Shere",
"Shooter",
"T",
"Terence",
"Thanos",
"The",
"Ursula",
"Vice",
"William",
"Xenomorphs",
]
empty = []
save_data(empty, "c:\\testusername.pkl")
already_created = load_data("c:\\testusername.pkl")
gendata = create_random_data(
fu=lambda x, **kwargs: genfunction(x, **kwargs),
data=u,
created_already=already_created,
limit=10,
min_=2,
max_=4,
camel_case_percentage=20,
uppercase_percentage=30,
lowercase_percentage=30,
join_values=("x", "_", ""),
random_number_percentage=30,
random_number_range=(0, 100),
)
print(gendata)
# ['maleficent_xenomorphs_alex_max', 'queenlexantonnorman', 'DarthxJack', 'WilliamMaxRaoulAlonzo', 'MissxIvanxCaptainxMax', 'SAURONFREDDYAGENTDR', 'CAPTAIN_JOHN_ROGER_GREEN', 'JOKERERIKFREDDYESTHER71', 'scar_roger_1', 'T_GHOSTFACE_ANGEL_4']
```
Raw data
{
"_id": null,
"home_page": "https://github.com/hansalemaos/genranddata",
"name": "genranddata",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "random,data",
"author": "Johannes Fischer",
"author_email": "aulasparticularesdealemaosp@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/d9/2e/f0c8142f11cee469137d9b1acb0a18fac0b31bec84d64568bec32f9fb7a0/genranddata-0.10.tar.gz",
"platform": null,
"description": "\r\n# a function to create random usernames\r\n\r\n## Tested against Windows / Python 3.11 / Anaconda\r\n\r\n## pip install genranddata\r\n\r\n\r\n\r\n```python\r\nGenerate random data using a given function and input data, while ensuring uniqueness and handling exceptions.\r\n\r\nParameters:\r\n\tfu (callable): The function used to generate new data.\r\n\tdata (Union[list, tuple]): The input data to be used in the generation process.\r\n\tcreated_already (list): A list of data that has already been created.\r\n\tlimit (int): The maximum number of new data to be generated.\r\n\t**kwargs: Additional keyword arguments to be passed to the function.\r\n\r\nReturns:\r\n\tlist: A list of randomly generated data, with a length not exceeding the specified limit.\r\n```\r\n\t\r\n\r\n\r\n```python\r\n\r\nfrom genranddata import create_random_data, load_data, save_data, genfunction\r\n\r\nu = [\r\n \"Agent\",\r\n \"Alex\",\r\n \"Alonzo\",\r\n \"Amon\",\r\n \"Angel\",\r\n \"Annie\",\r\n \"Anton\",\r\n \"August\",\r\n \"Bane\",\r\n \"Buddy\",\r\n \"Calvin\",\r\n \"Candyman\",\r\n \"Captain\",\r\n \"Catherine\",\r\n \"Chucky\",\r\n \"Colin\",\r\n \"Commodus\",\r\n \"Count\",\r\n \"Cruella\",\r\n \"Darth\",\r\n \"Davy\",\r\n \"Deadly\",\r\n \"Death\",\r\n \"Dolores\",\r\n \"Dr\",\r\n \"Elijah\",\r\n \"Erik\",\r\n \"Ernst\",\r\n \"Esther\",\r\n \"Frank\",\r\n \"Freddy\",\r\n \"Ghostface\",\r\n \"Godzilla\",\r\n \"Gollum\",\r\n \"Gordon\",\r\n \"Gozer\",\r\n \"Green\",\r\n \"HAL\",\r\n \"Harry\",\r\n \"Howard\",\r\n \"Immortan\",\r\n \"Ivan\",\r\n \"Jack\",\r\n \"Jason\",\r\n \"Jigsaw\",\r\n \"John\",\r\n \"Joker\",\r\n \"Judge\",\r\n \"Khan\",\r\n \"Koba\",\r\n \"Lee\",\r\n \"Lex\",\r\n \"Lil\",\r\n \"Lord\",\r\n \"Lots\",\r\n \"Maleficent\",\r\n \"Margaret\",\r\n \"Max\",\r\n \"Michael\",\r\n \"Miranda\",\r\n \"Miss\",\r\n \"Mrs\",\r\n \"Norman\",\r\n \"Nurse\",\r\n \"Palpatine\",\r\n \"Pazuzu\",\r\n \"Pennywise\",\r\n \"Predator\",\r\n \"Queen\",\r\n \"Raoul\",\r\n \"Regina\",\r\n \"Roger\",\r\n \"Roy\",\r\n \"Sauron\",\r\n \"Scar\",\r\n \"Shere\",\r\n \"Shooter\",\r\n \"T\",\r\n \"Terence\",\r\n \"Thanos\",\r\n \"The\",\r\n \"Ursula\",\r\n \"Vice\",\r\n \"William\",\r\n \"Xenomorphs\",\r\n]\r\nempty = []\r\nsave_data(empty, \"c:\\\\testusername.pkl\")\r\nalready_created = load_data(\"c:\\\\testusername.pkl\")\r\ngendata = create_random_data(\r\n fu=lambda x, **kwargs: genfunction(x, **kwargs),\r\n data=u,\r\n created_already=already_created,\r\n limit=10,\r\n min_=2,\r\n max_=4,\r\n camel_case_percentage=20,\r\n uppercase_percentage=30,\r\n lowercase_percentage=30,\r\n join_values=(\"x\", \"_\", \"\"),\r\n random_number_percentage=30,\r\n random_number_range=(0, 100),\r\n)\r\nprint(gendata)\r\n# ['maleficent_xenomorphs_alex_max', 'queenlexantonnorman', 'DarthxJack', 'WilliamMaxRaoulAlonzo', 'MissxIvanxCaptainxMax', 'SAURONFREDDYAGENTDR', 'CAPTAIN_JOHN_ROGER_GREEN', 'JOKERERIKFREDDYESTHER71', 'scar_roger_1', 'T_GHOSTFACE_ANGEL_4']\r\n\r\n\r\n\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "a function to create random usernames",
"version": "0.10",
"project_urls": {
"Homepage": "https://github.com/hansalemaos/genranddata"
},
"split_keywords": [
"random",
"data"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "14a9f158bc814d0b4cbfdd491b08dcd4e1556a107f69d01ce646b378ac5acc98",
"md5": "146df9a5530b78597e466262d2fccd2e",
"sha256": "577cbbfb5444f99f6045cc5862e982b98de9ae585b69d6a8ce709a156467d320"
},
"downloads": -1,
"filename": "genranddata-0.10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "146df9a5530b78597e466262d2fccd2e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6893,
"upload_time": "2024-02-22T05:44:38",
"upload_time_iso_8601": "2024-02-22T05:44:38.745998Z",
"url": "https://files.pythonhosted.org/packages/14/a9/f158bc814d0b4cbfdd491b08dcd4e1556a107f69d01ce646b378ac5acc98/genranddata-0.10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d92ef0c8142f11cee469137d9b1acb0a18fac0b31bec84d64568bec32f9fb7a0",
"md5": "ba2b449c80268e17f33dccedb4390328",
"sha256": "03075b5932f38e886e65c07482cf5b83f96ae3c59f590825c0bc061d6cddd9e7"
},
"downloads": -1,
"filename": "genranddata-0.10.tar.gz",
"has_sig": false,
"md5_digest": "ba2b449c80268e17f33dccedb4390328",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5242,
"upload_time": "2024-02-22T05:44:40",
"upload_time_iso_8601": "2024-02-22T05:44:40.446350Z",
"url": "https://files.pythonhosted.org/packages/d9/2e/f0c8142f11cee469137d9b1acb0a18fac0b31bec84d64568bec32f9fb7a0/genranddata-0.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-22 05:44:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hansalemaos",
"github_project": "genranddata",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "genranddata"
}