Locale uz_UZ

faker.providers.color

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

Bases: Provider

Implement color provider for uz_UZ 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).

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.color(hue='red')
...
'#af2f33'
'#e02141'
'#ef6466'
'#a80a14'
'#ed9e95'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.color(luminosity='light')
...
'#79c3e0'
'#89ffa1'
'#96cbf7'
'#aafaff'
'#e3f495'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.color(hue=(100, 200), color_format='rgb')
...
'rgb(26, 155, 88)'
'rgb(9, 193, 49)'
'rgb(73, 229, 154)'
'rgb(107, 249, 166)'
'rgb(76, 204, 69)'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.color(hue='orange', luminosity='bright')
...
'#efc332'
'#edae65'
'#d1861d'
'#ffcc42'
'#e09533'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.color(hue=135, luminosity='dark', color_format='hsv')
...
'hsv(135, 96, 45)'
'hsv(135, 98, 57)'
'hsv(135, 94, 61)'
'hsv(135, 99, 47)'
'hsv(135, 94, 50)'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.color(hue=(300, 20), luminosity='random', color_format='hsl')
...
'hsl(217, 94, 27)'
'hsl(40, 23, 54)'
'hsl(268, 100, 74)'
'hsl(175, 43, 31)'
'hsl(131, 47, 11)'
color_hsl(hue: str | float | int | Sequence[int] | None = None, luminosity: str | None = None) Tuple[int, int, int]

Generate a HSL color tuple in a human-friendly way.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.color_hsl()
...
(197, 57, 32)
(132, 90, 39)
(207, 76, 65)
(183, 88, 33)
(258, 62, 73)
color_hsv(hue: str | float | int | Sequence[int] | None = None, luminosity: str | None = None) Tuple[int, int, int]

Generate a HSV color tuple in a human-friendly way.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.color_hsv()
...
(197, 73, 51)
(132, 95, 76)
(207, 58, 92)
(183, 94, 64)
(258, 37, 90)
color_name() str

Generate a color name.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.color_name()
...
'Qizil'
'Qora'
'Apelsin'
'Magenta'
'Siena'
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 in a human-friendly way.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.color_rgb()
...
(35, 103, 130)
(9, 193, 46)
(98, 173, 234)
(9, 155, 163)
(170, 144, 229)
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 in a human-friendly way.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.color_rgb_float()
...
(0.13770000000000002, 0.4045149999999999, 0.51)
(0.038000000000000034, 0.76, 0.18239999999999984)
(0.3864000000000001, 0.6798800000000002, 0.92)
(0.03840000000000004, 0.6099200000000001, 0.64)
(0.6668999999999999, 0.5670000000000001, 0.9)
hex_color() str

Generate a color formatted as a hex triplet.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.hex_color()
...
'#d82c08'
'#629f70'
'#c2094d'
'#e3e707'
'#6baa95'
rgb_color() str

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

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.rgb_color()
...
'197,215,20'
'132,248,207'
'155,244,183'
'111,71,144'
'71,48,128'
rgb_css_color() str

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

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.rgb_css_color()
...
'rgb(197,215,20)'
'rgb(132,248,207)'
'rgb(155,244,183)'
'rgb(111,71,144)'
'rgb(71,48,128)'
safe_color_name() str

Generate a web-safe color name.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.safe_color_name()
...
'Pushti'
'Pushti'
'Oq'
'Qizil'
'Qaymoq'
safe_hex_color() str

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

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.safe_hex_color()
...
'#ccdd11'
'#88ffcc'
'#99ffbb'
'#664499'
'#443388'

faker.providers.currency

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

Bases: Provider

cryptocurrency() Tuple[str, str]
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.cryptocurrency()
...
('XRP', 'Ripple')
('STC', 'SwiftCoin')
('BC', 'BlackCoin')
('NXT', 'Nxt')
('IOTA', 'IOTA')
cryptocurrency_code() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.cryptocurrency_code()
...
'XRP'
'STC'
'BC'
'NXT'
'IOTA'
cryptocurrency_name() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.cryptocurrency_name()
...
'Ripple'
'SwiftCoin'
'BlackCoin'
'Nxt'
'IOTA'
currency() Tuple[str, str]
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.currency()
...
('MWK', 'Kvacha')
('NZD', 'Yangi Zelandiya dollari')
('BAM', 'Bosniya va Gertsegovina konvertatsiya qilinadigan markasi')
('IRR', 'Eron riali')
('SPL', 'Luigino')
currency_code() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.currency_code()
...
'MWK'
'NZD'
'BAM'
'IRR'
'SPL'
currency_name() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.currency_name()
...
'Kvacha'
'Yangi Zelandiya dollari'
'Bosniya va Gertsegovina konvertatsiya qilinadigan markasi'
'Eron riali'
'Luigino'
currency_symbol(code: str | None = None) str
Example:

