{"id":24377878,"url":"https://github.com/predixus/dynarag-python-client","last_synced_at":"2026-02-06T11:10:38.406Z","repository":{"id":269035399,"uuid":"906224695","full_name":"Predixus/DynaRAG-Python-Client","owner":"Predixus","description":"Python Client to the DynaRAG API","archived":false,"fork":false,"pushed_at":"2025-01-01T08:59:55.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-24T17:49:47.445Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Predixus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-12-20T12:27:50.000Z","updated_at":"2025-01-01T08:59:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"8138fc62-cebf-4d25-877b-706730399bf7","html_url":"https://github.com/Predixus/DynaRAG-Python-Client","commit_stats":null,"previous_names":["predixus/dynarag-python-client"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Predixus%2FDynaRAG-Python-Client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Predixus%2FDynaRAG-Python-Client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Predixus%2FDynaRAG-Python-Client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Predixus%2FDynaRAG-Python-Client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Predixus","download_url":"https://codeload.github.com/Predixus/DynaRAG-Python-Client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248283656,"owners_count":21077896,"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-01-19T06:17:15.085Z","updated_at":"2026-02-06T11:10:33.357Z","avatar_url":"https://github.com/Predixus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DynaRAG\n\nThis is the Python client to [DynaRAG](https://github.com/Predixus/DynaRAG).\n\nDynaRAG provides a simple and fast interface to implement RAG (Retrieval Augemented Generation)\ninto your application.\n\n## Configuration\n\nDynaRAG requires some environment variables to get started:\n- `DYNARAG_API_TOKEN` - a signed JWT that contains data needed by DynaRAG. Follow the spec in the [DynaRAG](https://github.com/Predixus/DynaRAG)\nservice repo.\n- `DYNARAG_BASE_URL` - url to the DynaRAG service. e.g. http://localhost:7890\n\n## Usage\n\nInitialise a DynaRAG client:\n\n```python\nfrom dynarag import DynaRAGClient\n\nclient = DynaRAGClient()\n```\n\nSend a chunk:\n\n```python\nchunk = \"DynaRAG is awesome\"\nfilepath = \"./dev.noext\"\nclient.add_chunk(chunk=chunk,filepath=filepath)\n```\n\nGet stats on user chunks:\n\n```python\nclient.get_chunks()\n# {\n#     'total_bytes': 90,\n#     'api_requests': 281,\n#     'document_count': 1,\n#     'chunk_count': 5\n# }\n```\n\nList chunks:\n\n```python\nclient.list_chunks()\n# [\n#     {\n#         'ID': 102,\n#         'ChunkText':\n#         'DynaRAG is awesome',\n#         'ChunkSize': 18,\n#         'ModelName': 'all-MiniLM-L6-v2',\n#         'CreatedAt': '2024-12-20T12:46:47.371629Z',\n#         'FilePath': './dev.noext',\n#         'DocumentID': 107\n#     },\n#     ...\n# ]\n```\n\nFind similar chunks:\n\n```python\nclient.similar(text=\"Is DynaRAG awesome?\", k=1)\n\n# [\n#     {\n#         'ID': 102,\n#         'ChunkText': 'DynaRAG is awesome',\n#         'ChunkSize': 18,\n#         'ModelName': 'all-MiniLM-L6-v2',\n#         'CreatedAt': '2024-12-20T12:46:47.371629Z',\n#         'FilePath': './dev.noext',\n#         'DocumentID': 107\n#     },\n#     ...\n# ]\n\n```\n\nQuery an LLM:\n\n```python\nclient.query(query=\"Why is DynaRAG awesome?\")\n\n# The documents do not provide a reason why DynaRAG is awesome, they simply state that [DynaRAG is awesome][#ref-0]. No additional information is given.\n#\n# Searched Documents:\n# ref-0: ./dev.noext\n```\n\nDelete all chunks, but dry run:\n\n```python\nclient.delete(dryrun = True)\n# {\n#     'EmbeddingCount': 5,\n#     'DocumentCount': 1,\n#     'TotalBytes': 90,\n#     'FilePaths': [\n#         './dev.noext'\n#     ]\n# }\n```\n\nCommit to deleting:\n\n```python\nclient.delete(dryrun = False)\n# {\n#     'EmbeddingCount': 5,\n#     'DocumentCount': 1,\n#     'TotalBytes': 90,\n#     'FilePaths': [\n#         './dev.noext'\n#     ]\n# }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpredixus%2Fdynarag-python-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpredixus%2Fdynarag-python-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpredixus%2Fdynarag-python-client/lists"}