python-can-remote


Namepython-can-remote JSON
Version 0.2.2 PyPI version JSON
download
home_pagehttps://github.com/christiansandberg/python-can-remote
SummaryCAN over network bridge for Python
upload_time2024-06-28 09:32:43
maintainerNone
docs_urlNone
authorChristian Sandberg
requires_pythonNone
licenseMIT
keywords can tcp websocket
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            CAN over network bridge for Python
==================================

Creates a CAN over TCP/IP bridge for use with python-can_.


Installation
------------

Install using pip::

    $ pip install python-can-remote


Usage
-----

Start server from command line::

    $ python -m can_remote --interface=virtual --channel=0 --bitrate=500000


Create python-can bus:

.. code-block:: python

    import can

    # Create a connection to server. Any config is passed to server.
    bus = can.Bus('ws://localhost:54701/',
                  bustype='remote',
                  bitrate=500000,
                  receive_own_messages=True)

    # Send messages
    msg = can.Message(arbitration_id=0x12345, data=[1,2,3,4,5,6,7,8])
    bus.send(msg)

    # Receive messages
    msg2 = bus.recv(1)
    print(msg2)

    # Disconnect
    bus.shutdown()


Web interface
-------------

There is also a basic web interface for inspecting the CAN traffic
using a browser.
It is available on the same address using HTTP, e.g. http://localhost:54701/.


.. _python-can: https://python-can.readthedocs.org/en/stable/

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/christiansandberg/python-can-remote",
    "name": "python-can-remote",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "CAN TCP websocket",
    "author": "Christian Sandberg",
    "author_email": "christiansandberg@me.com",
    "download_url": "https://files.pythonhosted.org/packages/3b/0e/25b5986939a95594c897bef23daf97130fecb01c55f836348fd5dafd3663/python_can_remote-0.2.2.tar.gz",
    "platform": "any",
    "description": "CAN over network bridge for Python\r\n==================================\r\n\r\nCreates a CAN over TCP/IP bridge for use with python-can_.\r\n\r\n\r\nInstallation\r\n------------\r\n\r\nInstall using pip::\r\n\r\n    $ pip install python-can-remote\r\n\r\n\r\nUsage\r\n-----\r\n\r\nStart server from command line::\r\n\r\n    $ python -m can_remote --interface=virtual --channel=0 --bitrate=500000\r\n\r\n\r\nCreate python-can bus:\r\n\r\n.. code-block:: python\r\n\r\n    import can\r\n\r\n    # Create a connection to server. Any config is passed to server.\r\n    bus = can.Bus('ws://localhost:54701/',\r\n                  bustype='remote',\r\n                  bitrate=500000,\r\n                  receive_own_messages=True)\r\n\r\n    # Send messages\r\n    msg = can.Message(arbitration_id=0x12345, data=[1,2,3,4,5,6,7,8])\r\n    bus.send(msg)\r\n\r\n    # Receive messages\r\n    msg2 = bus.recv(1)\r\n    print(msg2)\r\n\r\n    # Disconnect\r\n    bus.shutdown()\r\n\r\n\r\nWeb interface\r\n-------------\r\n\r\nThere is also a basic web interface for inspecting the CAN traffic\r\nusing a browser.\r\nIt is available on the same address using HTTP, e.g. http://localhost:54701/.\r\n\r\n\r\n.. _python-can: https://python-can.readthedocs.org/en/stable/\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "CAN over network bridge for Python",
    "version": "0.2.2",
    "project_urls": {
        "Homepage": "https://github.com/christiansandberg/python-can-remote"
    },
    "split_keywords": [
        "can",
        "tcp",
        "websocket"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eb982ddf253f6591ab377f8318683e814021bf6f86d44187f7466bc1d2a42f3b",
                "md5": "d22f82c14d2b1158fa2f177ec7488cbd",
                "sha256": "c8c0910126c509e1145b9806c51f858cce3f55bfbd8f60ec803c82f9fcad7fbc"
            },
            "downloads": -1,
            "filename": "python_can_remote-0.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d22f82c14d2b1158fa2f177ec7488cbd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 190313,
            "upload_time": "2024-06-28T09:32:41",
            "upload_time_iso_8601": "2024-06-28T09:32:41.860586Z",
            "url": "https://files.pythonhosted.org/packages/eb/98/2ddf253f6591ab377f8318683e814021bf6f86d44187f7466bc1d2a42f3b/python_can_remote-0.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3b0e25b5986939a95594c897bef23daf97130fecb01c55f836348fd5dafd3663",
                "md5": "dc644569423535cd473b6623ef91f43a",
                "sha256": "c1f9d499cb10d81c10ef924f470dbe480035f2a2bc78afccd4d671349e4bcf7a"
            },
            "downloads": -1,
            "filename": "python_can_remote-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "dc644569423535cd473b6623ef91f43a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 192504,
            "upload_time": "2024-06-28T09:32:43",
            "upload_time_iso_8601": "2024-06-28T09:32:43.432399Z",
            "url": "https://files.pythonhosted.org/packages/3b/0e/25b5986939a95594c897bef23daf97130fecb01c55f836348fd5dafd3663/python_can_remote-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-28 09:32:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "christiansandberg",
    "github_project": "python-can-remote",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "python-can-remote"
}
        
Elapsed time: 3.12150s