#name #utility #cloud

anarchist-readable-name-generator-lib

Generate a readable name from something with with famous anarchist writers

3 releases

0.1.2 Aug 14, 2024
0.1.1 Feb 19, 2022
0.1.0 Feb 19, 2022

#174 in Testing

Download history 4/week @ 2024-10-01 6/week @ 2024-10-08 27/week @ 2024-10-15 6/week @ 2024-10-22 100/week @ 2024-10-29 27/week @ 2024-11-05 152/week @ 2024-11-12 1399/week @ 2024-11-19 365/week @ 2024-11-26 836/week @ 2024-12-03 3844/week @ 2024-12-10 3527/week @ 2024-12-17 3580/week @ 2024-12-24 3938/week @ 2024-12-31 4935/week @ 2025-01-07 8502/week @ 2025-01-14

21,317 downloads per month
Used in readable-name-generator

CC0 license

480KB
3K SLoC

anarchist-readable-name-generator-lib

This library uses the authors from Anarchist Library to generate a random name

The intention here is to have a random name for situations you need to spin up some cloud compute resources and don't have a name in mind. Typically, for throwaway purposes.

Examples

It's possible to simply generate a random name

use anarchist_readable_name_generator_lib::readable_name;

assert!(readable_name().len() > 0)

You can also pass a seed or change the separator to give you predictability or minor customization.

use anarchist_readable_name_generator_lib::readable_name_custom;
use rand::prelude::*;
use rand_pcg::Pcg64;

let rng = Pcg64::seed_from_u64(2);
assert_eq!(
readable_name_custom("+", rng),
"engrossing+cazarabet"
);

Read more at Docs.rs


lib.rs:

This library uses the authors from Anarchist Library to generate a random name

The intention here is to have a random name for situations you need to spin up some cloud compute resources and don't have a name in mind. Typically, for throwaway purposes.

Examples

It's possible to simply generate a random name

use anarchist_readable_name_generator_lib::readable_name;

assert!(readable_name().len() > 0)

You can also pass a seed or change the separator to give you predictability or minor customization.

use anarchist_readable_name_generator_lib::readable_name_custom;
use rand::prelude::*;
use rand_pcg::Pcg64;

let rng = Pcg64::seed_from_u64(2);
assert_eq!(
   readable_name_custom("+", rng),
   "engrossing+cazarabet"
);

Dependencies

~315KB