$

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.currency_symbol()
...
'$'
'$'
'KM'
'kr'
'L'
pricetag() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.pricetag()
...
'7 604,87\xa0р.'
'975,93\xa0р.'
'54,21\xa0р.'
'89 241,15\xa0р.'
'91 565,93\xa0р.'

faker.providers.date_time

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

Bases: Provider

am_pm() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.am_pm()
...
'PM'
'PM'
'PM'
'PM'
'PM'
century() str
Example:

‘XVII’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.century()
...
'XIII'
'XIV'
'II'
'IX'
'XVII'
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)

Example:

‘2008-11-27’

Returns:

Date

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date()
...
'2016-05-13'
'2011-08-14'
'1993-02-03'
'1984-03-20'
'1998-01-27'
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 – Defaults to 30 years ago

  • end_date – Defaults to “today”

Example:

Date(‘1999-02-02’)

Returns:

Date

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_between()
...
datetime.date(2020, 3, 28)
datetime.date(2017, 8, 23)
datetime.date(2007, 7, 10)
datetime.date(2002, 9, 3)
datetime.date(2010, 3, 30)
date_between_dates(date_start: date | datetime | timedelta | str | int | None = None, date_end: date | datetime | timedelta | str | int | None = None) date

Takes two Date objects and returns a random date between the two given dates. Accepts Date or datetime objects

Parameters:
  • date_start – Date

  • date_end – Date

Returns:

Date

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_between_dates()
...
datetime.date(2024, 11, 27)
datetime.date(2024, 11, 27)
datetime.date(2024, 11, 27)
datetime.date(2024, 11, 27)
datetime.date(2024, 11, 27)
date_object(end_datetime: datetime | None = None) date

Get a date object between January 1, 1970 and now

Example:

datetime.date(2016, 9, 20)

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_object()
...
datetime.date(2016, 5, 13)
datetime.date(2011, 8, 14)
datetime.date(1993, 2, 3)
datetime.date(1984, 3, 20)
datetime.date(1998, 1, 27)
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.

Example:

Date(‘1979-02-02’)

Returns:

Date

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_of_birth()
...
datetime.date(2006, 11, 10)
datetime.date(1996, 10, 29)
datetime.date(1957, 9, 10)
datetime.date(1938, 12, 10)
datetime.date(1968, 3, 19)
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

  • after_today – include days in current century after today

Example:

Date(‘2012-04-04’)

Returns:

Date

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_this_century()
...
datetime.date(2021, 1, 11)
datetime.date(2018, 11, 17)
datetime.date(2010, 6, 22)
datetime.date(2006, 6, 13)
datetime.date(2012, 9, 25)
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

  • after_today – include days in current decade after today

Example:

Date(‘2012-04-04’)

Returns:

Date

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_this_decade()
...
datetime.date(2024, 2, 22)
datetime.date(2023, 9, 20)
datetime.date(2022, 1, 23)
datetime.date(2021, 4, 8)
datetime.date(2022, 7, 5)
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

  • after_today – include days in current month after today

Example:

dtdate(‘2012-04-04’)

Returns:

dtdate

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_this_month()
...
datetime.date(2024, 11, 22)
datetime.date(2024, 11, 20)
datetime.date(2024, 11, 11)
datetime.date(2024, 11, 7)
datetime.date(2024, 11, 14)
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

  • after_today – include days in current year after today

Example:

Date(‘2012-04-04’)

Returns:

Date

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_this_year()
...
datetime.date(2024, 10, 6)
datetime.date(2024, 9, 7)
datetime.date(2024, 5, 19)
datetime.date(2024, 3, 26)
datetime.date(2024, 6, 18)
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 now

Parameters:

tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

datetime(‘2005-08-16 20:39:21’)

Returns:

