Skip to main content

Python module for accessing the CANEdge2 via HTTP

Project description

CANedge HTTP

Python module for accessing the CANedge2 via HTTP. The CANedge2 HTTP interface can e.g. be used to automatically poll and then delete log files from the CANedge2.

The module supports download, deletion, and listing of files on the CANedge2.

Installation

pip install canedge_http

Usage examples

See example_canedge_http.py for a more comprehensive example.

Import

from canedge_http import CANedgeHTTP

Connect

with CANedgeHTTP(host="192.168.0.128").connect() as cnt:
    ...

LIST

for elm, is_dir in cnt.list(path=Path("/"), recursive=True):
   ...

Download

Download takes a file-like object

f = io.BytesIO()
res = cnt.download(elm, f)

or

with open("somefile", 'wb') as f:
    res = cnt.download(elm, f)

Delete

res = cnt.delete(elm)

Test

Tests are implemented using pytest and can be found in test_canedge_http.py.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

CANedge_HTTP-0.0.1.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

CANedge_HTTP-0.0.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file CANedge_HTTP-0.0.1.tar.gz.

File metadata

  • Download URL: CANedge_HTTP-0.0.1.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for CANedge_HTTP-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ae95d9156d0035dd847fd5991bf49dcbb2d014b85f0e5b9ecb387ab0de5ad0af
MD5 3ef74b5d0bc4ac2cab51cd07c3c6aa95
BLAKE2b-256 e807dcc5d8a5701099bbc9995af80d776e7292b95dc4fed2dbc6a9e0a916f637

See more details on using hashes here.

File details

Details for the file CANedge_HTTP-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: CANedge_HTTP-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for CANedge_HTTP-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fb41042379460f933d308ace0627030860e412372b95269b285df4990adc60a2
MD5 ed96a2a1ee474c601b555485b1c88236
BLAKE2b-256 2a797536625b0350fb94c158c4700ec1d02529c2a3fed779368a0c0598fec26a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page