library for get operation and region to phone number Russia
Project description
phoneparser library
library for get operation and region to phone number Russia
install
git clone https://github.com/The-wartexny/phoneparser.git
cd phoneparser
or pip install
pip install ru-phone-parser
fast start
import phoneparser
parser = phoneparser.PhoneParser()
print(parser.parse('79161234567'))
batch processing
from phoneparser import PhoneParser
parser = PhoneParser()
numbers = ['79275842018', '79161234567', '+78123334455']
results = parser.parse_batch(numbers)
for number, info in results.items():
print(f"{number}: {info['operator']} - {info['region']}")
working with the cache
parser = PhoneParser()
# Первый запрос — загрузка из базы
result1 = parser.parse('79275842018')
# Второй запрос с тем же номером — из кэша (быстрее)
result2 = parser.parse('78123334455')
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
ru_phone_parser-1.0.1.tar.gz
(228.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ru_phone_parser-1.0.1.tar.gz.
File metadata
- Download URL: ru_phone_parser-1.0.1.tar.gz
- Upload date:
- Size: 228.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21add1b1a26258e6fefe780349bce982265e722f33f136b510f8958e4c71ad79
|
|
| MD5 |
35c90c78a8b897e945ca0e20da70fa34
|
|
| BLAKE2b-256 |
d6d75caae352f1f1bd1cfebea60953c4f30f4a4c081bd9e7889c0f1bba98738a
|
File details
Details for the file ru_phone_parser-1.0.1-py3-none-any.whl.
File metadata
- Download URL: ru_phone_parser-1.0.1-py3-none-any.whl
- Upload date:
- Size: 254.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58e8787b1d152d2ad183cac8916343f8a909a5beba0bbbb66c8b770ba754324e
|
|
| MD5 |
2556f3b2403ac3b48f444c03840085a4
|
|
| BLAKE2b-256 |
8129f8bf15927757efc8347481d66a2a87eeb2aea2b8f7bba7b4fbdcfa31c5f6
|