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
Metadata
Release files for brand-model2name 0.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| brand-model2name-0.0.10.tar.gz | 90.6 kB | Without provenance | Details for brand-model2name-0.0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| brand_model2name-0.0.10-py3-none-any.whl | Python 3 | none | any | Details for brand_model2name-0.0.10-py3-none-any.whl |
Total release size: 192.6 kB
Release files / brand-model2name-0.0.10.tar.gz
| Download URL | brand-model2name-0.0.10.tar.gz |
|---|---|
| Size | 90.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
989a442caa82268291e71f4c9a42197f8702af40f73db187c37b6454fa898e55
|
|
BLAKE2b-256 checksum How to use checksums |
6ce8bd746ac43b233e9dfea355e66b87deb8e42cf630cbe53383a706137b671f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.12
|
Release files / brand_model2name-0.0.10-py3-none-any.whl
| Download URL | brand_model2name-0.0.10-py3-none-any.whl |
|---|---|
| Size | 102.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8659d6e065f15432396f15b977668c6d2a84f08a56f96fd2267c664d6c339241
|
|
BLAKE2b-256 checksum How to use checksums |
d4856a08152d12a80391cccd0f645fb5e4543476fe5e0b1df7c43097b2b62583
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.12
|
Security for brand-model2name 0.0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.