python-can


Namepython-can JSON
Version 4.5.0 PyPI version JSON
download
home_pageNone
SummaryController Area Network interface module for Python
upload_time2024-11-28 06:15:10
maintainerNone
docs_urlNone
authorpython-can contributors
requires_python>=3.8
licenseLGPL v3
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            python-can
==========

|pypi| |conda| |python_implementation| |downloads| |downloads_monthly|

|docs| |github-actions| |coverage| |mergify| |formatter|

.. |pypi| image:: https://img.shields.io/pypi/v/python-can.svg
   :target: https://pypi.python.org/pypi/python-can/
   :alt: Latest Version on PyPi

.. |conda| image:: https://img.shields.io/conda/v/conda-forge/python-can
   :target: https://github.com/conda-forge/python-can-feedstock
   :alt: Latest Version on conda-forge

.. |python_implementation| image:: https://img.shields.io/pypi/implementation/python-can
   :target: https://pypi.python.org/pypi/python-can/
   :alt: Supported Python implementations

.. |downloads| image:: https://static.pepy.tech/badge/python-can
   :target: https://pepy.tech/project/python-can
   :alt: Downloads on PePy

.. |downloads_monthly| image:: https://static.pepy.tech/badge/python-can/month
   :target: https://pepy.tech/project/python-can
   :alt: Monthly downloads on PePy

.. |formatter| image:: https://img.shields.io/badge/code%20style-black-000000.svg
   :target: https://github.com/python/black
   :alt: This project uses the black formatter.

.. |docs| image:: https://readthedocs.org/projects/python-can/badge/?version=stable
   :target: https://python-can.readthedocs.io/en/stable/
   :alt: Documentation

.. |github-actions| image:: https://github.com/hardbyte/python-can/actions/workflows/ci.yml/badge.svg
   :target: https://github.com/hardbyte/python-can/actions/workflows/ci.yml
   :alt: Github Actions workflow status

.. |coverage| image:: https://coveralls.io/repos/github/hardbyte/python-can/badge.svg?branch=develop
   :target: https://coveralls.io/github/hardbyte/python-can?branch=develop
   :alt: Test coverage reports on Coveralls.io

.. |mergify| image:: https://img.shields.io/endpoint.svg?url=https://api.mergify.com/v1/badges/hardbyte/python-can&style=flat
   :target: https://mergify.io
   :alt: Mergify Status

The **C**\ ontroller **A**\ rea **N**\ etwork is a bus standard designed
to allow microcontrollers and devices to communicate with each other. It
has priority based bus arbitration and reliable deterministic
communication. It is used in cars, trucks, boats, wheelchairs and more.

The ``can`` package provides controller area network support for
Python developers; providing common abstractions to
different hardware devices, and a suite of utilities for sending and receiving
messages on a can bus.

The library currently supports CPython as well as PyPy and runs on Mac, Linux and Windows.

==============================  ===========
Library Version                 Python
------------------------------  -----------
  2.x                           2.6+, 3.4+
  3.x                           2.7+, 3.5+
  4.0+                          3.7+
  4.3+                          3.8+
==============================  ===========


Features
--------

- common abstractions for CAN communication
- support for many different backends (see the `docs <https://python-can.readthedocs.io/en/stable/interfaces.html>`__)
- receiving, sending, and periodically sending messages
- normal and extended arbitration IDs
- `CAN FD <https://en.wikipedia.org/wiki/CAN_FD>`__ support
- many different loggers and readers supporting playback: ASC (CANalyzer format), BLF (Binary Logging Format by Vector), MF4 (Measurement Data Format v4 by ASAM), TRC, CSV, SQLite, and Canutils log
- efficient in-kernel or in-hardware filtering of messages on supported interfaces
- bus configuration reading from a file or from environment variables
- command line tools for working with CAN buses (see the `docs <https://python-can.readthedocs.io/en/stable/scripts.html>`__)
- more


Example usage
-------------

``pip install python-can``

.. code:: python

    # import the library
    import can

    # create a bus instance using 'with' statement,
    # this will cause bus.shutdown() to be called on the block exit;
    # many other interfaces are supported as well (see documentation)
    with can.Bus(interface='socketcan',
                  channel='vcan0',
                  receive_own_messages=True) as bus:

       # send a message
       message = can.Message(arbitration_id=123, is_extended_id=True,
                             data=[0x11, 0x22, 0x33])
       bus.send(message, timeout=0.2)

       # iterate over received messages
       for msg in bus:
           print(f"{msg.arbitration_id:X}: {msg.data}")

       # or use an asynchronous notifier
       notifier = can.Notifier(bus, [can.Logger("recorded.log"), can.Printer()])

