csan (Python package)
Cutter call numbers for library cataloging — Cutter-Sanborn three-figure
and Library of Congress — as fast Rust-powered Python bindings, including
the csan command-line tool.
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', 'numeric': 732, 'alpha_suffix': None,
# 'entry': 'Borg', 'formatted': 'B732'}
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".
Unusable input raises ValueError.
The console script is the same interface as the standalone Rust binary:
csan --cutter-sanborn --cutter-loc \
--forename Charles --surname Dickens --title "Oliver Twist"
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
Publishing to PyPI: maturin publish -m crates/csan-py/Cargo.toml
(abi3 wheels for CPython 3.9+; use maturin's manylinux support or
maturin-action in CI for portable Linux wheels).
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Metadata
Release files for csan 0.5.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| csan-0.5.10-cp39-abi3-manylinux_2_34_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.34+ x86-64 | Details |
Release files / csan-0.5.10-cp39-abi3-manylinux_2_34_x86_64.whl
| Download URL | csan-0.5.10-cp39-abi3-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 497.5 kB |
| Tags | CPython 3.9 Linux glibc 2.34+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
92c4eb7969ecb6dff78af8e79252696065381bdf71c34610a1d1e306909d4157
|
|
BLAKE2b-256 checksum How to use checksums |
256e08ac40da083d0f69fcebc57b3cea6f3e5aa6afc28b4f4a938d7fe99ee7a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for csan 0.5.10
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.