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

Uploaded Python 3

File details

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

File metadata

  • Download URL: saldor-0.0.7.tar.gz
  • Upload date:
  • Size: 2.6 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.7.tar.gz
Algorithm Hash digest
SHA256 f7b21a8b650aff166aded74c0dc963ea0b06b1505e10e633e118755baf64a071
MD5 b05b0f8ea363ae6a0d3cc3a7466ecb5c
BLAKE2b-256 d7dc9106593eee161f48d86ac1d5f6fbc21b72cd373f8ee936574b12ca192250

See more details on using hashes here.

File details

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

File metadata

  • Download URL: saldor-0.0.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 2f5c26559fe61d5b033bf561366fb1bc9a8d4b5c97e74a0c7c698ad2d338e39b
MD5 bdf240dcc1ebeb1b1ab0386d2488566a
BLAKE2b-256 58fc764f1fa9b808cd418926bd135cb3889ce38144a29f7b2d46d928cb5a2ae2

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