Name | Adafruit-PlatformDetect JSON |
Version |
3.75.0
JSON |
| download |
home_page | None |
Summary | Platform detection for use by libraries like Adafruit-Blinka. |
upload_time | 2024-10-07 16:10:51 |
maintainer | None |
docs_url | None |
author | None |
requires_python | None |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
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>`_.
Raw data
{
"_id": null,
"home_page": null,
"name": "Adafruit-PlatformDetect",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Adafruit Industries <circuitpython@adafruit.com>",
"download_url": "https://files.pythonhosted.org/packages/1a/93/1883dea603c87caabb858759a4d737721dbd995c59dd014ef5538777f6fb/adafruit_platformdetect-3.75.0.tar.gz",
"platform": null,
"description": "Introduction\n============\n\n.. image:: https://readthedocs.org/projects/adafruit-platformdetect/badge/?version=latest\n :target: https://circuitpython.readthedocs.io/projects/platformdetect/en/latest/\n :alt: Documentation Status\n\n.. image:: https://img.shields.io/discord/327254708534116352.svg\n :target: https://adafru.it/discord\n :alt: Discord\n\n.. image:: https://github.com/adafruit/Adafruit_Python_PlatformDetect/workflows/Build%20CI/badge.svg\n :target: https://github.com/adafruit/Adafruit_Python_PlatformDetect/actions\n :alt: Build Status\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n :alt: Code Style: Black\n\nThis library provides best-guess platform detection for a range of single-board\ncomputers and (potentially) other platforms. It was written primarily for use\nin `Adafruit_Blinka <https://github.com/adafruit/Adafruit_Blinka>`_, but may be\nuseful in other contexts.\n\nPlatform detection is divided into \"chip\" and \"board\" detection, with the latter\ngenerally dependent on the former. Platform info is gathered from:\n\n - Python's `sys.platform`\n\n - Various files on Linux systems:\n\n - /proc/cpuinfo (for processor info, Raspberry Pi hardware revisions, etc.)\n\n - /proc/device-tree/compatible (for 96Boards info)\n\n - Beaglebone EEPROM board IDs\n\n - Distribution-specific files such as /etc/armbian-release.\n\nDependencies\n=============\nThis driver depends on:\n\n* Python 3.7 or higher\n\nInstalling from PyPI\n=====================\n\nOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from\nPyPI <https://pypi.org/project/Adafruit-PlatformDetect/>`_. To install for current user:\n\n.. code-block:: shell\n\n pip3 install Adafruit-PlatformDetect\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n sudo pip3 install Adafruit-PlatformDetect\n\nTo install in a virtual environment in your current project:\n\n.. code-block:: shell\n\n mkdir project-name && cd project-name\n python3 -m venv .env\n source .env/bin/activate\n pip3 install Adafruit-PlatformDetect\n\nUsage Example\n=============\n\n.. code-block:: python\n\n from adafruit_platformdetect import Detector\n detector = Detector()\n print(\"Chip id: \", detector.chip.id)\n print(\"Board id: \", detector.board.id)\n\n # Check for specific board models:\n print(\"Pi 3B+? \", detector.board.RASPBERRY_PI_3B_PLUS)\n print(\"BBB? \", detector.board.BEAGLEBONE_BLACK)\n print(\"Orange Pi PC? \", detector.board.ORANGE_PI_PC)\n print(\"generic Linux PC? \", detector.board.GENERIC_LINUX_PC)\n\nContributing\n============\n\nContributions are welcome! Please read our `Code of Conduct\n<https://github.com/adafruit/Adafruit_Python_PlatformDetect/blob/master/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n\nDocumentation\n=============\n\nFor 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>`_.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Platform detection for use by libraries like Adafruit-Blinka.",
"version": "3.75.0",
"project_urls": {
"Homepage": "https://github.com/adafruit/Adafruit_Python_PlatformDetect"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3c249184f1863770bb982b808640c5b6a5c3ea88d00fd089a3c0ea1a13e1369a",
"md5": "ac4bb91fc0bf7350aa3dc630ff576d64",
"sha256": "f523a118bfe270b17c3e1eb1f6115a75dfc8f8f029a67ae51f4934571229c5b8"
},
"downloads": -1,
"filename": "Adafruit_PlatformDetect-3.75.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ac4bb91fc0bf7350aa3dc630ff576d64",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 25268,
"upload_time": "2024-10-07T16:10:50",
"upload_time_iso_8601": "2024-10-07T16:10:50.510852Z",
"url": "https://files.pythonhosted.org/packages/3c/24/9184f1863770bb982b808640c5b6a5c3ea88d00fd089a3c0ea1a13e1369a/Adafruit_PlatformDetect-3.75.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1a931883dea603c87caabb858759a4d737721dbd995c59dd014ef5538777f6fb",
"md5": "4e11e74676b982375f0ea9e93ddf6643",
"sha256": "e40c2f9f3c34b6066145756c8533aecdeadd39127ee50087dcf0c1ee96e3081d"
},
"downloads": -1,
"filename": "adafruit_platformdetect-3.75.0.tar.gz",
"has_sig": false,
"md5_digest": "4e11e74676b982375f0ea9e93ddf6643",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 47768,
"upload_time": "2024-10-07T16:10:51",
"upload_time_iso_8601": "2024-10-07T16:10:51.725520Z",
"url": "https://files.pythonhosted.org/packages/1a/93/1883dea603c87caabb858759a4d737721dbd995c59dd014ef5538777f6fb/adafruit_platformdetect-3.75.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-07 16:10:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "adafruit",
"github_project": "Adafruit_Python_PlatformDetect",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "adafruit-platformdetect"
}