Skip to main content

Nepali name generator, surname and caste/ethnic group utilities

Project description

nepalpy 🇳🇵

Nepali Name & Caste Generator – A lightweight, zero-dependency Python library to generate realistic Nepali names, surnames (castes), and caste/ethnic group categories.

nepalpy is designed for developers, researchers, and students who need realistic Nepali demographic data for testing, simulations, analytics, or educational projects.


✨ Why nepalpy?

Nepali names and caste systems are culturally rich and diverse, but most fake-data libraries don’t support Nepal properly.

nepalpy fills this gap by providing:

  • Authentic Nepali first names (male & female)
  • Large, curated caste/surname datasets
  • Accurate caste category mapping
  • Simple, fast, dependency-free API

🚀 Features

  • ✅ Generate random Nepali first names

  • ✅ Generate male, female, or mixed names

  • ✅ Filter names by starting or ending letters

  • ✅ Generate surnames (castes)

  • ✅ Generate full names (first + last)

  • ✅ Access 100+ Nepali castes/surnames

  • ✅ Identify caste category:

    • khas-arya
    • janajati
    • newar
    • dalit
    • madhesi
  • ✅ All outputs normalized to lowercase

  • ✅ Zero external dependencies


📦 Installation

pip install nepalpy

Python 3.7+ supported.


🧠 Basic Usage

from nepalpy.name import name, last_name, full_name, cast, cast_category

🧑 First Name Generator

Generate random names (mixed)

name(5)

Output:

['sushil', 'dibisha', 'rama', 'gita', 'dipesh']

Generate male & female names separately

name(male=3, female=2)

Output:

['ram', 'suman', 'binod', 'gita', 'sita']

🔠 Filter Names

Names starting with a letter

name_start_with('s', count=5)

Output:

['suresh', 'suman', 'sunita', 'sagar', 'sita']

Names ending with a letter

name_end_with('a', count=5)

Output:

['gita', 'sita', 'anita', 'rekha', 'laxmita']

👨‍👩‍👧 Surname / Caste Generator

Generate a random caste (surname)

last_name()

Output:

'maharjan'

Generate multiple castes

cast(5)

Output:

['thapa', 'kami', 'tamang', 'shrestha', 'yadav']

🧾 Full Name Generator

full_name()

Output:

'sushil shrestha'

🏷️ Caste Category Detection

Identify the caste/ethnic group for a given surname.

cast_category('Kami')

Output:

'dalit'

More examples:

cast_category('Thapa')      # khas-arya
cast_category('Maharjan')   # janajati
cast_category('Yadav')      # madhesi

📚 Supported Caste Categories

  • khas-arya (bahun, chhetri, thakuri, sanyasi)
  • janajati (tamang, gurung, magar, rai, limbu, etc.)
  • newar (shrestha, maharjan, sakya, bajracharya, etc.)
  • dalit (kami, damai, sarki, bishwokarma, etc.)
  • madhesi (yadav, kurmi, teli, chamar, etc.)

All mappings are configurable and expandable.


🧪 Use Cases

  • Fake data generation for Nepali apps
  • Backend testing & QA automation
  • Academic & demographic simulations
  • Machine learning datasets
  • Forms & validation testing
  • Government / NGO software prototyping

🛠️ Design Philosophy

  • 🔹 Simple API
  • 🔹 Human-readable outputs
  • 🔹 Culturally aware data
  • 🔹 No third-party dependencies
  • 🔹 Easy to extend

🤝 Contributing

Contributions are welcome!

You can help by:

  • Adding more names
  • Improving caste mappings
  • Adding aliases & spelling variants
  • Writing tests
  • Improving documentation

📄 License

MIT License © 2026


🇳🇵 Made for Nepal

Built with ❤️ to support Nepali developers and researchers.

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

nepalpy-1.2.1.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nepalpy-1.2.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file nepalpy-1.2.1.tar.gz.

File metadata

  • Download URL: nepalpy-1.2.1.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for nepalpy-1.2.1.tar.gz
Algorithm Hash digest
SHA256 c14597c441c237a6ac89319afd922a4bb8d508403b7e98c7e949616b0f0c97ea
MD5 5ee0ee446780c6dd069fdd53bd69063b
BLAKE2b-256 c05e0de9ccca3a71e62d56784b3a1a70fb7afc0d0783030d9c4d8a09d25c5df0

See more details on using hashes here.

File details

Details for the file nepalpy-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: nepalpy-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for nepalpy-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 39b2a6c518352b7ae272ebc62430c14007165b75ab0c12ad63431d32b7d7488e
MD5 cdf9e76659b9a643a19256c017c99d56
BLAKE2b-256 7a190d55133c19701f24b9a7141fe4cf476bb547f37f9e521551bd6fd5c6fdf8

See more details on using hashes here.

Supported by

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