semvec/pypi-packages huggingface dataset:
brand-model2name 0.0.10
A simple package that takes a brand name as input and returns the corresponding model name.
License: MIT
Requires Python: >=3.8.0


# 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](https://github.com/KHwang9883/MobileModels)

## Installation
```shell
$ 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.
```python
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 to[GitHub Token](https://docs.github.com/cn/actions/security-guides/automatic-token-authentication)
pydmtxlib 0.2.3
Read and write Data Matrix from Python 3.8 and above.
License: MIT

Pydmtxlib
=========

Forked from `pylibdmtx <https://github.com/NaturalHistoryMuseum/pylibdmtx>`_

Read and write Data Matrix in Python 3.8+ using the
`libdmtx <http://libdmtx.sourceforge.net/>`_ library.

----

Features
--------

- Pure Python interface for ``libdmtx``
- Supports PIL/Pillow images, OpenCV/numpy arrays, and raw bytes
- Decodes barcode data and locations
- Minimal dependencies (only ``libdmtx`` native library required)

Installation
------------

macOS
^^^^^

.. code-block:: bash

    brew install libdmtx gettext

Linux (Ubuntu/Debian)
^^^^^^^^^^^^^^^^^^^^^^

.. code-block:: bash

    sudo apt-get install libdmtx0t64

Windows
^^^^^^^

Windows Python wheels **do not include** the required ``libdmtx`` DLLs.
You need to download and add the DLLs manually to your system PATH or your project folder.

Python package
^^^^^^^^^^^^^^

.. code-block:: bash

    pip install pydmtxlib

Usage example
-------------

Here is a simple example demonstrating how to **encode** a string into a Data Matrix barcode
and save it as an image, then **decode** it back:

.. code-block:: python

    from PIL import Image
    from pydmtxlib import encode, decode

    # Data to encode must be bytes
    data = b"Hello, Data Matrix!"

    # Encode the data
    encoded = encode(data)

    # Build a PIL image from raw pixels returned by encode()
    image = Image.frombytes('RGB', (encoded.width, encoded.height), encoded.pixels)

    # Save the image
    image.save("datamatrix.png")
    print("Data Matrix saved as 'datamatrix.png'")

    # Open the saved image and decode
    image = Image.open("datamatrix.png")
    results = decode(image)

    # Print decoded results
    for result in results:
        print("Decoded data:", result.data.decode("utf-8"))