Skip to main content

A client library for the Saldor API.

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.5.tar.gz (2.2 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.5-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: saldor-0.0.5.tar.gz
  • Upload date:
  • Size: 2.2 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.5.tar.gz
Algorithm Hash digest
SHA256 a7bb8cffec94573082dbf807185d3e6eefd964f01404ef222c4bf6e1063cbf3d
MD5 024a24d16dc5679c5a99b8fb9dc8dd17
BLAKE2b-256 84c516a569fa428deca7692527e5872abca9a572acc7f40fcb8345c4ecaa602f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: saldor-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 2.6 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ede2b98244437f1f96de7524792bd7005b833de79e0d87867dbd17a8363264f3
MD5 a753e428616f89bdef6b194cba775496
BLAKE2b-256 2d1d8885c3555824382fb6de40c65abe7fc74889982f775f449ec5e5475cdf1d

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