Skip to main content

A simple package that takes a brand name as input and returns the corresponding model name.

Project description

brand-model2name

This is a simple package that takes a brand name as input and returns the corresponding model name.

Rely on KHwang9883's MobileModels

Installation

$ pip install brand-model2name

Example

Model2Name init need 2 parameters:

  1. brands:

    A list of brand names, can choose any brand name in the list which includes 'samsung', 'oneplus', 'apple', 'zte', 'honor', 'huawei', 'google', '360shouji', 'mitv', 'oppo', 'blackshark', 'meizu', 'nubia', 'vivo', 'sony', 'coolpad', 'smartisan', 'xiaomi', 'asus', 'nokia', 'lenovo', 'zhixuan', 'motorola', 'nothing', 'realme', 'letv'.

    The default value is set to all of the above brands

  2. device:

    Can choose any one from 'mobile', 'tv', 'wearable' and 'all'.

    The default value is set 'mobile'.

📔: Suggest to use a singleton object to use.

from model2name import Model2Name

m2n = Model2Name()
print(m2n.get_model_name("A1324"))
# Output:
# {"brand": "苹果", "model": "iPhone 3G (China mainland)"}
print(m2n.get_model_name("unknown-model"))
# Output:
# {}

# if you init just like this, it only has 'xiaomi' and 'apple' brands and their TV models.
m2n = Model2Name(device='tv', brands=['xiaomi', 'apple'])

GitHub Actions are supported and automatically updated daily. Please add GITHUB_TOKEN after Fork or PR, refer toGitHub Token

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

brand-model2name-0.0.5.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

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

brand_model2name-0.0.5-py3-none-any.whl (93.7 kB view details)

Uploaded Python 3

File details

Details for the file brand-model2name-0.0.5.tar.gz.

File metadata

  • Download URL: brand-model2name-0.0.5.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for brand-model2name-0.0.5.tar.gz
Algorithm Hash digest
SHA256 3305ca3e6df1964ccfea4676430de2dab8c5189cef6f7cb826972449c44990fd
MD5 2627b663f6cfae91405d2635dc0f2ba9
BLAKE2b-256 e9878999bcbe7196eb292ced406b629dd38ae4661c87bca95ef14011f6e83f66

See more details on using hashes here.

File details

Details for the file brand_model2name-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for brand_model2name-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d806618a75b144f7a42dbe89ac8dc3734721a60bed78ae4bc63b3189984aba31
MD5 1d8bf7f59f01b0d3a89e67dfc8d85ded
BLAKE2b-256 d35ff9f1fea5377f32f2280fc46525b964eb3553f740b9184b83bfd5cbd5109e

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