Skip to main content

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


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.2.tar.gz (228.4 kB view details)

Uploaded Source

Built Distribution

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

ru_phone_parser-1.0.2-py3-none-any.whl (254.2 kB view details)

Uploaded Python 3

File details

Details for the file ru_phone_parser-1.0.2.tar.gz.

File metadata

  • Download URL: ru_phone_parser-1.0.2.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

Hashes for ru_phone_parser-1.0.2.tar.gz
Algorithm Hash digest
SHA256 64fcf316f521a675fb955db2c6690ca5275b46c77aeeff76cb33bb93405ca297
MD5 a5b49188f50a66e046866a4820a1e3f9
BLAKE2b-256 ac1932cec7a6d449364b05834ffcfe382232d097ddee5e956bddf4dc319293b9

See more details on using hashes here.

File details

Details for the file ru_phone_parser-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for ru_phone_parser-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 33d769510377235b65eb4768acca9430ed608a0ef87f5b83bd44e17e1d1e90af
MD5 5412a160811c3b94417d8222973e1285
BLAKE2b-256 f330fb429005dcb68db307fc63abe44bf6ce3345bb30f81bca78445c0a0e12f1

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