Adafruit-PlatformDetect-3.9.0
3.9.0
3.8.0
3.7.0
3.6.0
3.5.0
3.40.2
3.4.1
3.4.0
3.39.0
3.38.0
3.37.0
3.36.0
3.35.0
3.34.0
3.33.0
3.32.0
3.31.0
3.30.0
3.3.0
3.29.0
3.28.0
3.27.3
3.27.2
3.27.1
3.27.0
3.26.0
3.25.0
3.24.1
3.24.0
3.23.0
3.22.1
3.22.0
3.21.1
3.21.0
3.20.1
3.20.0
3.2.0
3.19.6
3.19.5
3.19.4
3.19.3
3.19.2
3.19.1
3.19.0
3.18.0
3.17.2
3.17.1
3.17.0
3.16.1
3.16.0
3.15.3
3.15.2
3.15.1
3.15.0
3.14.2
3.14.1
3.14.0
3.13.4
3.13.3
3.13.2
3.13.1
3.13.0
3.12.0
3.11.0
3.10.0
3.1.1
3.1.0
3.0.0
2.9.1
2.9.0
2.8.0
2.7.0
2.6.1
2.6.0
2.5.0
2.4.0
2.3.0
2.28.0
2.27.1
2.27.0
2.26.0
2.25.0
2.24.0
2.23.0
2.22.3
2.22.2
2.22.1
2.22.0
2.21.0
2.20.0
2.2.0
2.19.2
2.19.1
2.19.0
2.18.2
2.18.1
2.18.0
2.17.0
2.16
2.15.0
2.14.4
2.14.3
2.14.2
2.14.1
2.14.0
2.13.3
2.13.2
2.13.1
2.13.0
2.12.0
2.11.1
2.11.0
2.10.0
2.1.0
2.0.1
2.0.0
1.4.5
1.4.4
1.4.3
1.4.2
1.4.1
1.4.0
1.3.8
1.3.6
1.3.5
1.3.4
1.3.3
1.3.2
1.3.1
1.3.0
1.2.2
1.2.1
1.2.0
1.1.0
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
0.14
0.0.9
0.0.8
0.0.7
0.0.6
0.0.4
0.0.3
0.0.2
0.0.13
0.0.12
0.0.11
0.0.10
توضیحات
Platform detection for use by libraries like Adafruit-Blinka.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | Adafruit-PlatformDetect-3.9.0 |
| نام | Adafruit-PlatformDetect |
| نسخه کتابخانه | 3.9.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | Adafruit Industries <circuitpython@adafruit.com> |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/Adafruit-PlatformDetect/ |
| مجوز | MIT |
Introduction
============
.. image:: https://readthedocs.org/projects/adafruit-platformdetect/badge/?version=latest
:target: https://circuitpython.readthedocs.io/projects/platformdetect/en/latest/
:alt: Documentation Status
.. image:: https://img.shields.io/discord/327254708534116352.svg
:target: https://adafru.it/discord
:alt: Discord
.. image:: https://github.com/adafruit/Adafruit_Python_PlatformDetect/workflows/Build%20CI/badge.svg
:target: https://github.com/adafruit/Adafruit_Python_PlatformDetect/actions
:alt: Build Status
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Code Style: Black
This library provides best-guess platform detection for a range of single-board
computers and (potentially) other platforms. It was written primarily for use
in `Adafruit_Blinka <https://github.com/adafruit/Adafruit_Blinka>`_, but may be
useful in other contexts.
Platform detection is divided into "chip" and "board" detection, with the latter
generally dependent on the former. Platform info is gathered from:
- Python's `sys.platform`
- Various files on Linux systems:
- /proc/cpuinfo (for processor info, Raspberry Pi hardware revisions, etc.)
- /proc/device-tree/compatible (for 96Boards info)
- Beaglebone EEPROM board IDs
- Distribution-specific files such as /etc/armbian-release.
Dependencies
=============
This driver depends on:
* Python 3.7 or higher
Installing from PyPI
=====================
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
PyPI <https://pypi.org/project/Adafruit-PlatformDetect/>`_. To install for current user:
.. code-block:: shell
pip3 install Adafruit-PlatformDetect
To install system-wide (this may be required in some cases):
.. code-block:: shell
sudo pip3 install Adafruit-PlatformDetect
To install in a virtual environment in your current project:
.. code-block:: shell
mkdir project-name && cd project-name
python3 -m venv .env
source .env/bin/activate
pip3 install Adafruit-PlatformDetect
Usage Example
=============
.. code-block:: python
from adafruit_platformdetect import Detector
detector = Detector()
print("Chip id: ", detector.chip.id)
print("Board id: ", detector.board.id)
# Check for specific board models:
print("Pi 3B+? ", detector.board.RASPBERRY_PI_3B_PLUS)
print("BBB? ", detector.board.BEAGLEBONE_BLACK)
print("Orange Pi PC? ", detector.board.ORANGE_PI_PC)
print("generic Linux PC? ", detector.board.GENERIC_LINUX_PC)
Contributing
============
Contributions are welcome! Please read our `Code of Conduct
<https://github.com/adafruit/Adafruit_Python_PlatformDetect/blob/master/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.
Documentation
=============
For information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.
نحوه نصب
نصب پکیج whl Adafruit-PlatformDetect-3.9.0:
pip install Adafruit-PlatformDetect-3.9.0.whl
نصب پکیج tar.gz Adafruit-PlatformDetect-3.9.0:
pip install Adafruit-PlatformDetect-3.9.0.tar.gz