Python module for accessing CANEdge filesystem via HTTP
Project description
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")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file canedge_http-0.0.3-py3-none-any.whl.
File metadata
- Download URL: canedge_http-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4f058b491f32ed9056d8769222f973c6b3f632e38b24f7125855a1382c626f7
|
|
| MD5 |
fd0103198a168cd8f719ba95f0c990d6
|
|
| BLAKE2b-256 |
65cd288707fa1538c25f6e28f73c22ddad9df58e103646c947ec67a6aee029df
|