datetime

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_time()
...
datetime.datetime(2016, 5, 13, 20, 28, 25, 425405)
datetime.datetime(2011, 8, 14, 18, 1, 41, 248329)
datetime.datetime(1993, 2, 3, 13, 11, 19, 59385)
datetime.datetime(1984, 3, 20, 13, 36, 37, 373984)
datetime.datetime(1998, 1, 27, 14, 21, 15, 168448)
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, 001 and now

Parameters:

tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

datetime(‘1265-03-22 21:15:52’)

Returns:

datetime

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_time_ad()
...
datetime.datetime(1710, 1, 12, 23, 3, 20, 895256)
datetime.datetime(1535, 1, 12, 18, 7, 55, 131699)
datetime.datetime(852, 3, 13, 15, 34, 11, 103378)
datetime.datetime(525, 1, 9, 15, 43, 18, 343834)
datetime.datetime(1035, 10, 10, 22, 46, 56, 160652)
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 – Defaults to 30 years ago

  • end_date – Defaults to “now”

  • tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

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

Returns:

datetime

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_time_between()
...
datetime.datetime(2020, 3, 29, 6, 24, 24, 236214)
datetime.datetime(2017, 8, 24, 19, 49, 10, 808743)
datetime.datetime(2007, 7, 12, 1, 18, 51, 361449)
datetime.datetime(2002, 9, 4, 18, 29, 27, 49189)
datetime.datetime(2010, 3, 31, 21, 46, 23, 171082)
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

Takes two datetime objects and returns a random datetime between the two given datetimes. Accepts datetime objects.

Parameters:
  • datetime_start – datetime

  • datetime_end – datetime

  • tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

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

Returns:

datetime

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_time_between_dates()
...
datetime.datetime(2024, 11, 27, 23, 13, 41)
datetime.datetime(2024, 11, 27, 23, 13, 41)
datetime.datetime(2024, 11, 27, 23, 13, 41)
datetime.datetime(2024, 11, 27, 23, 13, 41)
datetime.datetime(2024, 11, 27, 23, 13, 41)
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

  • after_now – include days in current century after today

  • tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

datetime(‘2012-04-04 11:02:02’)

Returns:

datetime

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_time_this_century()
...
datetime.datetime(2021, 1, 12, 12, 32, 53, 798785)
datetime.datetime(2018, 11, 17, 20, 16, 28, 891670)
datetime.datetime(2010, 6, 23, 8, 19, 16, 174853)
datetime.datetime(2006, 6, 13, 14, 47, 25, 406240)
datetime.datetime(2012, 9, 25, 13, 27, 47, 824552)
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

  • after_now – include days in current decade after today

  • tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

datetime(‘2012-04-04 11:02:02’)

Returns:

datetime

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_time_this_decade()
...
datetime.datetime(2024, 2, 23, 0, 30, 33, 365048)
datetime.datetime(2023, 9, 20, 23, 42, 31, 567092)
datetime.datetime(2022, 1, 24, 1, 42, 41, 790303)
datetime.datetime(2021, 4, 9, 5, 30, 20, 625335)
datetime.datetime(2022, 7, 5, 16, 46, 44, 883312)
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

  • after_now – include days in current month after today

  • tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

datetime(‘2012-04-04 11:02:02’)

Returns:

datetime

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_time_this_month()
...
datetime.datetime(2024, 11, 23, 18, 32, 0, 646912)
datetime.datetime(2024, 11, 21, 10, 34, 9, 675893)
datetime.datetime(2024, 11, 12, 8, 12, 20, 615339)
datetime.datetime(2024, 11, 7, 23, 34, 41, 465434)
datetime.datetime(2024, 11, 14, 18, 54, 40, 837558)
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

  • after_now – include days in current year after today

  • tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

datetime(‘2012-04-04 11:02:02’)

Returns:

datetime

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_time_this_year()
...
datetime.datetime(2024, 10, 7, 7, 42, 5, 278300)
datetime.datetime(2024, 9, 8, 14, 47, 44, 102176)
datetime.datetime(2024, 5, 19, 14, 47, 22, 913393)
datetime.datetime(2024, 3, 26, 22, 50, 55, 669155)
datetime.datetime(2024, 6, 18, 17, 26, 32, 295063)
day_of_month() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.day_of_month()
...
'13'
'14'
'03'
'20'
'27'
day_of_week() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.day_of_week()
...
'Shanba'
'Dushanba'
'Payshanba'
'Chorshanba'
'Chorshanba'
future_date(end_date: date | datetime | timedelta | str | int = '+30d', tzinfo: tzinfo | None = None) date

