Skip to main content

A Python SDK for interacting with the Datura API service.

Project description

Datura

Datura API in Python

https://console.datura.ai/

Installation

pip install datura-py

Usage

Import the package and initialize the Datura client with your API key:

    from datura_py import Datura

    datura = Datura(api_key="your-api-key")

Common requests

    
    # Desearch AI Search
    result = datura.ai_search(
        prompt="Bittensor",
        tools=[
            "Web Search",
            "Hacker News Search",
            "Reddit Search",
            "Wikipedia Search",
            "Youtube Search",
            "Twitter Search",
            "ArXiv Search"
        ],
        model="NOVA",
        date_filter="PAST_24_HOURS",
        streaming=False,
    )

    #Desearch Twitter post search
    result = datura.twitter_links_search(
        prompt="Bittensor",
        model="NOVA",
    )

    #Desearch Web links search
    result = datura.web_links_search(
        prompt="Bittensor",
        tools=[
            "Web Search",
            "Hacker News Search",
            "Reddit Search",
            "Wikipedia Search",
            "Youtube Search",
            "Twitter Search",
            "ArXiv Search"
        ],
        model="NOVA",
    )

    #Basic Twitter search
    result = datura.basic_twitter_search(
        query="Whats going on with Bittensor",
        sort="Top",
        user="elonmusk",
        start_date="2024-12-01",
        end_date="2025-02-25",
        lang="en",
        verified=True,
        blue_verified=True,
        is_quote=True,
        is_video=True,
        is_image=True,
        min_retweets=1,
        min_replies=1,
        min_likes=1
    )

    #Basic Web search
    result = datura.basic_web_search(
        query="latest news on AI",
        num=10,
        start=0
    )

    #Fetch Tweets by URLs
    result = datura.twitter_by_urls(
        urls=["https://twitter.com/elonmusk/status/1613000000000000000"]
    )

    #Fetch Tweets by ID
    result = datura.twitter_by_id(id="123456789")

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

datura_py-0.0.10.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

datura_py-0.0.10-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file datura_py-0.0.10.tar.gz.

File metadata

  • Download URL: datura_py-0.0.10.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for datura_py-0.0.10.tar.gz
Algorithm Hash digest
SHA256 25caf5ce43b878af93ce01e9ae20cc6de125b3a8f5e8ef45bb5cb2a50b8a5f33
MD5 7a3c2f0eac0753a42ce7a1d85904d8e3
BLAKE2b-256 375f59d8c0b80132005258feb1ade9613019484c924f48512645f08d7a74f3ec

See more details on using hashes here.

File details

Details for the file datura_py-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: datura_py-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for datura_py-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 3a372950df1c5a76a381ad9c025baf9c0df0fe0d76613a90e04471a63d1c9a6b
MD5 22352eb45fb4032994e8e0008940a54d
BLAKE2b-256 51cf13e3c089fa7de2341f767f19a0b7b1919f319ac9b2401edea538e1da47f7

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