A package for nepali mobile number
Project description
Nepali Phone Number
Nepali Phone Number is a Python library for dealing with nepali phone numbers with both nepali and english inputs.
Installation
Use the package manager pip to install nepali-phone-number.
pip install nepali-phone-number
Usage
Nepali Phone Number
from nepali_phone_number import NepaliPhoneNumber
phone_number = NepaliPhoneNumber(nepali_number_input='९८४६५११९६२') # for nepali input
phone_number.convert_to_english() # returns "9846511962"
phone_number.is_valid_number() # returns "True" for valid number and "False" for invalid number
phone_number.get_number_detail() # returns number detail eg. {'number': '9846511962', 'network_provider': 'NTC'}
phone_number.get_number_detail() # returns {'number': '9816154724', 'network_provider': 'NCELL', 'zone': 'Gandaki', 'sim_type': 'Prepaid'}
# in case of ncell number
phone_number = NepaliPhoneNumber(english_number_input='9846511962') # for english input
phone_number.convert_to_nepali() # returns "९८४६५११९६२"
Nepali LandLine Number
from nepali_phone_number import NepaliLandLineNumber
land_line_number = NepaliLandLineNumber(nepali_number_input='०६१५२८५१८') # for nepali input
land_line_number.convert_to_english() # returns "061538518"
land_line_number.is_valid_number() # returns "True" for valid number and "False" for invalid number
land_line_number.get_number_detail() # returns number detail eg. {'number': '061538518', 'area': 'Kaski'}
phone_number = NepaliLandLineNumber(english_number_input='061538518') # for english input
phone_number.convert_to_nepali() # returns "०६१५२८५१८"
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file nepali-phone-number-0.0.3.tar.gz
.
File metadata
- Download URL: nepali-phone-number-0.0.3.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a61fee9987c5112f8dc30ef62ab448a3e097726600f73898f1e80a661e528f0 |
|
MD5 | 8990a5a33b420654341c7c96307e5a97 |
|
BLAKE2b-256 | ad4294ed25e664b9bcc3db63ad9113a286384f2df2eb73d3ef4925a2f5a90b82 |