Get a Date object based on a random date between 1 day from now and a given date. Accepts date strings that can be recognized by strtotime().

Parameters:
  • end_date – Defaults to “+30d”

  • tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

dtdate(‘2030-01-01’)

Returns:

dtdate

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.future_date()
...
datetime.date(2024, 12, 22)
datetime.date(2024, 12, 19)
datetime.date(2024, 12, 10)
datetime.date(2024, 12, 5)
datetime.date(2024, 12, 12)
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. Accepts date strings that can be recognized by strtotime().

Parameters:
  • end_date – Defaults to “+30d”

  • tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

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

Returns:

datetime

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.future_datetime()
...
datetime.datetime(2024, 12, 23, 7, 12, 42, 594731)
datetime.datetime(2024, 12, 20, 16, 57, 19, 54467)
datetime.datetime(2024, 12, 10, 14, 2, 23, 116942)
datetime.datetime(2024, 12, 5, 17, 38, 53, 957843)
datetime.datetime(2024, 12, 13, 7, 20, 45, 566513)
iso8601(tzinfo: tzinfo | None = None, end_datetime: date | datetime | timedelta | str | int | None = None, sep: str = 'T', timespec: str = 'auto') str

Get a timestamp in ISO 8601 format (or one of its profiles).

Parameters:
  • tzinfo – timezone, instance of datetime.tzinfo subclass

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

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

Example:

‘2003-10-21T16:05:52+0000’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.iso8601()
...
'2016-05-13T20:28:25.425405'
'2011-08-14T18:01:41.248329'
'1993-02-03T13:11:19.059385'
'1984-03-20T13:36:37.373984'
'1998-01-27T14:21:15.168448'
month() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.month()
...
'05'
'08'
'02'
'03'
'01'
month_name() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.month_name()
...
'May'
'Avgust'
'Fevral'
'Mart'
'Yanvar'
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. Accepts date strings that can be recognized by strtotime().

Parameters:
  • start_date – Defaults to “-30d”

  • tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

dtdate(‘1999-02-02’)

Returns:

dtdate

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.past_date()
...
datetime.date(2024, 11, 21)
datetime.date(2024, 11, 18)
datetime.date(2024, 11, 9)
datetime.date(2024, 11, 4)
datetime.date(2024, 11, 11)
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. Accepts date strings that can be recognized by strtotime().

Parameters:
  • start_date – Defaults to “-30d”

  • tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

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

Returns:

datetime

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.past_datetime()
...
datetime.datetime(2024, 11, 23, 7, 12, 41, 594731)
datetime.datetime(2024, 11, 20, 16, 57, 18, 54467)
datetime.datetime(2024, 11, 10, 14, 2, 22, 116942)
datetime.datetime(2024, 11, 5, 17, 38, 52, 957843)
datetime.datetime(2024, 11, 13, 7, 20, 44, 566513)
pytimezone(*args: Any, **kwargs: Any) tzinfo | None

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

Example:

faker.pytimezone()

Returns:

dateutil.tz.tz.tzfile

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.pytimezone()
...
tzfile('/usr/share/zoneinfo/Indian/Maldives')
tzfile('/usr/share/zoneinfo/America/Barbados')
tzfile('/usr/share/zoneinfo/Europe/Stockholm')
tzfile('/usr/share/zoneinfo/Africa/Windhoek')
tzfile('/usr/share/zoneinfo/Asia/Qatar')
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

Example:

‘15:02:34’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.time()
...
'20:28:25'
'18:01:41'
'13:11:19'
'13:36:37'
'14:21:15'
time_delta(end_datetime: date | datetime | timedelta | str | int | None = None) timedelta

Get a timedelta object

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.time_delta()
...
datetime.timedelta(0)
datetime.timedelta(0)
datetime.timedelta(0)
datetime.timedelta(0)
datetime.timedelta(0)
time_object(end_datetime: date | datetime | timedelta | str | int | None = None) time

Get a time object

Example:

