Skip to main content

Dappier Python SDK

Python SDK for interacting with Dappier's API's.

Overview

dappier-py provides a straightforward way to interact with Dappier's API's, which allows for real-time data search on the internet and other datamodels from the marketplace. The library is designed to be easy to use and integrate into existing Python projects.

Installation

To install the package, run:

pip install dappier

Alternatively, you can clone the repository and install the dependencies:

git clone https://github.com/DappierAI/dappier-py
cd dappier-py
pip install -r requirements.txt

Initialization

You can get your API key from your Dappier account.

from dappier.dappier import DappierApp

app = DappierApp(api_key='your_api_key')

You can perform a real-time search by providing a query. This will search for real-time data related to your query.

result = app.realtime_search_api("When is the next election?")
print(result.response['response']["results"])

AI Recommendations

The AI Recommendations feature allows you to query for articles and other content using a specific data model. You can pick a specific datamodel from marketplace

Default Options:

ai_result = app.ai_recommendations(query="latest tech news", datamodel_id="dm_02hr75e8ate6adr15hjrf3ikol")
print(ai_result.results)

Custom Options:

You can pass custom parameters such as similarity_top_k, ref and num_articles_ref:

ai_custom_result = app.ai_recommendations(
    query="latest tech news", 
    datamodel_id="dm_02hr75e8ate6adr15hjrf3ikol", 
    similarity_top_k=5, 
    ref="techcrunch.com", 
    num_articles_ref=2
)
print(ai_custom_result.results)

Search API

You can also perform a search using a specific datamodel_id. This method allows users to input custom queries and retrieve data based on the datamodel provided.

search_result = app.search(
    query="Latest Microsoft News",
    datamodel_id="dm_01htjq2njgecvah7ncepm8v87y",
    similarity_top_k=6,
    ref="familyproof.com",
    num_articles_ref=3
)
print(search_result.results)

Checkout (example.py)[https://github.com/DappierAI/dappier-py] in this repository for a working example.

Metadata

Release files for dappier-py 0.2.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 dappier-py 0.2.0
File Size Uploaded Provenance Actions
dappier-py-0.2.0.tar.gz 6.4 kB Without provenance Details for dappier-py-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dappier-py 0.2.0
File Interpreter ABI Platform Actions
dappier_py-0.2.0-py3-none-any.whl Python 3 none any Details for dappier_py-0.2.0-py3-none-any.whl

Total release size: 12.1 kB

Release files / dappier-py-0.2.0.tar.gz

Download URL dappier-py-0.2.0.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
430bacd3a504609c1f45b607745aa2cd1a2cd0a095d477aec027afafcbf1ff9e
BLAKE2b-256 checksum
How to use checksums
a96acb0bca055e7ef9b27eed4fd9149e4aa719d38aeffdb1434b31cb0339295b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.6

Release files / dappier_py-0.2.0-py3-none-any.whl

Download URL dappier_py-0.2.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
817c29cd498ecf6ead16d6c1781a5e0ef171cc122e1b1422b41b4f3e46eeefe3
BLAKE2b-256 checksum
How to use checksums
f129422288099786049835cdb8675286e401d25f066d10916653a40faa410ebe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.6

Security for dappier-py 0.2.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.2.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