# Locale es

## `faker.providers.address`

class faker.providers.address.es.Provider(generator: Any)

  Bases: `Provider`

  address() → str
    Example:

      ‘791 Crist Parks, Sashabury, IL 86039-9874’

  building_number() → str
    Example:

      ‘791’

  city() → str
    Example:

      ‘Sashabury’

  city_suffix() → str
    Example:

      ‘town’

  country() → str
    Sample:

  country_code(representation: str = 'alpha-2') → str
    Sample:

    Sample:

      representation=’alpha-2’

    Sample:

      representation=’alpha-3’

  current_country() → str
    Sample:

  current_country_code() → str
    Sample:

  postcode() → str
    Example:

      86039-9874

  street_address() → str
    Example:

      ‘791 Crist Parks’

  street_name() → str
    Example:

      ‘Crist Parks’

  street_suffix() → str
    Example:

      ‘Avenue’

## `faker.providers.color`

class faker.providers.color.es.Provider(generator: Any)

  Bases: `Provider`

  Implement color provider for `es` locale.

  color(hue: str | float | int | Sequence[int] | None = None, luminosity: str | None = None, color_format: str = 'hex') → str

    Generate a color in a human-friendly way.

    Under the hood, this method first creates a color represented in the HSV color model and then converts it to the desired `color_format`. The argument `hue` controls the H value according to the following rules:

    - If the value is a number from `0` to `360`, it will serve as the H value of the generated color.

    - If the value is a tuple/list of 2 numbers from 0 to 360, the color’s H value will be randomly selected from that range.

    - If the value is a valid string, the color’s H value will be randomly selected from the H range corresponding to the supplied string. Valid values are `'monochrome'`, `'red'`, `'orange'`, `'yellow'`, `'green'`, `'blue'`, `'purple'`, and `'pink'`.

    The argument `luminosity` influences both S and V values and is partially affected by `hue` as well. The finer details of this relationship are somewhat involved, so please refer to the source code instead if you wish to dig deeper. To keep the interface simple, this argument either can be omitted or can accept the following string values:`'bright'`, `'dark'`, `'light'`, or `'random'`.

    The argument `color_format` controls in which color model the color is represented. Valid values are `'hsv'`, `'hsl'`, `'rgb'`, or `'hex'` (default).

    Sample:

      hue=’red’

    Sample:

      luminosity=’light’

    Sample:

      hue=(100, 200), color_format=’rgb’

    Sample:

      hue=’orange’, luminosity=’bright’

    Sample:

      hue=135, luminosity=’dark’, color_format=’hsv’

    Sample:

      hue=(300, 20), luminosity=’random’, color_format=’hsl’

  color_hsl(hue: str | float | int | Sequence[int] | None = None, luminosity: str | None = None) → Tuple[int, int, int]

    Generate a HSL color tuple.

    Sample:

    Sample:

      hue=’red’, luminosity=’dark’

    Sample:

      hue=(100, 200), luminosity=’random’

  color_hsv(hue: str | float | int | Sequence[int] | None = None, luminosity: str | None = None) → Tuple[int, int, int]

    Generate a HSV color tuple.

    Sample:

    Sample:

      hue=’red’, luminosity=’dark’

    Sample:

      hue=(100, 200), luminosity=’random’

  color_name() → str

    Generate a color name.

    Sample:

  color_rgb(hue: str | float | int | Sequence[int] | None = None, luminosity: str | None = None) → Tuple[int, int, int]

    Generate a RGB color tuple of integers.

    Sample:

    Sample:

      hue=’red’, luminosity=’dark’

    Sample:

      hue=(100, 200), luminosity=’random’

  color_rgb_float(hue: str | float | int | Sequence[int] | None = None, luminosity: str | None = None) → Tuple[float, float, float]

    Generate a RGB color tuple of floats.

    Sample:

    Sample:

      hue=’red’, luminosity=’dark’

    Sample:

      hue=(100, 200), luminosity=’random’

  hex_color() → str

    Generate a color formatted as a hex triplet.

    Sample:

  rgb_color() → str

    Generate a color formatted as a comma-separated RGB value.

    Sample:

  rgb_css_color() → str

    Generate a color formatted as a CSS rgb() function.

    Sample:

  safe_color_name() → str

    Generate a web-safe color name.

    Sample:

  safe_hex_color() → str

    Generate a web-safe color formatted as a hex triplet.

    Sample:

## `faker.providers.currency`

