Skip to main content

No project description provided

Project description

pharia-data-sdk

Formerly the intelligence_layer/connectors/data, intelligence_layer/connectors/document_index and intelligence_layer/connectors/retrievers modules.

Overview

This module provides connectors for interacting with the Pharia Data Platform and Pharia Search (a.k.a. Document Index), you can use it to semantically search, access and manage data, documents.

Installation

pip install pharia-data-sdk

Usage

Data Platform Connector

from pharia_data_sdk.connectors.data import DataClient

client = DataClient(token="<token>", base_url="<base_data_platform_url>")

repositories = client.list_repositories()
repository = repositories[0]
datasets = client.list_datasets(repository.repository_id)
dataset = datasets[0]

Document Index Connector

from pharia_data_sdk.connectors.document_index.document_index import DocumentIndexClient, SearchQuery

client = DocumentIndexClient(token="<token>", base_url="<base_document_index_url>")

namespaces = client.list_namespaces()
collections = client.list_collections(namespaces[0])
indexes = client.list_indexes(namespaces[0])
client.search(collections[0], indexes[0].index, SearchQuery(query="What fish is most common in swedish lakes?"))

Retrievers

from pharia_data_sdk.connectors.retrievers.document_index_retriever import DocumentIndexRetriever
from pharia_data_sdk.connectors.document_index.document_index import DocumentIndexClient

retriever = DocumentIndexRetriever(
    document_index=DocumentIndexClient(token="<token>", base_url="<base_document_index_url>"),
    index_name="<index_name>",
    namespace="<namespace>",
    collection="<collection>",
)

retriever.get_relevant_documents_with_scores("What fish is most common in swedish lakes?")

Contributing

We welcome contributions! Please see our Contributing Guide for details on how to set up the development environment and submit changes.

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

pharia_data_sdk-0.1.5.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

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

pharia_data_sdk-0.1.5-py3-none-any.whl (30.7 kB view details)

Uploaded Python 3

File details

Details for the file pharia_data_sdk-0.1.5.tar.gz.

File metadata

  • Download URL: pharia_data_sdk-0.1.5.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pharia_data_sdk-0.1.5.tar.gz
Algorithm Hash digest
SHA256 47bd6e011efb9d5a4a06b9dcbbbcf5326a19063cc41d528870e88dc7f719b51f
MD5 4b1821c978a05458ab5463da63eef5b1
BLAKE2b-256 6370d12a83865cfb5f4d20cdba1d1a5e418e0323e223eec94c8ab31d75d6a4ce

See more details on using hashes here.

File details

Details for the file pharia_data_sdk-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: pharia_data_sdk-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 30.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pharia_data_sdk-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9bd2329779cdedcc3bc48fffe5d57018b3157f613753a80fd674c4448c8628a5
MD5 208499bebb91b56b1886f96312f0588c
BLAKE2b-256 f657f36eaf4b0daa3edaef0cff5187e62d708418336ee07a19dcde747ebdaed4

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