Skip to main content

word-count

Demonstrates searching for a file in plain python, with rust singlethreaded and with rust multithreaded.

Build

pip install .

Usage

from word_count import search_py, search, search_sequential

search_py("foo bar", "foo")
search("foo bar", "foo")
search_sequential("foo bar", "foo")

Testing

To test install nox globally and run

nox

Benchmark

To test install nox globally and run

nox -s bench

Copying this example

Use cargo-generate:

$ cargo install cargo-generate
$ cargo generate --git https://github.com/PyO3/pyo3 examples/word-count

(cargo generate will take a little while to clone the PyO3 repo first; be patient when waiting for the command to run.)

Release files for hydrorolldemo 0.1.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 hydrorolldemo 0.1.0
File Size Uploaded
hydrorolldemo-0.1.0.tar.gz 8.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hydrorolldemo 0.1.0
File Interpreter ABI Platform
hydrorolldemo-0.1.0-cp311-none-win_amd64.whl CPython 3.11 none Windows x86-64 Details

Total release size: 153.2 kB

Release files / hydrorolldemo-0.1.0.tar.gz

Download URL hydrorolldemo-0.1.0.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0b998318a7b22cc76531626c45c7a756a5b08a981d78b6094a71fddc90ba92f1
BLAKE2b-256 checksum
How to use checksums
161dde50a34836d10ac55792bc2bf0b88c24c9eee0b2df7c5b5df47d024dae58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release files / hydrorolldemo-0.1.0-cp311-none-win_amd64.whl

Download URL hydrorolldemo-0.1.0-cp311-none-win_amd64.whl
Size 144.4 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
a21d0af7897d7fadb541fa9a40b06d0967476a0d7685e3f48f738e1be8b03935
BLAKE2b-256 checksum
How to use checksums
8b46932ae4986bf29bab7c5fdddd0ad7a6d77785e4b46386f959f545c584aee4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

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