Skip to main content

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

Metadata

Release files for sockcan 0.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sockcan 0.11.0
File Size Uploaded
sockcan-0.11.0.tar.gz 48.5 kB Details

Release files / sockcan-0.11.0.tar.gz

Download URL sockcan-0.11.0.tar.gz
Size 48.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f81d36591e93dbcb343c66c366c19ea492fc65a4302c62101c8e29eab09eef67
BLAKE2b-256 checksum
How to use checksums
e133cc74ed96be938147a628896db72bb9bf4161777ae5d32a767d52e4724e75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.11.0 This release

1 release file

0.10.2

1 release file

0.10.1

1 release file

0.10.0

1 release file

0.9.6

1 release file

0.9.5

1 release file

0.9.4

1 release file

0.9.3

1 release file

0.9.2

1 release file

0.9.1

1 release file

0.9.0

1 release file

0.8.0

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page