{"id":18336526,"url":"https://github.com/onedoclabs/fileforge-python-sdk","last_synced_at":"2025-07-15T04:04:25.261Z","repository":{"id":244322752,"uuid":"805393967","full_name":"OnedocLabs/fileforge-python-sdk","owner":"OnedocLabs","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-14T00:56:05.000Z","size":93,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T19:55:52.219Z","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/OnedocLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2024-05-24T13:31:15.000Z","updated_at":"2024-07-07T01:41:32.000Z","dependencies_parsed_at":"2024-06-17T15:32:21.123Z","dependency_job_id":null,"html_url":"https://github.com/OnedocLabs/fileforge-python-sdk","commit_stats":null,"previous_names":["onedoclabs/fileforge-python-sdk"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/OnedocLabs/fileforge-python-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnedocLabs%2Ffileforge-python-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnedocLabs%2Ffileforge-python-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnedocLabs%2Ffileforge-python-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnedocLabs%2Ffileforge-python-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OnedocLabs","download_url":"https://codeload.github.com/OnedocLabs/fileforge-python-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnedocLabs%2Ffileforge-python-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265401678,"owners_count":23758995,"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-05T20:08:09.931Z","updated_at":"2025-07-15T04:04:24.991Z","avatar_url":"https://github.com/OnedocLabs.png","language":"Python","readme":"# Fileforge Python Library\n\n[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://github.com/fern-api/fern)\n\nThe Fileforge Python Library provides convenient access to the Fileforge API from applications written in Python. \n\nThe library includes type definitions for all request and response fields, and offers both synchronous and asynchronous clients powered by httpx.\n\n## Installation\n\nAdd this dependency to your project's build file:\n\n```bash\npip install fileforge\n# or\npoetry add fileforge\n```\n\n## Usage\nSimply import `Fileforge` and start making calls to our API. \n\n```python\nfrom fileforge import GenerateRequestOptions\nfrom fileforge.client import Fileforge\n\nclient = Fileforge(\n    api_key=\"YOUR_API_KEY\" # Defaults to FILEFORGE_API_KEY\n)\nclient.generate(\n    options=GenerateRequestOptions(),\n    files=[\"path/to/file1\", \"path/to/file2\"]\n)\n```\n\n## Async Client\nThe SDK also exports an async client so that you can make non-blocking\ncalls to our API. \n\n```python\nfrom fileforge import GenerateRequestOptions\nfrom fileforge.client import AsyncFileforge\n\nclient = AsyncFileforge(\n    api_key=\"YOUR_API_KEY\"  # Defaults to FILEFORGE_API_KEY\n)\n\nasync def main() -\u003e None:\n    client.generate(\n        options=GenerateRequestOptions(),\n        files=[\"path/to/file1\", \"path/to/file2\"]\n    )\nasyncio.run(main())\n```\n\n## Exception Handling\nAll errors thrown by the SDK will be subclasses of [`ApiError`](./src/schematic/core/api_error.py).\n\n```python\nimport fileforge\n\ntry:\n    client.generate(...)\nexcept fileforge.core.ApiError as e: # Handle all errors\n  print(e.status_code)\n  print(e.body)\n```\n\n## Advanced\n\n### Timeouts\nBy default, requests time out after 60 seconds. You can configure this with a \ntimeout option at the client or request level.\n\n```python\nfrom fileforge.client import Fileforge\n\nclient = Fileforge(\n    # All timeouts are 20 seconds\n    timeout=20.0,\n)\n\n# Override timeout for a specific method\nfileforge.generate(..., {\n    timeout_in_seconds=20.0\n})\n```\n\n### Retries\nThe SDK is instrumented with automatic retries with exponential backoff. A request will be\nretried as long as the request is deemed retriable and the number of retry attempts has not grown larger\nthan the configured retry limit (default: 2).\n\nA request is deemed retriable when any of the following HTTP status codes is returned:\n\n- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)\n- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)\n- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)\n  \nUse the `max_retries` request option to configure this behavior. \n\n```python\nclient.generate(..., {\n     max_retries=1\n})\n```\n\n### Custom HTTP client\nYou can override the httpx client to customize it for your use-case. Some common use-cases \ninclude support for proxies and transports.\n\n```python\nimport httpx\n\nfrom fileforge.client import Fileforge\n\nclient = Fileforge(\n    http_client=httpx.Client(\n        proxies=\"http://my.test.proxy.example.com\",\n        transport=httpx.HTTPTransport(local_address=\"0.0.0.0\"),\n    ),\n)\n```\n\n## Beta Status\n\nThis SDK is in **Preview**, and there may be breaking changes between versions without a major \nversion update. \n\nTo ensure a reproducible environment (and minimize risk of breaking changes), we recommend pinning a specific package version.\n\n## Contributing\n\nWhile we value open-source contributions to this SDK, this library is generated programmatically. \nAdditions made directly to this library would have to be moved over to our generation code, \notherwise they would be overwritten upon the next generated release. Feel free to open a PR as\n a proof of concept, but know that we will not be able to merge it as-is. We suggest opening \nan issue first to discuss with us!\n\nOn the other hand, contributions to the README are always very welcome!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonedoclabs%2Ffileforge-python-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonedoclabs%2Ffileforge-python-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonedoclabs%2Ffileforge-python-sdk/lists"}