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.9.6

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.9.6
File Size Uploaded
sockcan-0.9.6.tar.gz 32.6 kB Details

Release files / sockcan-0.9.6.tar.gz

Download URL sockcan-0.9.6.tar.gz
Size 32.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ad800ebb46cb4bcd7d9c05baeb87807977dabb297a4c278ce90bbef37a1596e2
BLAKE2b-256 checksum
How to use checksums
cf6cb4c596116384a9577e3475e52909fe550253fb2974c6ec17b240b6a8fc48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 16, 2026.

Transparency log

Release history Release notifications | RSS feed

0.11.0

1 release file

0.10.2

1 release file

0.10.1

1 release file

0.10.0

1 release file

This release

0.9.6 This release

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