Skip to main content

A Python library for generating random Persian (Farsi) names.

Project description

persian-names

PyPI GitHub

A Python library for generating random Persian (Farsi) names.

This package generates frequently logical names (a mix of popular Persian and Arabic names with common Persian family name suffixes).

Installation

Install from PyPI with pip by typing in your favorite terminal:

pip install persian-names

Usage

Let's take a look at what an example test case would look like using persian-names.

Generate Persian Full Names in Farsi:

from persian_names import fullname_fa

fullname_fa('male')   # or fullname_fa('m')
fullname_fa('female') # or fullname_fa('f')
fullname_fa('random') # or fullname_fa('r')

Example:

from persian_names import fullname_fa

print(fullname_fa('m')) # اشکان محمدرضائیان
print(fullname_fa('f')) # مهسا امینی
print(fullname_fa('r')) # بیتا خسروی راد

Generate Persian Full Names in English:

from persian_names import fullname_en

fullname_en('male')   # or fullname_en('m')
fullname_en('female') # or fullname_en('f')
fullname_en('random') # or fullname_en('r')

Example:

from persian_names import fullname_en

print(fullname_en('m')) # Arsalan Mohammadi
print(fullname_en('f')) # Sara Alipour
print(fullname_en('r')) # Danial Ferdosi

Generate First Names and Last Names in Farsi:

from persian_names import *

# First Name
firstname_fa('male')   # or firstname_fa('m')
firstname_fa('female') # or firstname_fa('f')
firstname_fa('random') # or firstname_fa('r')

# Last Name
lastname_fa()

Example:

from persian_names import *

print(firstname_fa('m')) # آرمان
print(firstname_fa('f')) # ساحل
print(firstname_fa('r')) # علیرضا
print(lastname_fa())     # شیخ اسماعیلی

Generate First Names and Last Names in English:

from persian_names import *

# First Name
firstname_en('male')   # or firstname_en('m')
firstname_en('female') # or firstname_en('f')
firstname_en('random') # or firstname_en('r')

# Last Name
lastname_en()

Example:

from persian_names import *

print(firstname_en('m')) # Mehrad
print(firstname_en('f')) # Darya
print(firstname_en('r')) # Baran
print(lastname_en())     # Bakhtiarizadeh

License

persian-names is available under the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

persian-names-1.3.4.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

persian_names-1.3.4-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file persian-names-1.3.4.tar.gz.

File metadata

  • Download URL: persian-names-1.3.4.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for persian-names-1.3.4.tar.gz
Algorithm Hash digest
SHA256 aa4f2cc803cfb27cfcd3aaa3ed62cbe7cf8355b736e1d0a04ee08f27c75da431
MD5 7a822cc0e11359e39bdf0e3cd0daf5f2
BLAKE2b-256 54f537c4551c03c86accdc612fa003cf0fd04942c39a3c10e0b0b63ca0bd8b27

See more details on using hashes here.

Provenance

File details

Details for the file persian_names-1.3.4-py3-none-any.whl.

File metadata

File hashes

Hashes for persian_names-1.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2b3369fe1717619fc97ffe50df2171943e549d4f127b281f4cba77a770a054d9
MD5 e220e7294d1f0b8bc55140570ec288d2
BLAKE2b-256 a422305e6e1d65182b79e12d3eb254789279c542e027a1ff4de127bb4037563c

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page