{"id":37084359,"url":"https://github.com/pdfshift/pdfshift-python","last_synced_at":"2026-01-14T10:19:19.474Z","repository":{"id":62577828,"uuid":"127009862","full_name":"pdfshift/pdfshift-python","owner":"pdfshift","description":"PDFShift Python Package","archived":true,"fork":false,"pushed_at":"2020-12-15T11:21:08.000Z","size":21,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-31T21:15:53.764Z","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/pdfshift.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}},"created_at":"2018-03-27T15:42:09.000Z","updated_at":"2023-01-28T11:28:33.000Z","dependencies_parsed_at":"2022-11-03T19:31:29.853Z","dependency_job_id":null,"html_url":"https://github.com/pdfshift/pdfshift-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pdfshift/pdfshift-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdfshift%2Fpdfshift-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdfshift%2Fpdfshift-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdfshift%2Fpdfshift-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdfshift%2Fpdfshift-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pdfshift","download_url":"https://codeload.github.com/pdfshift/pdfshift-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdfshift%2Fpdfshift-python/sbom","scorecard":{"id":725518,"data":{"date":"2025-08-11","repo":{"name":"github.com/pdfshift/pdfshift-python","commit":"bbe05462832f21c9510e04133dc33ebb3e216153"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: dist/pdfshift-1.0.0b2-py2.py3-none-any.whl:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-22T12:40:47.018Z","repository_id":62577828,"created_at":"2025-08-22T12:40:47.018Z","updated_at":"2025-08-22T12:40:47.018Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:18:03.274Z","status":"ssl_error","status_checked_at":"2026-01-14T10:16:11.865Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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-01-14T10:19:18.672Z","updated_at":"2026-01-14T10:19:19.467Z","avatar_url":"https://github.com/pdfshift.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":":warning: **PDFShift's API being simple to implement and use, we realized that using a custom library just to wrap a network library was not necessary.\nAs such, we decided to close this package and we recommend you to use a network library such as `requests` to communicate with PDFShift.**\n\nPDFShift Python Package\n=======================\n\nThis Python package provides a simplified way to interact with the [PDFShift](https://pdfshift.io) API.\n\n## Documentation\n\nSee the full documentation on [PDFShift's documentation](https://pdfshift.io/documentation).\n\n## Installation\n\nYou should not require this code directly. Instead, just run:\n\n    pip install --upgrade pdfshift\n\nor\n\n    easy_install --upgrade pdfshift\n\n\n### Requirements\n\n* Python 2.6+\n* [Requests](http://docs.python-requests.org/en/master/)\n\n## Usage\n\nThis library needs to be configured with your `api_key` received when creating an account.\nSetting it is easy as:\n\n```python\nimport pdfshift\npdfshift.api_key = '120d8e8a86d2....................'\n```\n\n### Basic example\n\n#### With an URL\n\n```python\nimport pdfshift\npdfshift.api_key = '120d8e8a86d2....................'\n\nbinary_file = pdfshift.convert('https://www.example.com')\n\nwith open('result.pdf', 'wb') as output:\n    output.write(binary_file)\n```\n\n#### With inline HTML data:\n\n```python\nimport pdfshift\npdfshift.api_key = '120d8e8a86d2....................'\n\ndocument = open('invoice.html', 'r')\ndocument_content = document.read()\ndocument.close()\n\nbinary_file = pdfshift.convert(document_content)\nwith open('result.pdf', 'wb') as output:\n    output.write(binary_file)\n```\n\n### Custom CSS\n\n#### Loading CSS from an URL:\n\n```python\nimport pdfshift\npdfshift.api_key = '120d8e8a86d2....................'\n\nbinary_file = pdfshift.convert(\n    'https://www.example.com',\n    css=\"https://www.example.com/public/css/print.css\"\n)\n\nwith open('result.pdf', 'wb') as output:\n    output.write(binary_file)\n```\n\n#### Loading CSS from a string:\n\n```python\nimport pdfshift\npdfshift.api_key = '120d8e8a86d2....................'\n\nbinary_file = pdfshift.convert(\n    'https://www.example.com',\n    css=\"a {text-decoration: underline; color: blue}\"\n)\n\nwith open('result.pdf', 'wb') as output:\n    output.write(binary_file)\n```\n\n### Custom HTTP Headers\n\n```python\nimport pdfshift\npdfshift.api_key = '120d8e8a86d2....................'\n\nbinary_file = pdfshift.convert(\n    'https://httpbin.org/headers',\n    headers={\n        'X-Original-Header': 'Awesome value',\n        'user-agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0'\n    }\n)\n\nwith open('result.pdf', 'wb') as output:\n    output.write(binary_file)\n```\n\n### Accessing secured pages\n\n```python\nimport pdfshift\npdfshift.api_key = '120d8e8a86d2....................'\n\nbinary_file = pdfshift.convert('https://httpbin.org/basic-auth/user/passwd', auth=('user', 'passwd'))\n\nwith open('result.pdf', 'wb') as output:\n    output.write(binary_file)\n```\n\n### Using cookies\n\n```python\nimport pdfshift\npdfshift.api_key = '120d8e8a86d2....................'\n\nbinary_file = pdfshift.convert(\n    'https://httpbin.org/cookies',\n    cookies=[\n        {'name': 'session', 'value': '4cb496a8-a3eb-4a7e-a704-f993cb6a4dac'}\n    ]\n)\n\nwith open('result.pdf', 'wb') as output:\n    output.write(binary_file)\n```\n\n### Adding Watermark (Oh hi Mark!)\n\n```python\nimport pdfshift\npdfshift.api_key = '120d8e8a86d2....................'\n\nbinary_file = pdfshift.convert(\n    'https://www.example.com',\n    watermark={\n        'image': 'https://pdfshift.io/static/img/logo.png',\n        'offset_x': 50,\n        'offset_y': '100px',\n        'rotate': 45\n    }\n)\n\nwith open('result.pdf', 'wb') as output:\n    output.write(binary_file)\n```\n\n### Custom Header (or Footer)\n\n```python\nimport pdfshift\npdfshift.api_key = '120d8e8a86d2....................'\n\nbinary_file = pdfshift.convert(\n    'https://www.example.com',\n    footer={\n        'source': '\u003cdiv\u003ePage {{page}} of {{total}}\u003c/div\u003e',\n        'spacing': '50px'\n    }\n)\n\nwith open('result.pdf', 'wb') as output:\n    output.write(binary_file)\n```\n\n### Protecting the generated PDF\n\n```python\nimport pdfshift\npdfshift.api_key = '120d8e8a86d2....................'\n\nbinary_file = pdfshift.convert(\n    'https://www.example.com',\n    protection={\n        'user_password': 'user',\n        'owner_password': 'owner',\n        'no_print': True\n    }\n)\n\nwith open('result.pdf', 'wb') as output:\n    output.write(binary_file)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdfshift%2Fpdfshift-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdfshift%2Fpdfshift-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdfshift%2Fpdfshift-python/lists"}