Skip to main content

csan (Python package)

Generate Cutter-Sanborn three-figure and Library of Congress cutter numbers for library cataloging from author names and titles. The package provides Python bindings to the Rust csan-core library and the csan command-line tool, as abi3 wheels for CPython 3.9+ on Linux, macOS, and Windows.

pip install csan        # library + CLI
uv tool install csan    # just the CLI, isolated
import csan

csan.cutter_sanborn(forename="Charles", surname="Dickens",
                    title="Oliver Twist")  # 'D548o'
csan.cutter_loc(surname="Carter")  # 'C378'

csan.cutter_sanborn_detailed(surname="Borges")
# {'alpha_prefix': 'B', 'alpha_suffix': None, 'entry': 'Borg',
#  'formatted': 'B732', 'numeric': 732}

Every function accepts forename, surname, and title keyword arguments (at least one must be non-blank; blank strings count as absent). cutter_sanborn* also take prefix_len and suffix_len; cutter_loc* take max_len (clamped to 4). The *_detailed variants return a dict of the number's parts plus the rendered call number under "formatted".

Every function also takes the keyword-only lang and strip_article: with strip_article=True, the title is filed without its initial article in the language lang names (an ISO 639 code, a BCP 47 tag or a POSIX locale, case-insensitive; csan --help lists them all). lang alone changes nothing.

csan.cutter_sanborn(surname="Dickens", title="A Christmas Carol",
                    lang="en", strip_article=True)  # 'D548c'
csan.cutter_loc(title="The Bear", lang="en", strip_article=True)  # 'B437'

A blank lang counts as absent, and author names are never stripped. Unusable input, an unknown lang (even with strip_article off), or strip_article without lang raises ValueError, and a lang that is not a string, or a strip_article that is not a bool, TypeError.

The console script is the same interface as the standalone Rust binary:

csan --forename Charles --surname Dickens --title "Oliver Twist"   # D548o
csan --method cutter-loc --surname Carter                         # C378

Building from source

Built with maturin from crates/csan-py in the main repository (Rust toolchain required):

pip install maturin
maturin develop -m crates/csan-py/Cargo.toml       # editable install
maturin build --release -m crates/csan-py/Cargo.toml

Each GitHub release carries the wheels (Linux manylinux and musllinux, macOS, and Windows, on x86_64 and aarch64) and the sdist that are published to PyPI.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Metadata

Release files for csan 0.9.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 csan 0.9.0
File Size Uploaded Provenance Actions
csan-0.9.0.tar.gz 151.0 kB With provenance Details for csan-0.9.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for csan 0.9.0
File Actions
csan-0.9.0-cp39-abi3-win_arm64.whl CPython 3.9 abi3 Windows ARM64 Details for csan-0.9.0-cp39-abi3-win_arm64.whl
csan-0.9.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for csan-0.9.0-cp39-abi3-win_amd64.whl
csan-0.9.0-cp39-abi3-musllinux_1_2_x86_64.whl CPython 3.9 abi3 Linux musl 1.2+ x86-64 Details for csan-0.9.0-cp39-abi3-musllinux_1_2_x86_64.whl
csan-0.9.0-cp39-abi3-musllinux_1_2_aarch64.whl CPython 3.9 abi3 Linux musl 1.2+ ARM64 Details for csan-0.9.0-cp39-abi3-musllinux_1_2_aarch64.whl
csan-0.9.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for csan-0.9.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
csan-0.9.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for csan-0.9.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
csan-0.9.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for csan-0.9.0-cp39-abi3-macosx_11_0_arm64.whl
csan-0.9.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for csan-0.9.0-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 4.4 MB

Release files / csan-0.9.0.tar.gz

Download URL csan-0.9.0.tar.gz
Size 151.0 kB
Tags Source
SHA-256 checksum
How to use checksums
58122c0ce1aa60ca51a2ff0d84265ac80ba65c4ecec3e883ec8e2d63e8dd297f
BLAKE2b-256 checksum
How to use checksums
12f6b75e1b9cb1eafd67a1ec4cd6eb7cdac2c34d0ce7759298b9f2618a371cef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 27, 2026.

