SearchForge
A lightweight full-text search engine for Python.
SearchForge is a pure Python search library that provides fast document indexing, TF-IDF ranking, fuzzy search, autocomplete, metadata filtering, highlighted search results, persistent storage, and a simple command-line interface.
It is designed for developers who need an easy-to-integrate search engine for Python applications without external dependencies.
Installation
Install SearchForge from PyPI:
pip install searchforge
Verify the installation:
searchforge --version
Features
- Full-text document search
- Inverted index
- TF-IDF ranking
- Tokenization
- Text normalization
- Stop-word removal
- Fuzzy search
- Autocomplete suggestions
- Metadata filtering
- Highlighted search results
- Persistent document storage
- Persistent search index
- Search analytics
- Command-line interface
Quick Start
from searchforge import SearchEngine
engine = SearchEngine()
engine.add_document(
1,
"Python Django Developer"
)
engine.add_document(
2,
"FastAPI REST API Tutorial"
)
results = engine.search("python")
for result in results:
print(result.document_id)
print(result.score)
CLI
Add a document
searchforge add sample.txt
Search
searchforge search "python"
View search analytics
searchforge stats
Display version
searchforge --version
Basic Search
results = engine.search("django")
Returns a ranked list of matching documents.
Metadata Filtering
engine.add_document(
1,
"Python Django Guide",
metadata={
"category": "Programming"
}
)
results = engine.search(
"python",
filters={
"category": "Programming"
}
)
Autocomplete
engine.suggest("py")
Example output
["python", "pytest"]
Search Analytics
engine.search("python")
engine.search("python")
print(engine.popular_queries())
Example
[("python", 2)]
Project Highlights
- Pure Python implementation
- No external search server required
- Easy to integrate into existing projects
- Suitable for small to medium-sized applications
- Published on PyPI
- Command-line support included
Typical Use Cases
SearchForge can be used in:
- Django applications
- Flask applications
- FastAPI applications
- Documentation search
- Portfolio projects
- Knowledge base systems
- Blog search
- Product catalog search
- Local desktop applications
- Educational projects
Requirements
- Python 3.10 or newer
Source Code
GitHub
https://github.com/Ravikalakoti/searchforge
PyPI
https://pypi.org/project/searchforge/
Issue Tracker
https://github.com/Ravikalakoti/searchforge/issues
License
MIT License
Author
Ravi Singh Kalakoti
Python Backend Developer
GitHub: https://github.com/Ravikalakoti
Metadata
Release files for searchforge 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| searchforge-0.1.2.tar.gz | 13.9 kB | With provenance | Details for searchforge-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| searchforge-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for searchforge-0.1.2-py3-none-any.whl |
Total release size: 28.9 kB
Release files / searchforge-0.1.2.tar.gz
| Download URL | searchforge-0.1.2.tar.gz |
|---|---|
| Size | 13.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21cf68cb242659904e7b1c6603bac3b5878f27d6a7340e541817f76ab0af0e11
|
|
BLAKE2b-256 checksum How to use checksums |
6a6b9b73e1d185e3449b757b6c42b1396c1b193b02b43971ae03c3d8fc7718f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 18, 2026.
Transparency logRelease files / searchforge-0.1.2-py3-none-any.whl
| Download URL | searchforge-0.1.2-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd550598745dd2a699fdc52a4c94545f5acc3cc0ed294e3b728c5786d1928380
|
|
BLAKE2b-256 checksum How to use checksums |
1345bb14ea1be7dc52073602978eccf3a0bc693e6ed22c41413f2efad0618f30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 18, 2026.
Transparency logSecurity for searchforge 0.1.2
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 2 files in this release have been uploaded with provenance metadata.
Attestation for searchforge-0.1.2.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 Jul 18, 2026.
Transparency logA 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.