{"id":29035897,"url":"https://github.com/aleph-alpha/pharia-data-sdk","last_synced_at":"2026-03-17T11:10:39.191Z","repository":{"id":300995886,"uuid":"1003616561","full_name":"Aleph-Alpha/pharia-data-sdk","owner":"Aleph-Alpha","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-24T16:28:24.000Z","size":209,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-24T16:48:43.981Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pharia-data-sdk.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aleph-Alpha.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-17T12:15:19.000Z","updated_at":"2025-06-24T16:31:05.000Z","dependencies_parsed_at":"2025-06-24T16:58:56.787Z","dependency_job_id":null,"html_url":"https://github.com/Aleph-Alpha/pharia-data-sdk","commit_stats":null,"previous_names":["aleph-alpha/pharia-data-sdk"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Aleph-Alpha/pharia-data-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aleph-Alpha%2Fpharia-data-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aleph-Alpha%2Fpharia-data-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aleph-Alpha%2Fpharia-data-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aleph-Alpha%2Fpharia-data-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aleph-Alpha","download_url":"https://codeload.github.com/Aleph-Alpha/pharia-data-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aleph-Alpha%2Fpharia-data-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262068827,"owners_count":23253876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-26T12:36:20.159Z","updated_at":"2026-03-17T11:10:39.187Z","avatar_url":"https://github.com/Aleph-Alpha.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pharia-data-sdk\n\nFormerly the `intelligence_layer/connectors/data`, `intelligence_layer/connectors/document_index` and `intelligence_layer/connectors/retrievers` modules.\n\n## Overview\n\nThis 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. \n\n## Installation\n\n```bash\npip install pharia-data-sdk\n```\n\n## Usage\n\n### Data Platform Connector\n\n```python\nfrom pharia_data_sdk.connectors.data import DataClient\n\nclient = DataClient(token=\"\u003ctoken\u003e\", base_url=\"\u003cbase_data_platform_url\u003e\")\n\nrepositories = client.list_repositories()\nrepository = repositories[0]\ndatasets = client.list_datasets(repository.repository_id)\ndataset = datasets[0]\n```\n\n### Document Index Connector\n\n```python\nfrom pharia_data_sdk.connectors.document_index.document_index import DocumentIndexClient, SearchQuery\n\nclient = DocumentIndexClient(token=\"\u003ctoken\u003e\", base_url=\"\u003cbase_document_index_url\u003e\")\n\nnamespaces = client.list_namespaces()\ncollections = client.list_collections(namespaces[0])\nindexes = client.list_indexes(namespaces[0])\nclient.search(collections[0], indexes[0].index, SearchQuery(query=\"What fish is most common in swedish lakes?\"))\n```\n\n### Retrievers\n\n```python\nfrom pharia_data_sdk.connectors.retrievers.document_index_retriever import DocumentIndexRetriever\nfrom pharia_data_sdk.connectors.document_index.document_index import DocumentIndexClient\n\nretriever = DocumentIndexRetriever(\n    document_index=DocumentIndexClient(token=\"\u003ctoken\u003e\", base_url=\"\u003cbase_document_index_url\u003e\"),\n    index_name=\"\u003cindex_name\u003e\",\n    namespace=\"\u003cnamespace\u003e\",\n    collection=\"\u003ccollection\u003e\",\n)\n\nretriever.get_relevant_documents_with_scores(\"What fish is most common in swedish lakes?\")\n```\n\n## Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](https://github.com/Aleph-Alpha/pharia-data-sdk/blob/main/CONTRIBUTING.md) for details on how to set up the development environment and submit changes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleph-alpha%2Fpharia-data-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faleph-alpha%2Fpharia-data-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleph-alpha%2Fpharia-data-sdk/lists"}