Skip to main content

Python SDK for the DopplrHub public API

Project description

DopplrHub Python SDK

A Python SDK for the current DopplrHub public API, including generic conversions, tools, and utility endpoints.

Install

pip install dopplrhub

For this local scaffold:

cd D:\AudioConverter\sdk\python
pip install -e .

If you want to distribute the SDK directly from the backend, this workspace will expose a zip bundle at /api/sdk/python-sdk.zip.

Local file conversion

from dopplrhub import DopplrHub

api = DopplrHub("YOUR_API_KEY", "https://api.dopplrhub.com/api/v1")

(api.start("./input.pdf", "jpg")
    .wait()
    .download("./input.jpg")
    .delete())

Remote file conversion

from dopplrhub import DopplrHub

api = DopplrHub("YOUR_API_KEY", "https://api.dopplrhub.com/api/v1")

(api.start_from_url("https://example.com/brochure.pdf", "png")
    .wait()
    .download("./brochure.png")
    .delete())

Tools

from dopplrhub import DopplrHub

api = DopplrHub("YOUR_API_KEY", "https://api.dopplrhub.com/api/v1")

(api.tools.ocr("./scan.pdf", "ocr-docx", language="eng")
    .wait()
    .download("./scan.docx"))

(api.tools.image_resize(
    "./hero.png",
    width=1920,
    height=1080,
    fit="cover",
    output_format="webp",
)
    .wait()
    .download("./hero.webp"))

(api.tools.pdf_compress("./packet.pdf", "screen")
    .wait()
    .download("./packet-compressed.pdf"))

(api.tools.video_trim("./clip.mp4", start_time=3, end_time=12, output_format="mp4")
    .wait()
    .download("./clip-trimmed.mp4"))

api.tools.ada("./brochure.pdf").download("./brochure-ada-report.pdf")
api.tools.ats(
    "./resume.pdf",
    "Senior Python engineer with API design experience",
    industry="technology",
).download("./resume-optimized.docx")

(api.tools.archive(["./a.txt", "./b.txt"], "zip", archive_name="documents")
    .wait()
    .download("./documents.zip"))

(api.tools.social_resize(
    "./hero.png",
    platform="instagram",
    selected_size_ids=["post-square", "story"],
    output_format="jpg",
)
    .wait()
    .download("./hero-instagram.zip"))

result = api.tools.ats_reexport(report, "modern", download_as="resume-modern.docx")
result.download("./resume-modern.docx")

Tool coverage in the Python SDK includes ocr, pdf, image, video, ada, ats, ats_reexport, archive, and social_resize on api.tools.

Examples

  • examples/convert_local_file.py
  • examples/convert_remote_file.py
  • examples/ocr_tool.py
  • examples/pdf_tool.py
  • examples/image_tool.py
  • examples/video_tool.py
  • examples/ada_tool.py
  • examples/ats_tool.py
  • examples/tools_and_utilities.py

Utilities

from dopplrhub import DopplrHub

api = DopplrHub("YOUR_API_KEY", "https://api.dopplrhub.com/api/v1")

formats = api.utilities.supported_formats()
rates = api.utilities.currency_rates("USD")
api.utilities.batch_download(["JOB_ID_1", "JOB_ID_2"], "./converted_files.zip")

Important behavior note

start_from_url() currently downloads the remote resource first, then uploads it into DopplrHub. It does not perform headless browser webpage rendering.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dopplrhub-1.0.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dopplrhub-1.0.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file dopplrhub-1.0.0.tar.gz.

File metadata

  • Download URL: dopplrhub-1.0.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for dopplrhub-1.0.0.tar.gz
Algorithm Hash digest
SHA256 393d2557788e81f935d6a353f3bdac1a59450a0ef76cbd9fefe25becfb28d125
MD5 c2b8dc2d1deb12c6f77f2c35578d13cf
BLAKE2b-256 aa7310d4a6b8a0ae40254f692bca2bc8576ec3f4666772dc937dbd3a3934a6cf

See more details on using hashes here.

File details

Details for the file dopplrhub-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: dopplrhub-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for dopplrhub-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff868c923e710f7749f0d98f4353e4ea806a2e5835e88c0c17947b2982554b9c
MD5 18dbf20e1accfc5330b0af67edc2b3be
BLAKE2b-256 0b6be8eb82a3c8d1fe4e32e84951c6a089191d95df7170aff84607f11a830294

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page