{"id":50119472,"url":"https://github.com/refract-org/refract-py","last_synced_at":"2026-05-23T18:04:21.549Z","repository":{"id":358590355,"uuid":"1240354044","full_name":"refract-org/refract-py","owner":"refract-org","description":"Python SDK for Refract — the open claim-history layer for public knowledge","archived":false,"fork":false,"pushed_at":"2026-05-18T05:27:09.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-18T05:54:51.501Z","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/refract-org.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-16T03:30:26.000Z","updated_at":"2026-05-18T05:27:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/refract-org/refract-py","commit_stats":null,"previous_names":["refract-org/refract-py"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/refract-org/refract-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refract-org%2Frefract-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refract-org%2Frefract-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refract-org%2Frefract-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refract-org%2Frefract-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/refract-org","download_url":"https://codeload.github.com/refract-org/refract-py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refract-org%2Frefract-py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33406480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T04:15:53.637Z","status":"ssl_error","status_checked_at":"2026-05-23T04:15:53.242Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-05-23T18:04:10.704Z","updated_at":"2026-05-23T18:04:21.539Z","avatar_url":"https://github.com/refract-org.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# refract-py\n\nPython SDK for [Refract](https://github.com/refract-org/refract) — the open claim-history layer for public knowledge.\n\n```bash\npip install refract-py\n```\n\nRequires the [Refract CLI](https://github.com/refract-org/refract):\n```bash\nnpm install -g @refract-org/cli\n```\n\n## Usage\n\n```python\nfrom refract import Refract\n\nr = Refract()\n\n# Analyze a page, get typed dataclasses\nevents = r.analyze(\"Bitcoin\", depth=\"brief\")\nfor event in events:\n    print(event.eventType, event.timestamp)\n\n# Export as pandas DataFrame\ndf = r.analyze(\"Bitcoin\", depth=\"forensic\", as_frame=True)\nprint(df.groupby(\"event_type\").size())\n\n# Export flattened CSV-compatible rows\ndf = r.export(\"Bitcoin\", format=\"ndjson\", flatten=True, as_frame=True)\n```\n\n## Integrations\n\n| Tool | How |\n|---|---|\n| **pandas** | `as_frame=True` returns DataFrames with flattened provenance fields |\n| **Jupyter** | Analyze pages, plot citation churn, export findings — all from a notebook |\n| **LangChain** | `refract_langchain.py` loads events as `Document` objects with stability metadata for provenance-aware RAG |\n| **DuckDB** | Export as NDJSON, query with SQL: `SELECT * FROM 'events.jsonl'` |\n\nSee the [Python SDK tutorial](https://refract-org.github.io/refract-docs/tutorials/python-sdk/) and [integrations docs](https://refract-org.github.io/refract-docs/integrations/) for full workflows.\n\n## License\n\nAGPL-3.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefract-org%2Frefract-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frefract-org%2Frefract-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefract-org%2Frefract-py/lists"}