Provides a socketcan-alike interface other arbitrary CAN drivers
Project description
sockcan
Provides a socketcan-alike interface other arbitrary CAN drivers.
Installing
pip install sockcan
Documentation
Documentation is available here.
Running benchmarks
Benchmarks can be run with python -m sockcan.benchmarks:
python -m sockcan.benchmarks --help
Usage: python -m sockcan.benchmarks [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
daemon Benchmarks all 4 scenarios: direct kernel vs userspace daemon,...
kernel Benchmarks python-can vs sockcan with direct kernel...
Kernel benchmark
Compares python-can and sockcan on direct kernel communications:
python -m sockcan.benchmarks kernel --rounds 200 --batch-size 100
Daemon benchmark
Compares all 4 scenarios: python-can + sockcan on both direct kernel and userspace daemon. Requires vcan0 and uses a virtual bus (no hardware needed):
python -m sockcan.benchmarks daemon --rounds 100 --batch-size 50 --port 18765
Running tests
Tests are based on pytest and hypothesis. Make sure to install this package with test extra (pip install .\[test\).
You can show hypothesis stats with --hypothesis-show-statistics:
python -m pytest -vv --hypothesis-show-statistics
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 Distribution
File details
Details for the file sockcan-0.8.0.tar.gz.
File metadata
- Download URL: sockcan-0.8.0.tar.gz
- Upload date:
- Size: 30.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fae42bd7968b6db5615cc80f4407d9d17cee8b7f931a8fb0f6d077095c7d7824
|
|
| MD5 |
d8826dc0adb77de4ceb82a036a25b705
|
|
| BLAKE2b-256 |
b50390a1467ec9de525feb3b8889d680fdb21859949ecca3ab8c3ad9b4cf1d69
|
Provenance
The following attestation bundles were made for sockcan-0.8.0.tar.gz:
Publisher:
publish-to-pypi.yml on Hedwyn/sockcan
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sockcan-0.8.0.tar.gz -
Subject digest:
fae42bd7968b6db5615cc80f4407d9d17cee8b7f931a8fb0f6d077095c7d7824 - Sigstore transparency entry: 1969819255
- Sigstore integration time:
-
Permalink:
Hedwyn/sockcan@cdd83c49398623dbf23a10095179eff67d37b27b -
Branch / Tag:
refs/tags/0.8.0 - Owner: https://github.com/Hedwyn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@cdd83c49398623dbf23a10095179eff67d37b27b -
Trigger Event:
push
-
Statement type: