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:
-
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
-
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
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
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 brand-model2name-0.0.7.tar.gz.
File metadata
- Download URL: brand-model2name-0.0.7.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bdd9b0d77e33054e27b32dd1dfb5f666390808d05dbd5ca6f6321294e9430a5
|
|
| MD5 |
7488104a66895d863b1189199c7a18c4
|
|
| BLAKE2b-256 |
ab44263abc16a40343b0c393106bdaef5845b0099599f22327648888bc238ad0
|
File details
Details for the file brand_model2name-0.0.7-py3-none-any.whl.
File metadata
- Download URL: brand_model2name-0.0.7-py3-none-any.whl
- Upload date:
- Size: 93.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adbd5aaf1a51bca7af5766fa489c25821a4619ca49e861f97a3ee51767a84a0b
|
|
| MD5 |
0c5a26c6420fcb8eb7d67f8d607033bc
|
|
| BLAKE2b-256 |
d52d56dc37acc5766b0e9bb19b1c0c10be67a9311767e631ee4ff814aa2362a9
|