{"id":19055906,"url":"https://github.com/schemathesis/harfile","last_synced_at":"2025-04-24T04:29:31.017Z","repository":{"id":246663957,"uuid":"821793993","full_name":"schemathesis/harfile","owner":"schemathesis","description":"Writer for HTTP Archive (HAR) files","archived":false,"fork":false,"pushed_at":"2025-04-20T10:23:56.000Z","size":116,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-20T11:55:29.644Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schemathesis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"Stranger6667"}},"created_at":"2024-06-29T13:01:34.000Z","updated_at":"2025-04-20T10:23:58.000Z","dependencies_parsed_at":"2024-07-07T07:32:11.358Z","dependency_job_id":"2eca1d56-f540-4e64-8e7e-9e9a48c93fbc","html_url":"https://github.com/schemathesis/harfile","commit_stats":null,"previous_names":["schemathesis/harfile"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schemathesis%2Fharfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schemathesis%2Fharfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schemathesis%2Fharfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schemathesis%2Fharfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schemathesis","download_url":"https://codeload.github.com/schemathesis/harfile/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250564065,"owners_count":21450947,"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":"2024-11-08T23:47:24.370Z","updated_at":"2025-04-24T04:29:30.994Z","avatar_url":"https://github.com/schemathesis.png","language":"Python","funding_links":["https://github.com/sponsors/Stranger6667"],"categories":[],"sub_categories":[],"readme":"# harfile\n\n[![CI](https://github.com/schemathesis/harfile/actions/workflows/ci.yml/badge.svg)](https://github.com/schemathesis/harfile/actions/workflows/ci.yml)\n[![Coverage](https://codecov.io/gh/schemathesis/harfile/branch/main/graph/badge.svg)](https://codecov.io/gh/schemathesis/harfile/branch/main)\n[![Version](https://img.shields.io/pypi/v/harfile.svg)](https://pypi.org/project/harfile/)\n[![Python versions](https://img.shields.io/pypi/pyversions/harfile.svg)](https://pypi.org/project/harfile/)\n[![License](https://img.shields.io/pypi/l/harfile.svg)](https://opensource.org/licenses/MIT)\n\nThis package provides a zero-dependency writer for building HAR (HTTP Archive) files in Python.\n\n**NOTES**:\n\n- The writer assumes a single-threaded environment.\n- Pages are not supported.\n\n## Usage\n\n```python\nimport datetime\nimport io\n\nimport harfile\n\n\n# Write to a file\nwith harfile.open(\"filename.har\") as har:\n    har.add_entry(\n        startedDateTime=datetime.datetime.now(datetime.timezone.utc),\n        time=42,\n        request=harfile.Request(\n            method=\"GET\",\n            url=\"http://example.com\",\n            httpVersion=\"HTTP/1.1\",\n        ),\n        response=harfile.Response(\n            status=200,\n            statusText=\"OK\",\n            httpVersion=\"HTTP/1.1\",\n        ),\n        timings=harfile.Timings(\n            send=0,\n            wait=0,\n            receive=0,\n        ),\n    )\n\n\n# Write to a string buffer\nbuffer = io.StringIO()\nwith harfile.open(buffer) as har:\n    pass\n\n```\n\n## License\n\nThe code in this project is licensed under [MIT license](https://opensource.org/licenses/MIT).\nBy contributing to `harfile`, you agree that your contributions will be licensed under its MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschemathesis%2Fharfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschemathesis%2Fharfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschemathesis%2Fharfile/lists"}