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

Uploaded Python 3

File details

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

File metadata

  • Download URL: saldor-0.0.9.tar.gz
  • Upload date:
  • Size: 2.7 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.9.tar.gz
Algorithm Hash digest
SHA256 0ef3b278491acf22295797db600f24c7180c88c24f64a211bd0aa88455950572
MD5 81552c8c10b1f9e45a5151d6ff172b86
BLAKE2b-256 dbce9593ca9a1171ef663c125a5f609f5260fc1daf9eac2e2c3b3eeb58cf94e9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: saldor-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 3.1 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 7d3fae7883af1efe61be04a417f81477fed589f99a1cc964d8910684435b9f98
MD5 8035648d8ee7afcd5faaf7f58c165313
BLAKE2b-256 06bb3fca8fc958e71d95ee07b0b6166ab29e8d1efba3062cce2782c5aaab0b51

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