class faker.providers.currency.es.Provider(generator: Any)

  Bases: `Provider`

  cryptocurrency() → Tuple[str, str]
  cryptocurrency_code() → str
  cryptocurrency_name() → str
  currency() → Tuple[str, str]
  currency_code() → str
  currency_name() → str
  currency_symbol(code: str | None = None) → str
    Example:

      $

  pricetag() → str

## `faker.providers.date_time`

class faker.providers.date_time.es.Provider(generator: Any)

  Bases: `Provider`

  am_pm() → str
    Sample:

  century() → str
    Sample:

  date(pattern: str = '%Y-%m-%d', end_datetime: date | datetime | timedelta | str | int | None = None) → str

    Get a date string between January 1, 1970 and now.

    Parameters:

      - pattern – Format of the date (year-month-day by default)

      - end_datetime – A `DateParseType`. Defaults to the current date and time

    Sample:

    Sample:

      pattern=’%m/%d/%Y’

    Sample:

      end_datetime=’+1w’

  date_between(start_date: date | datetime | timedelta | str | int = '-30y', end_date: date | datetime | timedelta | str | int = 'today') → date

    Get a Date object based on a random date between two given dates. Accepts date strings that can be recognized by strtotime().

    Parameters:

      - start_date – A `DateParseType`. Defaults to 30 years ago

      - end_date – A `DateParseType`. Defaults to `"today"`

    Sample:

    Sample:

      start_date=’-1w’

    Sample:

      start_date=”-1y”, end_date=”+1w”

  date_between_dates(date_start: date | datetime | timedelta | str | int | None = None, date_end: date | datetime | timedelta | str | int | None = None) → date

    Get a random date between the two given dates.

    Parameters:

      - date_start – A `DateParseType`. Defaults to the UNIX epoch

      - date_end – A `DateParseType`. Defaults to the current date and time

    Sample:

  date_object(end_datetime: datetime | None = None) → date

    Get a date object between January 1, 1970 and now

    Parameters:

      end_datetime – A `DateParseType`. Defaults to the current date and time

    Sample:

    Sample:

      end_datetime=’+1w’

  date_of_birth(tzinfo: tzinfo | None = None, minimum_age: int = 0, maximum_age: int = 115) → date

    Generate a random date of birth represented as a Date object, constrained by optional miminimum_age and maximum_age parameters.

    Parameters:

      - tzinfo – Defaults to None.

      - minimum_age – Defaults to `0`.

      - maximum_age – Defaults to `115`.

    Sample:

    Sample:

      minimum_age=30, maximum_age=50

  date_this_century(before_today: bool = True, after_today: bool = False) → date

    Gets a Date object for the current century.

    Parameters:

      - before_today – include days in current century before today. Defaults to True

      - after_today – include days in current century after today. Defaults to False

    Sample:

    Sample:

      before_today=False, after_today=True

  date_this_decade(before_today: bool = True, after_today: bool = False) → date

    Gets a Date object for the decade year.

    Parameters:

      - before_today – include days in current decade before today. Defaults to True

      - after_today – include days in current decade after today. Defaults to False

    Sample:

    Sample:

      before_today=False, after_today=True

  date_this_month(before_today: bool = True, after_today: bool = False) → date

    Gets a Date object for the current month.

    Parameters:

      - before_today – include days in current month before today. Defaults to True

      - after_today – include days in current month after today. Defaults to False

    Sample:

    Sample:

      before_today=False, after_today=True

  date_this_year(before_today: bool = True, after_today: bool = False) → date

    Gets a Date object for the current year.

    Parameters:

      - before_today – include days in current year before today. Defaults to True

      - after_today – include days in current year after today. Defaults to False

    Sample:

    Sample:

      before_today=False, after_today=True

  date_time(tzinfo: tzinfo | None = None, end_datetime: date | datetime | timedelta | str | int | None = None) → datetime

    Get a datetime object for a date between January 1, 1970 and a specified end_datetime

    Parameters:

      - tzinfo – timezone, instance of datetime.tzinfo subclass

      - end_datetime – A `DateParseType`. Defaults to the current date and time

    Sample:

  date_time_ad(tzinfo: tzinfo | None = None, end_datetime: date | datetime | timedelta | str | int | None = None, start_datetime: date | datetime | timedelta | str | int | None = None) → datetime

    Get a datetime object for a date between January 1, 0001 and now

    Parameters:

      - tzinfo – timezone, instance of datetime.tzinfo subclass

      - end_datetime – A `DateParseType`. Defaults to the current date and time

      - start_datetime – A `DateParseType`. Defaults to UNIX timestamp `-62135596800`,

    equivalent to 0001-01-01 00:00:00 UTC

    Sample:

  date_time_between(start_date: date | datetime | timedelta | str | int = '-30y', end_date: date | datetime | timedelta | str | int = 'now', tzinfo: tzinfo | None = None) → datetime

    Get a datetime object based on a random date between two given dates. Accepts date strings that can be recognized by strtotime().

    Parameters:

      - start_date – A `DateParseType`. Defaults to 30 years ago

      - end_date – A `DateParseType`. Defaults to `"now"`

      - tzinfo – timezone, instance of datetime.tzinfo subclass

    Sample:

  date_time_between_dates(datetime_start: date | datetime | timedelta | str | int | None = None, datetime_end: date | datetime | timedelta | str | int | None = None, tzinfo: tzinfo | None = None) → datetime

    Get a random datetime between the two given datetimes.

    Parameters:

      - datetime_start – A `DateParseType`. Defaults to the UNIX epoch

      - datetime_end – A `DateParseType`. Defaults to the current date and time

      - tzinfo – timezone, instance of datetime.tzinfo subclass

    Sample:

    Sample:

      datetime_start=’-30y’, datetime_end=’now’

    Sample:

      datetime_start=’now’, datetime_end=’+1y’

  date_time_this_century(before_now: bool = True, after_now: bool = False, tzinfo: tzinfo | None = None) → datetime

    Gets a datetime object for the current century.

    Parameters:

      - before_now – include days in current century before today. Defaults to True

      - after_now – include days in current century after today. Defaults to False

      - tzinfo – timezone, instance of datetime.tzinfo subclass

    Sample:

    Sample:

      before_now=False, after_now=True

  date_time_this_decade(before_now: bool = True, after_now: bool = False, tzinfo: tzinfo | None = None) → datetime

    Gets a datetime object for the decade year.

    Parameters:

      - before_now – include days in current decade before today. Defaults to True

      - after_now – include days in current decade after today. Defaults to False

      - tzinfo – timezone, instance of datetime.tzinfo subclass

    Sample:

    Sample:

      before_now=False, after_now=True

  date_time_this_month(before_now: bool = True, after_now: bool = False, tzinfo: tzinfo | None = None) → datetime

    Gets a datetime object for the current month.

    Parameters:

      - before_now – include days in current month before today. Defaults to True

      - after_now – include days in current month after today. Defaults to False

      - tzinfo – timezone, instance of datetime.tzinfo subclass

    Sample:

    Sample:

      before_now=False, after_now=True

  date_time_this_year(before_now: bool = True, after_now: bool = False, tzinfo: tzinfo | None = None) → datetime

    Gets a datetime object for the current year.

    Parameters:

      - before_now – include days in current year before today. Defaults to True

      - after_now – include days in current year after today. Defaults to False

      - tzinfo – timezone, instance of datetime.tzinfo subclass

    Sample:

    Sample:

      before_now=False, after_now=True

  day_of_month() → str
    Sample:

  day_of_week()
    Sample:

  future_date(end_date: date | datetime | timedelta | str | int = '+30d') → date

    Get a Date object based on a random date between 1 day from now and a given date.

    Parameters:

      - end_date – A `DateParseType`. Defaults to `"+30d"`

      - tzinfo – timezone, instance of datetime.tzinfo subclass

    Sample:

    Sample:

      end_date=’+1y’

  future_datetime(end_date: date | datetime | timedelta | str | int = '+30d', tzinfo: tzinfo | None = None) → datetime

    Get a datetime object based on a random date between 1 second form now and a given date.

    Parameters:

      - end_date – A `DateParseType`. Defaults to `"+30d"`

      - tzinfo – timezone, instance of datetime.tzinfo subclass

    Sample:

    Sample:

      end_date=’+1y’

  iso8601(tzinfo: tzinfo | None = None, end_datetime: date | datetime | timedelta | str | int | None = None, sep: str = 'T', timespec: str = 'auto') → str

    Get an ISO 8601 string for a datetime between the UNIX epoch and now.

    Parameters:

      - tzinfo – timezone, instance of datetime.tzinfo subclass

      - end_datetime – A `DateParseType`. Defaults to the current date and time

      - sep – separator between date and time, defaults to ‘T’

      - timespec – format specifier for the time part, defaults to ‘auto’ - see datetime.isoformat() documentation

    Sample:

  month() → str
    Sample:

  month_name()
    Sample:

  past_date(start_date: date | datetime | timedelta | str | int = '-30d', tzinfo: tzinfo | None = None) → date

    Get a Date object based on a random date between a given date and 1 day ago.

    Parameters:

      - start_date – A `DateParseType`. Defaults to `"-30d"`

      - tzinfo – timezone, instance of datetime.tzinfo subclass

    Sample:

    Sample:

      start_date=’-1y’

  past_datetime(start_date: date | datetime | timedelta | str | int = '-30d', tzinfo: tzinfo | None = None) → datetime

    Get a datetime object based on a random date between a given date and 1 second ago.

    Parameters:

      - start_date – A `DateParseType`. Defaults to `"-30d"`

      - tzinfo – timezone, instance of datetime.tzinfo subclass

    Example:

      datetime(‘1999-02-02 11:42:52’)

    Sample:

    Sample:

      end_date=’+1y’

  pytimezone(*args: Any, **kwargs: Any) → tzinfo | None

    Generate a random timezone (see `faker.timezone` for any args) and return a Python object usable as a `tzinfo` for `datetime` or other fakers.

    Sample:

  time(pattern: str = '%H:%M:%S', end_datetime: date | datetime | timedelta | str | int | None = None) → str

    Get a time string (24h format by default)

    Parameters:

      - pattern – format

      - end_datetime – A `DateParseType`. Defaults to the current date and time

    Sample:

    Sample:

      pattern=’%I:%M %p’

  time_delta(end_datetime: date | datetime | timedelta | str | int | None = None) → timedelta

    Get a random timedelta object of duration between the current date and time and end_datetime

    Parameters:

      end_datetime – A `DateParseType`. Defaults to the current date and time

    Sample:

    Sample:

      end_datetime=’+30h’

  time_object(end_datetime: date | datetime | timedelta | str | int | None = None) → time

    Get a time object

    Parameters:

      end_datetime – A `DateParseType`. Defaults to the current date and time

    Sample:

    Sample:

      end_datetime=’+1h’

  time_series(start_date: date | datetime | timedelta | str | int = '-30d', end_date: date | datetime | timedelta | str | int = 'now', precision: float | None = None, distrib: Callable[[datetime], float] | None = None, tzinfo: tzinfo | None = None) → Iterator[Tuple[datetime, Any]]

    Returns a generator yielding tuples of `(<datetime>, <value>)`.

    The data points will start at `start_date`, and be at every time interval specified by `precision`.

    Parameters:

      - start_date – A `DateParseType`. Defaults to `"-30d"`

      - end_date – A `DateParseType`. Defaults to `"now"`

      - precision – A float representing the time interval between data points.

    Defaults to 1/30th of the time :param distrib: A callable that accepts a datetime object and returns a value. Defaults to a uniform distribution :param tzinfo: timezone, instance of datetime.tzinfo subclass

    Sample:

  timezone() → str
    Sample:

  unix_time(end_datetime: date | datetime | timedelta | str | int | None = None, start_datetime: date | datetime | timedelta | str | int | None = None) → float

    Get a timestamp between January 1, 1970 and now, unless passed explicit `start_datetime` or end_datetime values.

    On Windows, the decimal part is always 0.

    Parameters:

      - end_datetime – A `DateParseType`. Defaults to the UNIX epoch

      - start_datetime – A `DateParseType`. Defaults to the current date and time

    Sample:

  year() → str
    Sample:

## `faker.providers.job`

class faker.providers.job.es.Provider(generator: Any)

  Bases: `Provider`

  job() → str
  job_female() → str
  job_male() → str

## `faker.providers.person`

class faker.providers.person.es.Provider(generator: Any)

  Bases: `Provider`

  first_name() → str
  first_name_female() → str
  first_name_male() → str
  first_name_nonbinary() → str
  language_name() → str

    Generate a random i18n language name (e.g. English).

  last_name() → str
  last_name_female() → str
  last_name_male() → str
  last_name_nonbinary() → str
  name() → str
    Example:

      ‘John Doe’

  name_female() → str
  name_male() → str
  name_nonbinary() → str
  prefix() → str
  prefix_female() → str
  prefix_male() → str
  prefix_nonbinary() → str
  suffix() → str
  suffix_female() → str
  suffix_male() → str
  suffix_nonbinary() → str