MCPcopy
hub / github.com/opengeos/segment-geospatial / random_string

Function random_string

samgeo/common.py:2536–2550  ·  view source on GitHub ↗

Generates a random string of fixed length. Args: string_length (int, optional): Fixed length. Defaults to 3. Returns: str: A random string

(string_length=6)

Source from the content-addressed store, hash-verified

2534
2535
2536def random_string(string_length=6):
2537 """Generates a random string of fixed length.
2538
2539 Args:
2540 string_length (int, optional): Fixed length. Defaults to 3.
2541
2542 Returns:
2543 str: A random string
2544 """
2545 import random
2546 import string
2547
2548 # random.seed(1001)
2549 letters = string.ascii_lowercase
2550 return "".join(random.choice(letters) for i in range(string_length))
2551
2552
2553def coords_to_geojson(coords, output=None):

Callers 1

segment_button_clickFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected