Skip to main content

Community Tool Lending Library - manage tool loans, status, and borrower limits

Project description

toollibrary-nci

A Python library for managing community tool lending operations.

Features

  • LoanManager - Calculate due dates, check overdue status, late fees, borrower limits
  • ToolManager - Validate tools, manage status flows, categorize and search tools
  • LendingFormatter - Format loan summaries, tool cards, CSV export, overdue alerts, reports
  • InputValidator - Validate users, tools, loan requests, sanitize input

Installation

pip install toollibrary-nci

Usage

from toollibrary import LoanManager, ToolManager, LendingFormatter, InputValidator

# Calculate a due date (14 days default)
due = LoanManager.calculate_due_date(days=14)

# Check borrower limit
result = LoanManager.check_borrower_limit(user_loans, max_tools=3)

# Validate a tool
result = ToolManager.validate_tool({"name": "Drill", "category": "power_tools"})

# Search tools
matches = ToolManager.search_tools(tools, "drill")

# Format a lending report
report = LendingFormatter.format_lending_report(tools, loans)

Testing

cd library
python -m pytest tests/ -v

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

toollibrary_nci-1.0.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

toollibrary_nci-1.0.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file toollibrary_nci-1.0.0.tar.gz.

File metadata

  • Download URL: toollibrary_nci-1.0.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for toollibrary_nci-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e939b1c4ff062e1c576462cd591295fd571859348a06bb3f43704d3849bbd1b0
MD5 5dcdd073dda3aeb46b146e310146301f
BLAKE2b-256 3c392354e5d2467ec5dfd9294b0540fea393bf34765ac7629a4b283b90f8cd2d

See more details on using hashes here.

File details

Details for the file toollibrary_nci-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for toollibrary_nci-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b6f9205c537d600582c69ac3c8a1f82d556a9cdc03b6583fd1ebc5928c51598b
MD5 8d11686d955b27fb0c4f028dd24ec9cb
BLAKE2b-256 f21e8c0717e05978831cc98222d756b01f549213c8122879a07c9a770f5a2bb4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page