Simple, type-safe access to the ChatNoir search API.
Project description
🔍 chatnoir-api
Simple, type-safe access to the ChatNoir search API.
Installation
pip install chatnoir-api
Usage
from chatnoir_api.model.result import SearchResults, SearchResult
from chatnoir_api.v1 import search
api_key: str = "<API_KEY>"
results: SearchResults = search(api_key, "python library")
top_result: SearchResult = next(iter(results))
print(top_result)
Citation
If you use this package, please cite the paper from the ChatNoir authors. You can use the following BibTeX information for citation:
@InProceedings{bevendorff:2018,
address = {Berlin Heidelberg New York},
author = {Janek Bevendorff and Benno Stein and Matthias Hagen and Martin Potthast},
booktitle = {Advances in Information Retrieval. 40th European Conference on IR Research (ECIR 2018)},
editor = {Leif Azzopardi and Allan Hanbury and Gabriella Pasi and Benjamin Piwowarski},
ids = {potthast:2018c,stein:2018c},
month = mar,
publisher = {Springer},
series = {Lecture Notes in Computer Science},
site = {Grenoble, France},
title = {{Elastic ChatNoir: Search Engine for the ClueWeb and the Common Crawl}},
year = 2018
}
Development
To build and develop this package you need to install the build
package:
pip install build
Installation
Install package dependencies:
pip install -e .
Testing
Install test dependencies:
pip install -e .[test]
Verify your changes against the test suite to verify.
flake8 chatnoir_api examples
pylint -E chatnoir_api examples
CHATNOIR_API_KEY="<API_KEY>" pytest chatnoir_api examples
Please also add tests for your newly developed code.
Build wheels
Wheels for this package can be built by:
python -m build
License
This repository is released under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
chatnoir-api-0.1.10.tar.gz
(12.0 kB
view hashes)
Built Distribution
Close
Hashes for chatnoir_api-0.1.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2772f1ae001043bac1357dbb4e3d676e3d27cb63b93a413a86b493cdaf50f537 |
|
MD5 | 4055d7b077217dac936391c65a0b0276 |
|
BLAKE2b-256 | a3f507854acc76acda79a5e06d049102184cd09eeac3f0c8c180256f1dc2f857 |