Skip to main content

Fake data generator localized for African regions — names, phones, addresses, mobile money, national IDs, and more.

Project description

NiaFaker

Tests PyPI version License: MIT

Fake data generator localized for African regions. Names, phone numbers, mobile money, national IDs, and more — culturally accurate for 10 African economies.

Install

pip install niafaker

Usage

from niafaker import NiaFaker

fake = NiaFaker("tz")  # Tanzania

fake.name()            # "Baraka Kimaro"
fake.name(gender="f")  # "Amina Mwakasege"
fake.phone()           # "+255754832109"
fake.mobile_money()    # {"provider": "M-Pesa", "number": "+255754832109"}
fake.national_id()     # "19901234-12345-00001-01"
fake.company()         # "Bakhresa Holdings"
fake.amount()          # "TSh 425,000"
fake.address()         # "1234 Samora Avenue, Dodoma, Dodoma"

For reproducible output (useful in tests):

fake = NiaFaker("ke", seed=42)
fake.name()  # same result every time

Supported Countries

tz Tanzania · ke Kenya · ng Nigeria · za South Africa · gh Ghana · ug Uganda · rw Rwanda · et Ethiopia · eg Egypt · ma Morocco

NiaFaker.locales()  # {'tz': 'Tanzania', 'ke': 'Kenya', ...}

What You Can Generate

Personname(), first_name(), last_name(), email() Phonephone(), phone(carrier="Safaricom") Addresscity(), region(), address(), country() Companycompany(), registration_number() Mobile Moneymobile_money(), transaction_id() National IDnational_id() Currencyamount()

Contributing

See CONTRIBUTING.md. Adding a new country is just 7 JSON files and one line in the config.

License

MIT — Owden Godson

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

niafaker-1.0.0.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

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

niafaker-1.0.0-py3-none-any.whl (41.9 kB view details)

Uploaded Python 3

File details

Details for the file niafaker-1.0.0.tar.gz.

File metadata

  • Download URL: niafaker-1.0.0.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for niafaker-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e3a8f24c68805b6bf9d0645aaec97ce6904a7c71cfd5da5e3f0a820f34757225
MD5 fc86e56d7353bd296dfed134a5728f40
BLAKE2b-256 15fb7955fccfc895b786a9b11e794b8db977f4f2f67c859352bf22cc0bb2cf51

See more details on using hashes here.

File details

Details for the file niafaker-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: niafaker-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 41.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for niafaker-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2f04c2913e2375e0e3007fb34aeae40f14b8b21969a35597543c229d3637804
MD5 c84154099964b2280df0ec9ee40014c0
BLAKE2b-256 3cb1407e7c7192a35280bb0e02946226703e41a31bcffd55f8c268bd0851ef3f

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