You can find more information in the documentation, online at
`python-can.readthedocs.org <https://python-can.readthedocs.org/en/stable/>`__.


Discussion
----------

If you run into bugs, you can file them in our
`issue tracker <https://github.com/hardbyte/python-can/issues>`__ on GitHub.

`Stackoverflow <https://stackoverflow.com/questions/tagged/can+python>`__ has several
questions and answers tagged with ``python+can``.

Wherever we interact, we strive to follow the
`Python Community Code of Conduct <https://www.python.org/psf/codeofconduct/>`__.


Contributing
------------

See `doc/development.rst <doc/development.rst>`__ for getting started.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "python-can",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "python-can contributors",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/6a/4b/b6fd103c3f2eb0ae942e0704642d396ebbaf87f4d82d0102560cc738fdf1/python_can-4.5.0.tar.gz",
    "platform": null,
    "description": "python-can\n==========\n\n|pypi| |conda| |python_implementation| |downloads| |downloads_monthly|\n\n|docs| |github-actions| |coverage| |mergify| |formatter|\n\n.. |pypi| image:: https://img.shields.io/pypi/v/python-can.svg\n   :target: https://pypi.python.org/pypi/python-can/\n   :alt: Latest Version on PyPi\n\n.. |conda| image:: https://img.shields.io/conda/v/conda-forge/python-can\n   :target: https://github.com/conda-forge/python-can-feedstock\n   :alt: Latest Version on conda-forge\n\n.. |python_implementation| image:: https://img.shields.io/pypi/implementation/python-can\n   :target: https://pypi.python.org/pypi/python-can/\n   :alt: Supported Python implementations\n\n.. |downloads| image:: https://static.pepy.tech/badge/python-can\n   :target: https://pepy.tech/project/python-can\n   :alt: Downloads on PePy\n\n.. |downloads_monthly| image:: https://static.pepy.tech/badge/python-can/month\n   :target: https://pepy.tech/project/python-can\n   :alt: Monthly downloads on PePy\n\n.. |formatter| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n   :target: https://github.com/python/black\n   :alt: This project uses the black formatter.\n\n.. |docs| image:: https://readthedocs.org/projects/python-can/badge/?version=stable\n   :target: https://python-can.readthedocs.io/en/stable/\n   :alt: Documentation\n\n.. |github-actions| image:: https://github.com/hardbyte/python-can/actions/workflows/ci.yml/badge.svg\n   :target: https://github.com/hardbyte/python-can/actions/workflows/ci.yml\n   :alt: Github Actions workflow status\n\n.. |coverage| image:: https://coveralls.io/repos/github/hardbyte/python-can/badge.svg?branch=develop\n   :target: https://coveralls.io/github/hardbyte/python-can?branch=develop\n   :alt: Test coverage reports on Coveralls.io\n\n.. |mergify| image:: https://img.shields.io/endpoint.svg?url=https://api.mergify.com/v1/badges/hardbyte/python-can&style=flat\n   :target: https://mergify.io\n   :alt: Mergify Status\n\nThe **C**\\ ontroller **A**\\ rea **N**\\ etwork is a bus standard designed\nto allow microcontrollers and devices to communicate with each other. It\nhas priority based bus arbitration and reliable deterministic\ncommunication. It is used in cars, trucks, boats, wheelchairs and more.\n\nThe ``can`` package provides controller area network support for\nPython developers; providing common abstractions to\ndifferent hardware devices, and a suite of utilities for sending and receiving\nmessages on a can bus.\n\nThe library currently supports CPython as well as PyPy and runs on Mac, Linux and Windows.\n\n==============================  ===========\nLibrary Version                 Python\n------------------------------  -----------\n  2.x                           2.6+, 3.4+\n  3.x                           2.7+, 3.5+\n  4.0+                          3.7+\n  4.3+                          3.8+\n==============================  ===========\n\n\nFeatures\n--------\n\n- common abstractions for CAN communication\n- support for many different backends (see the `docs <https://python-can.readthedocs.io/en/stable/interfaces.html>`__)\n- receiving, sending, and periodically sending messages\n- normal and extended arbitration IDs\n- `CAN FD <https://en.wikipedia.org/wiki/CAN_FD>`__ support\n- many different loggers and readers supporting playback: ASC (CANalyzer format), BLF (Binary Logging Format by Vector), MF4 (Measurement Data Format v4 by ASAM), TRC, CSV, SQLite, and Canutils log\n- efficient in-kernel or in-hardware filtering of messages on supported interfaces\n- bus configuration reading from a file or from environment variables\n- command line tools for working with CAN buses (see the `docs <https://python-can.readthedocs.io/en/stable/scripts.html>`__)\n- more\n\n\nExample usage\n-------------\n\n``pip install python-can``\n\n.. code:: python\n\n    # import the library\n    import can\n\n    # create a bus instance using 'with' statement,\n    # this will cause bus.shutdown() to be called on the block exit;\n    # many other interfaces are supported as well (see documentation)\n    with can.Bus(interface='socketcan',\n                  channel='vcan0',\n                  receive_own_messages=True) as bus:\n\n       # send a message\n       message = can.Message(arbitration_id=123, is_extended_id=True,\n                             data=[0x11, 0x22, 0x33])\n       bus.send(message, timeout=0.2)\n\n       # iterate over received messages\n       for msg in bus:\n           print(f\"{msg.arbitration_id:X}: {msg.data}\")\n\n       # or use an asynchronous notifier\n       notifier = can.Notifier(bus, [can.Logger(\"recorded.log\"), can.Printer()])\n\nYou can find more information in the documentation, online at\n`python-can.readthedocs.org <https://python-can.readthedocs.org/en/stable/>`__.\n\n\nDiscussion\n----------\n\nIf you run into bugs, you can file them in our\n`issue tracker <https://github.com/hardbyte/python-can/issues>`__ on GitHub.\n\n`Stackoverflow <https://stackoverflow.com/questions/tagged/can+python>`__ has several\nquestions and answers tagged with ``python+can``.\n\nWherever we interact, we strive to follow the\n`Python Community Code of Conduct <https://www.python.org/psf/codeofconduct/>`__.\n\n\nContributing\n------------\n\nSee `doc/development.rst <doc/development.rst>`__ for getting started.\n",
    "bugtrack_url": null,
    "license": "LGPL v3",
    "summary": "Controller Area Network interface module for Python",
    "version": "4.5.0",
    "project_urls": {
        "changelog": "https://github.com/hardbyte/python-can/blob/develop/CHANGELOG.md",
        "documentation": "https://python-can.readthedocs.io",
        "homepage": "https://github.com/hardbyte/python-can",
        "repository": "https://github.com/hardbyte/python-can"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6f383faaa0460705f09f5fbae8e44ad4e12c6a90b12535797b9fba67f5271fed",
                "md5": "7af9639556bdba17224e09fa4a19b6a8",
                "sha256": "1eec66833c1ac76a7e3d636ee0f8b4ba2752e892bab1c56ce74308b2216b5445"
            },
            "downloads": -1,
            "filename": "python_can-4.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7af9639556bdba17224e09fa4a19b6a8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 268989,
            "upload_time": "2024-11-28T06:15:08",
            "upload_time_iso_8601": "2024-11-28T06:15:08.813284Z",
            "url": "https://files.pythonhosted.org/packages/6f/38/3faaa0460705f09f5fbae8e44ad4e12c6a90b12535797b9fba67f5271fed/python_can-4.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6a4bb6fd103c3f2eb0ae942e0704642d396ebbaf87f4d82d0102560cc738fdf1",
                "md5": "e22638e3e5d102e428614715dd04910f",
                "sha256": "d3684cebe5b028a148c1742b3a45cec4fcaf83a7f7c52d0680b2eaeaf52f8eb7"
            },
            "downloads": -1,
            "filename": "python_can-4.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e22638e3e5d102e428614715dd04910f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 1190119,
            "upload_time": "2024-11-28T06:15:10",
            "upload_time_iso_8601": "2024-11-28T06:15:10.737849Z",
            "url": "https://files.pythonhosted.org/packages/6a/4b/b6fd103c3f2eb0ae942e0704642d396ebbaf87f4d82d0102560cc738fdf1/python_can-4.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-28 06:15:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hardbyte",
    "github_project": "python-can",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "python-can"
}
        
Elapsed time: 0.32670s