# Path: mimesis/types.py
# JSON = Dict[str, Any]


import contextlib
import functools
import json
import operator
from functools import reduce
from pathlib import Path
from typing import Any, Generator, List, Optional
from mimesis.exceptions import NonEnumerableError
from mimesis.locales import Locale, validate_locale
from mimesis.random import Random, get_random_item
from mimesis.types import JSON, Seed
"""Base data provider."""



__all__ = ["BaseDataProvider", "BaseProvider"]


class BaseProvider:
    """This is a base class for all providers."""

    def __init__(self, *, seed: Seed = None, **kwargs: Any) -> None:
        """Initialize attributes.

        Keep in mind, that locale-independent data providers will work
        only with keyword-only arguments since version 5.0.0.

        :param seed: Seed for random.
            When set to `None` the current system time is used.
        """
        self.seed = seed
        self.random = Random()
        self.reseed(seed)


# Path: mimesis/types.py
# JSON = Dict[str, Any]


# Path: mimesis/providers/base.py
import contextlib
import functools
import json
import operator
from functools import reduce
from pathlib import Path
from typing import Any, Generator, List, Optional
from mimesis.exceptions import NonEnumerableError
from mimesis.locales import Locale, validate_locale
from mimesis.random import Random, get_random_item
from mimesis.types import JSON, Seed

"""Base data provider."""



__all__ = ["BaseDataProvider", "BaseProvider"]


class BaseProvider:
    """This is a base class for all providers."""

    def __init__(self, *, seed: Seed = None, **kwargs: Any) -> None:
        """Initialize attributes.

        Keep in mind, that locale-independent data providers will work
        only with keyword-only arguments since version 5.0.0.

        :param seed: Seed for random.
            When set to `None` the current system time is used.
        """
        self.seed = seed
        self.random = Random()
        self.reseed(seed)


    def reseed(self, seed: Seed = None) -> None: