Skip to main content

A Python library to interact with the Qwant search engine.

Project description

QwantAI

QwantAI is a Python library that provides an easy-to-use interface for interacting with the Qwant search engine. You can use it to perform searches and retrieve results either as a single text or streamed data in real time via WebSocket.


Features

  • Perform searches on Qwant using a simple Python function.
  • Retrieve results in your preferred language.
  • Choose between streamed real-time output or a single consolidated response.
  • Lightweight and easy to integrate into any project.

Installation

Install QwantAI using pip (once packaged):

pip install QwantAI
If you're developing locally, clone the repository and install it directly:

bash
Copier
Modifier
git clone https://github.com/yourusername/QwantAI.git
cd QwantAI
pip install .
Usage
Import the package and start searching:

Non-Streamed Example
Retrieve all results as a single text response.

python
Copier
Modifier
import QwantAI

response = QwantAI.search("Python programming", language="en_US", streamed=False)
print(response)
Streamed Example
Retrieve results in real-time as they are generated.

python
Copier
Modifier
import QwantAI

QwantAI.search("Python programming", language="en_US", streamed=True)
Parameters
search(query, language="en_US", streamed=False)
Parameter	Type	Description	Default Value
query	str	The search query string.	Required
language	str	The language for the search (e.g., en_US).	en_US
streamed	bool	Whether to stream results or fetch them all at once.	False
Requirements
Python 3.6+
requests (for HTTP requests)
websocket-client (for WebSocket communication)
Install dependencies with:

bash
Copier
Modifier
pip install -r requirements.txt
Disclaimer
This project is provided for educational and informational purposes only. The creator of this package is not responsible for any misuse or damages caused by using this tool. Users are responsible for ensuring their usage complies with applicable laws and regulations.

Contributing
Contributions are welcome! Feel free to open an issue or submit a pull request.

Fork the repository.
Create a feature branch: git checkout -b feature-name.
Commit your changes: git commit -m 'Add new feature'.
Push to the branch: git push origin feature-name.
Open a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for more information.

Acknowledgments
Special thanks to the Qwant search engine for providing a robust API.

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

QwantAI-1.0.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

QwantAI-1.0.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: QwantAI-1.0.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for QwantAI-1.0.0.tar.gz
Algorithm Hash digest
SHA256 105be81d0a1601b8a7c88c6bdeea92140c66953b515df7a6d29f1399dc06fa86
MD5 6feddc5218a261ba22e61bb13961cdb2
BLAKE2b-256 ce4218493cdf86eebc4af656c805a000e4bd1a7c1342e8aeae1da4745f073aca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: QwantAI-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for QwantAI-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a57eeb6d689b750bddaf345096abad6fc94fb5b4e453589e280fba2de6f37826
MD5 893198aae132179ac0120e815ed32710
BLAKE2b-256 f14c61dc87980fdb1a2dc3d952b5a143691c9e7a24884b17f7e045a417212a16

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