Transparency log

Release files / csan-0.9.0-cp39-abi3-win_arm64.whl

Download URL csan-0.9.0-cp39-abi3-win_arm64.whl
Size 396.2 kB
Tags CPython 3.9 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
b5c1f46cb289cd8474ab2596815079a1a145a213d093db89a1dfe788d6ade34d
BLAKE2b-256 checksum
How to use checksums
ca9d09d4992534840dc348fb5eac5106258f7aba80962cfb7ef9f2ecedf53165
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 27, 2026.

Transparency log

Release files / csan-0.9.0-cp39-abi3-win_amd64.whl

Download URL csan-0.9.0-cp39-abi3-win_amd64.whl
Size 411.4 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
46e60309d99d2d3396821a5c7fb32521b92d1698db273e1c9ea169ce00489d44
BLAKE2b-256 checksum
How to use checksums
515e026a2ab7179b4fcb90fd392ffcda3bb7bc40992822cc8b348a8e29233f2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 27, 2026.

Transparency log

Release files / csan-0.9.0-cp39-abi3-musllinux_1_2_x86_64.whl

Download URL csan-0.9.0-cp39-abi3-musllinux_1_2_x86_64.whl
Size 764.5 kB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
7de5c7eadd8850744e393ca72c4e722f5866996130ae6b88f4289735903df6c0
BLAKE2b-256 checksum
How to use checksums
e82cbd21c178c9b3198831d44544a2665d557484f54a62aa2b6e851df3b6afec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 27, 2026.

Transparency log

Release files / csan-0.9.0-cp39-abi3-musllinux_1_2_aarch64.whl

Download URL csan-0.9.0-cp39-abi3-musllinux_1_2_aarch64.whl
Size 710.9 kB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
41b93de6bf8bf6bf324787768b3746b24da41df9f5722ea2baeb31a0f8b56378
BLAKE2b-256 checksum
How to use checksums
be6ad6b7d09ba54b2a28f0ccc249fd358681d382661a123ec3f5c42e94c7dafa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 27, 2026.

Transparency log

Release files / csan-0.9.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL csan-0.9.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 529.7 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
270b022047a5eafa56b674c57cfe1bc289cbfb83966b1bb85cfb32ff0adb8fbd
BLAKE2b-256 checksum
How to use checksums
2427f8791232f8c33156f8ad94071fc0b21ec0c6dd9cba5f25dfda65250a4c99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 27, 2026.

Transparency log

Release files / csan-0.9.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL csan-0.9.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 531.5 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
439554d977190d931a9b01032bce9718cba7489888991e4bb7db1af574e4495b
BLAKE2b-256 checksum
How to use checksums
d01c55dfd2ef7b6dbc502d7f65fe6974aa960901a8eab37d600f2e0f1905ffed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 27, 2026.

Transparency log

Release files / csan-0.9.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL csan-0.9.0-cp39-abi3-macosx_11_0_arm64.whl
Size 459.3 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
73f5e698b86bacb2d36053662667ade4e15ba68ff9ba5da39748c8426809a133
BLAKE2b-256 checksum
How to use checksums
085d9b78ee8dc4db17175a0209673565f177b4a14c48bcc0ae45f03e74028ac4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 27, 2026.

Transparency log

Release files / csan-0.9.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL csan-0.9.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 489.5 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
e7656cd6a964b08af79f4843c3f9152fbcb200d5037f3f66c365e19d925f1078
BLAKE2b-256 checksum
How to use checksums
3ab1130bed8f8b4961d5a96f26641ce6d9b6e16cee0c45bf17dc95bba1868b40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 27, 2026.

Transparency log

Security for csan 0.9.0

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.

Full provenance

All 9 files in this release have been uploaded with provenance metadata.

Select from 9 files

Attestation for csan-0.9.0.tar.gz

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 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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