Skip to main content

a function to create random usernames

Tested against Windows / Python 3.11 / Anaconda

pip install genranddata

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.
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']

Metadata

Release files for genranddata 0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for genranddata 0.10
File Size Uploaded Provenance Actions
genranddata-0.10.tar.gz 5.2 kB Without provenance Details for genranddata-0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for genranddata 0.10
File Interpreter ABI Platform Actions
genranddata-0.10-py3-none-any.whl Python 3 none any Details for genranddata-0.10-py3-none-any.whl

Total release size: 12.1 kB

Release files / genranddata-0.10.tar.gz

Download URL genranddata-0.10.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
03075b5932f38e886e65c07482cf5b83f96ae3c59f590825c0bc061d6cddd9e7
BLAKE2b-256 checksum
How to use checksums
d92ef0c8142f11cee469137d9b1acb0a18fac0b31bec84d64568bec32f9fb7a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / genranddata-0.10-py3-none-any.whl

Download URL genranddata-0.10-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
577cbbfb5444f99f6045cc5862e982b98de9ae585b69d6a8ce709a156467d320
BLAKE2b-256 checksum
How to use checksums
14a9f158bc814d0b4cbfdd491b08dcd4e1556a107f69d01ce646b378ac5acc98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Security for genranddata 0.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.10 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page