datetime.time(15, 56, 56, 772876)

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.time_object()
...
datetime.time(20, 28, 25, 425405)
datetime.time(18, 1, 41, 248329)
datetime.time(13, 11, 19, 59385)
datetime.time(13, 36, 37, 373984)
datetime.time(14, 21, 15, 168448)
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. distrib is a callable that accepts <datetime> and returns <value>

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.time_series()
...
<generator object Provider.time_series at 0x7f967a0c7220>
<generator object Provider.time_series at 0x7f967a0c7220>
<generator object Provider.time_series at 0x7f967a0c7220>
<generator object Provider.time_series at 0x7f967a0c7220>
<generator object Provider.time_series at 0x7f967a0c7220>
timezone() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.timezone()
...
'Indian/Maldives'
'America/Barbados'
'Europe/Stockholm'
'Africa/Windhoek'
'Asia/Qatar'
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.

Example:

1061306726.6

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.unix_time()
...
1463171305.4254048
1313344901.2483292
728745079.0593852
448637797.37398374
885910875.1684484
year() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.year()
...
'2016'
'2011'
'1993'
'1984'
'1998'

faker.providers.person

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

Bases: Provider

first_name() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_name()
...
'Mahdi'
'Muhsina'
'Asma'
'Muhammadamin'
'Muhammadamir'
first_name_female() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_name_female()
...
'Mehrimoh'
'Amina'
'Milana'
'Samiya'
'Asmira'
first_name_male() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_name_male()
...
'Bobur'
'Muhammadsolih'
'Sarvar'
'Imron'
'Akbar'
first_name_nonbinary() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_name_nonbinary()
...
'Mahdi'
'Muhsina'
'Asma'
'Muhammadamin'
'Muhammadamir'
language_name() str

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

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.language_name()
...
'Luba-Katanga'
'Malay'
'Aymara'
'Interlingue'
'Quechua'
last_name() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.last_name()
...
'Zakiyaxonova'
'Lazizov'
'Ayubov'
'Rayyonova'
'E’zozova'
last_name_female() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.last_name_female()
...
'Mehrimohova'
'Aminova'
'Milanova'
'Samiyeva'
'Asmiraeva'
last_name_male() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.last_name_male()
...
'Boburov'
'Muhammadsolihov'
'Sarvarov'
'Imronov'
'Akbarov'
last_name_nonbinary() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.last_name_nonbinary()
...
'Zakiyaxonova'
'Lazizov'
'Ayubov'
'Rayyonova'
'E’zozova'
name() str
Example:

‘John Doe’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.name()
...
'Aminova Milana'
'Akbar Nurmuhammadov'
'Muxlisayeva Sevinch'
'Anisayeva Hadija'
'Ismoilov Aziz'
name_female() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.name_female()
...
'Aminova Milana'
'Asmira Malikova'
'Muxlisayeva Sevinch'
'Anisayeva Hadija'
'Durdona Sabinova'
name_male() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.name_male()
...
'Muhammadsolihov Sarvar'
'Akbar Nurmuhammadov'
'Samandarov Ja’far'
'Diyorov Gabriel'
'Ismoil Azizov'
name_nonbinary() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.name_nonbinary()
...
'Aminova Milana'
'Akbar Nurmuhammadov'
'Muxlisayeva Sevinch'
'Anisayeva Hadija'
'Ismoilov Aziz'
prefix() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.prefix()
...
''
''
''
''
''
prefix_female() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.prefix_female()
...
''
''
''
''
''
prefix_male() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.prefix_male()
...
''
''
''
''
''
prefix_nonbinary() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.prefix_nonbinary()
...
''
''
''
''
''
suffix() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.suffix()
...
''
''
''
''
''
suffix_female() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.suffix_female()
...
''
''
''
''
''
suffix_male() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.suffix_male()
...
''
''
''
''
''
suffix_nonbinary() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.suffix_nonbinary()
...
''
''
''
''
''

faker.providers.phone_number

class faker.providers.phone_number.uz_UZ.Provider(generator: Any)

Bases: Provider

country_calling_code() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.country_calling_code()
...
'+687'
'+595'
'+880'
'+964'
'+41'
msisdn() str

https://en.wikipedia.org/wiki/MSISDN

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.msisdn()
...
'6048764759382'
'2194892411578'
'5659387784080'
'6097535139332'
'1158714841858'
phone_number() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.phone_number()
...
'+998 60 487 6475'
'+998 (82) 421-9489'
'+998 (41) 157 8156'
'+998 93 877 84 08'
'+998 (16) 097-53-51'