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.6.tar.gz (82.7 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.6-py3-none-any.whl (93.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: brand-model2name-0.0.6.tar.gz
  • Upload date:
  • Size: 82.7 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.6.tar.gz
Algorithm Hash digest
SHA256 192ab2e9e8e4dc6766d91e057b51f608549975ab64f2b3d70f75263b5bc1c1f9
MD5 0cedc223e31e426448f1d82793c10b0f
BLAKE2b-256 6712fbed0de39c60f2641191cb6c05c05c925410bf8dc9c89451a6d4a979ffac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for brand_model2name-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 cc8cc83a366242dbbe8f1018c354e7c961447666acb69b842dd16cf5ec4c7ea2
MD5 ac279518a6976dcef756f5b2d9b40757
BLAKE2b-256 bc8b621b168f2b8e89eebc5499df7f12191d9da38018b8fbdadf8d83c9cf4b18

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