Skip to main content

pysearchalgo

Search & sort algorithms

Installation

pip install pysearchalgo

💡 Usage Examples

Basic Operations

from pylib_searchalgo import binary_search, linear_search, quick_sort, merge_sort

# Binary search in sorted array
arr = [1, 3, 5, 7, 9]
index = binary_search(arr, 5)
# 2

# Linear search
index = linear_search([1, 2, 3, 4, 5], 3)
# 2

# Quick sort
sorted_arr = quick_sort([3, 1, 4, 1, 5])
# [1, 1, 3, 4, 5]

# Merge sort
sorted_arr = merge_sort([3, 1, 4, 1, 5])
# [1, 1, 3, 4, 5]

AI/ML Use Cases

from pylib_searchalgo import binary_search, linear_search, quick_sort, merge_sort

# Search sorted feature vectors
features = sorted([0.1, 0.5, 0.9, 0.3])
target_index = binary_search(features, 0.5)

# Sort training data
sorted_data = quick_sort(training_data, key=lambda x: x['score'])

📚 API Reference

See package documentation for complete API reference.

🤖 AI Agent Friendly

This package is optimized for AI agents and code generation tools:

  • Clear function names and signatures
  • Comprehensive docstrings with examples
  • Type hints for better IDE support
  • Common use cases documented
  • Zero dependencies for reliability

License

MIT

Metadata

Release files for pylib-searchalgo 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 pylib-searchalgo 0.1.0
File Size Uploaded Provenance Actions
pylib_searchalgo-0.1.0.tar.gz 2.4 kB Without provenance Details for pylib_searchalgo-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pylib-searchalgo 0.1.0
File Interpreter ABI Platform Actions
pylib_searchalgo-0.1.0-py3-none-any.whl Python 3 none any Details for pylib_searchalgo-0.1.0-py3-none-any.whl

Total release size: 4.4 kB

Release files / pylib_searchalgo-0.1.0.tar.gz

Download URL pylib_searchalgo-0.1.0.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
167fd8765ede8829a2d472bf5ee1b452fd02a6cb9b5a398fc1ae899a8d0691e5
BLAKE2b-256 checksum
How to use checksums
d85b8ced29b97d7b4bb9f6fbbef15c44c0c4471eaebf4ba386f4146419605c9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / pylib_searchalgo-0.1.0-py3-none-any.whl

Download URL pylib_searchalgo-0.1.0-py3-none-any.whl
Size 2.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1383558c8884d61a6e8573e11847c8a936c8e873bdf06bebda0db96bc96d024
BLAKE2b-256 checksum
How to use checksums
f1b9ab3586abbba044d22c05a105f7baca23e40bb9dd061a2dcab8d94229aff8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for pylib-searchalgo 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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