Software Heritage - Search service
Search service for the Software Heritage archive.
It is similar to swh-storage in what it contains, but provides different ways to query it: while swh-storage is mostly a key-value store that returns an object from a primary key, swh-search is focused on reverse indices, to allow finding objects that match some criteria; for example full-text search.
Currently uses ElasticSearch, and provides only origin search (by URL and metadata).
Dependencies
Python tests for this module include tests that cannot be run without a local ElasticSearch instance, so you need the ElasticSearch server executable on your machine (no need to have a running ElasticSearch server).
Debian-like host
The elasticsearch package is required. As it’s not part of debian-stable, another debian repository is required to be configured
Non Debian-like host
The tests expect:
/usr/share/elasticsearch/jdk/bin/java to exist.
org.elasticsearch.bootstrap.Elasticsearch to be in java’s classpath.
Emscripten is required for generating tree-sitter WASM module. The following commands need to be executed for the setup:
cd /opt && git clone https://github.com/emscripten-core/emsdk.git && cd emsdk && \ ./emsdk install latest && ./emsdk activate latest PATH="${PATH}:/opt/emsdk/upstream/emscripten"Note: If emsdk isn’t found in the PATH, the tree-sitter cli automatically pulls emscripten/emsdk image from docker hub when make ts-build-wasm or make ts-build is used.
Make targets
Below is the list of available make targets that can be executed from the root directory of swh-search in order to build and/or execute the swh-search under various configurations:
ts-install: Install node_modules and emscripten SDK required for TreeSitter
ts-generate: Generate parser files(C and JSON) from the grammar
ts-repl: Starts a web based playground for the TreeSitter grammar. It’s the recommended way for developing TreeSitter grammar.
ts-dev: Parse the query_language/sample_query and print the corresponding syntax expression along with the start and end positions of all the nodes.
ts-dev sanitize=1: Same as ts-dev but without start and end position of the nodes. This format is expected by TreeSitter’s native test command. sanitize=1 cleans the output of ts-dev using sed to achieve the desired format.
ts-test: executes TreeSitter’s native tests
ts-build-so: Generates swh_ql.so file from the previously generated parser using py-tree-sitter
ts-build-so: Generates swh_ql.wasm file from the previously generated parser using emscripten
ts-build: Executes both ts-build-so and ts-build-so
Metadata
Release files for swh.search 0.27.3
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 |
|---|---|---|---|---|
| swh_search-0.27.3.tar.gz | 80.7 kB | Without provenance | Details for swh_search-0.27.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| swh_search-0.27.3-cp311-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.5+ x86-64, Linux glibc 2.28+ x86-64 | Details for swh_search-0.27.3-cp311-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
Total release size: 180.5 kB
Release files / swh_search-0.27.3.tar.gz
| Download URL | swh_search-0.27.3.tar.gz |
|---|---|
| Size | 80.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b53d854328be334c6a4bcc103640d2756e8cc5790f5cc61750b5e1250300a6d5
|
|
BLAKE2b-256 checksum How to use checksums |
835ab822e0ac0f9675fbf785e9067046d56dd191117c261b017564118980692f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Release files / swh_search-0.27.3-cp311-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | swh_search-0.27.3-cp311-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 99.8 kB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
b944c03b3b41df51e4e96026ea7def8211ba1fb99f4075074bd355e08db6aeb9
|
|
BLAKE2b-256 checksum How to use checksums |
9ab472d24ae68cf5b3dd4aec4a0c0f8ad9262b9f9784cf711004bcc032162b5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Security for swh.search 0.27.3
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.