Skip to main content

A client library for the Saldor API.

Reason this release was yanked:

Accidentally introduced a regression. Download 0.0.7 or 0.0.9 instead.

Project description

Saldor

Saldor is a Python client library for interacting with the Saldor.com API. It allows developers to easily integrate Saldor's services into their Python applications.

Examples

Using the python library

pip install saldor

Writing a basic app that uses the client:

import os

import saldor

client = saldor.SaldorClient(api_key=os.getenv("SALDOR_API_KEY"))


documents = client.scrape_url(
    url="URL",
    params={},
)
# Create a directory called 'results' if it doesn't exist
os.makedirs("results", exist_ok=True)

# Iterate through the documents and save each as a markdown file
for i, document in enumerate(documents["data"]):
    file_path = os.path.join("results", f"{i}.md")
    with open(file_path, "w", encoding="utf-8") as file:
        file.write(document)

Using curl

curl -X POST "https://api.saldor.com/scrape" \
     -H "x-api-key: API-KEY" \
     -H "Content-Type: application/json" \
     -d '{"url": "URL", "params": {}}'

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

saldor-0.0.8.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

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

saldor-0.0.8-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file saldor-0.0.8.tar.gz.

File metadata

  • Download URL: saldor-0.0.8.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.5.0

File hashes

Hashes for saldor-0.0.8.tar.gz
Algorithm Hash digest
SHA256 cd0948e1d2c3c8c5d5330ddf4b07db6f3f2748bcd7bd27775bc9b1468bc1c7a6
MD5 3f6eb69f8c9b584be599bfb469a9bc1b
BLAKE2b-256 22b2c64d614ee6bea03ed9017c094192ef03be0afdea6cc3fc540ca9693b274e

See more details on using hashes here.

File details

Details for the file saldor-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: saldor-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.5.0

File hashes

Hashes for saldor-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 ddfb692f6a3c53de245bbb8a9c373376cfa459207fea411fa780b34d7c9fb814
MD5 b7edd8fa48b5cc0c320e8378ce1d9b2e
BLAKE2b-256 30f90b83641fe1d41c2cdfef7d46079960395f13ee10a4f22d8677863afca43f

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