CANedge HTTP
Python module for accessing the CANedge via HTTP. The CANedge HTTP interface can e.g. be used to automatically poll and then delete log files stored on the CANedge.
The module supports download, deletion, and listing of files on the CANedge.
Installation
pip install canedge_http
Tools
ce_http_downloader: Download log files filtered by start and end-time. Runce_http_downloader --helpfor information on usage.
Usage
Import
from canedge_http import CANedgeHTTP
Construct
http = CANedgeHTTP("http://192.168.1.100")
Device ID
http.device_id
Result example:
'AABBCCDD'
Permission
http.permission
Result example:
'OPTIONS, GET, HEAD, PUT, DELETE'
List files
for elm in http.list(path="/", recursive=True):
...
Result example (elm):
{'path': '/device.json', 'is_dir': False, 'lastWritten': datetime.datetime(2024, 7, 12, 5, 3, 12, tzinfo=datetime.timezone.utc), 'size': 601}
Download
Download takes a file-like object, e.g.
f = io.BytesIO()
http.download("/device.json", f)
or
with open("00000001.MF4", "wb") as f:
http.download("/LOG/AABBCCDD/00000001/00000001.MF4", f)
Delete
http.delete("/LOG/AABBCCDD/00000001/00000001.MF4")
Metadata
Release files for CANedge-HTTP 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| canedge_http-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Release files / canedge_http-0.0.3-py3-none-any.whl
| Download URL | canedge_http-0.0.3-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4f058b491f32ed9056d8769222f973c6b3f632e38b24f7125855a1382c626f7
|
|
BLAKE2b-256 checksum How to use checksums |
65cd288707fa1538c25f6e28f73c22ddad9df58e103646c947ec67a6aee029df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|