Skip to main content

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(given_name="Charles", family_name="Dickens",
                      title="Oliver Twist")   # 'D548o'
csan.cutter_loc(family_name="Carter")       # 'C378'

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

Every function accepts given_name, family_name, 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 \
  --given-name Charles --family-name 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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for csan 0.5.0
File Interpreter ABI Platform
csan-0.5.0-cp39-abi3-manylinux_2_34_x86_64.whl CPython 3.9 abi3 Linux glibc 2.34+ x86-64 Details

Release files / csan-0.5.0-cp39-abi3-manylinux_2_34_x86_64.whl

Download URL csan-0.5.0-cp39-abi3-manylinux_2_34_x86_64.whl
Size 497.8 kB
Tags CPython 3.9 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
cc17713aaef69592a26fa63b4787c504de1df639d88c02dcb2d2fd209d6247b5
BLAKE2b-256 checksum
How to use checksums
63f1e010f66ea0e61087ecad7b941cc029c0dfbc8a9975c4c50086b1b56e9762
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.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.

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.

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