Name | Adafruit-PlatformDetect JSON |
Version |
3.63.0
JSON |
| download |
home_page | None |
Summary | Platform detection for use by libraries like Adafruit-Blinka. |
upload_time | 2024-05-09 15:26:59 |
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/da/c8/53019ec5d49c0e088ed9bffd64c018d9a613d66ba7c7eb1954d1f31d5a9c/adafruit_platformdetect-3.63.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.63.0",
"project_urls": {
"Homepage": "https://github.com/adafruit/Adafruit_Python_PlatformDetect"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f1329cc53dff9ab76b2ba0ff143bf84e28ffec1297489d7181d8bd7c74dad7d8",
"md5": "05cf8347dd05d60686c8782982242ca2",
"sha256": "a82a86072963179f6bd5723e070b2e1786cc26d82fe8d3e40ff524b449d10abe"
},
"downloads": -1,
"filename": "Adafruit_PlatformDetect-3.63.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "05cf8347dd05d60686c8782982242ca2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 24200,
"upload_time": "2024-05-09T15:26:56",
"upload_time_iso_8601": "2024-05-09T15:26:56.789088Z",
"url": "https://files.pythonhosted.org/packages/f1/32/9cc53dff9ab76b2ba0ff143bf84e28ffec1297489d7181d8bd7c74dad7d8/Adafruit_PlatformDetect-3.63.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "dac853019ec5d49c0e088ed9bffd64c018d9a613d66ba7c7eb1954d1f31d5a9c",
"md5": "927675775cd7a84b368d962a6ff8e0b5",
"sha256": "6e7b5c3ff3f47a842c8c84107092edb17b0f712ca5295354a7e7ff442fd4e66e"
},
"downloads": -1,
"filename": "adafruit_platformdetect-3.63.0.tar.gz",
"has_sig": false,
"md5_digest": "927675775cd7a84b368d962a6ff8e0b5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 46676,
"upload_time": "2024-05-09T15:26:59",
"upload_time_iso_8601": "2024-05-09T15:26:59.179241Z",
"url": "https://files.pythonhosted.org/packages/da/c8/53019ec5d49c0e088ed9bffd64c018d9a613d66ba7c7eb1954d1f31d5a9c/adafruit_platformdetect-3.63.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-09 15:26:59",
"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"
}