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

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.3
File Size Uploaded
sockcan-0.9.3.tar.gz 32.2 kB Details

Release files / sockcan-0.9.3.tar.gz

Download URL sockcan-0.9.3.tar.gz
Size 32.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e5afd7a8d0622f06fde43ed8f7955aa26e9a66113922745d5b2733c43723e3a9
BLAKE2b-256 checksum
How to use checksums
6f05a9c5f2c0d64f10c53e2b7c3ea715a3b4c3b98ec5595a5d051e73bdcff565
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 10, 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

0.9.6

1 release file

0.9.5

1 release file

0.9.4

1 release file

This release

0.9.3 This release

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