Official Kadoa SDK for Python - Web data extraction and automation
Project description
Kadoa SDK for Python
Official Python SDK for the Kadoa API, providing easy integration with Kadoa's web data extraction platform.
Getting Started
Obtaining an API Key
To use the Kadoa SDK, you'll need an API key:
- Register at https://www.kadoa.com/
- Navigate to https://www.kadoa.com/account
- Copy your API key from the account page
Installation
pip install kadoa-sdk
For development:
pip install -e .
Quick Start
from kadoa_sdk import initialize_app, run_extraction, KadoaConfig, ExtractionOptions
# Initialize the SDK
app = initialize_app(KadoaConfig(
api_key="your-api-key",
base_url="https://api.kadoa.com" # optional, defaults to production
))
# Run an extraction
result = run_extraction(app, ExtractionOptions(
urls=["https://example.com"],
name="My Extraction Workflow"
))
if result:
print(f"Workflow created with ID: {result.workflow_id}")
Configuration
The SDK can be configured using environment variables or directly in code:
Environment Variables
Create a .env file:
KADOA_API_KEY=your-api-key
KADOA_API_URL=https://api.kadoa.com
KADOA_TIMEOUT=30
Then load them in your code:
import os
from dotenv import load_dotenv
from kadoa_sdk import initialize_app, KadoaConfig
load_dotenv()
app = initialize_app(KadoaConfig(
api_key=os.environ["KADOA_API_KEY"],
base_url=os.environ.get("KADOA_API_URL", "https://api.kadoa.com"),
timeout=int(os.environ.get("KADOA_TIMEOUT", "30"))
))
Development
Project Structure
sdks/python/
├── kadoa_sdk/
│ ├── __init__.py # Public API exports
│ ├── app.py # Application initialization
│ ├── extraction/ # Extraction module
│ │ ├── __init__.py
│ │ ├── extraction.py # Core extraction logic
│ │ └── client.py # API client helpers
│ └── generated/ # Auto-generated API client
├── tests/
│ └── e2e/
│ └── test_run_extraction.py
├── examples/
│ └── run_extraction.py
├── pyproject.toml
├── pytest.ini
└── Makefile
Running Tests
# Run all tests
make test
# Run E2E tests only
make test-e2e
# Run with coverage
make test-coverage
Installing Development Dependencies
make install-dev
Code Quality
# Run linting
make lint
# Format code
make format
License
MIT
Support
For support, please visit Kadoa Support or contact support@kadoa.com.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kadoa_sdk-0.3.0.tar.gz.
File metadata
- Download URL: kadoa_sdk-0.3.0.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5d36d2b3b62d044e52e0e20192c494d93a989475aedc85a33fadbe86c7e3adc
|
|
| MD5 |
1990c554bf8372679040dc316fdc9ed5
|
|
| BLAKE2b-256 |
d342472d4fd814796f9e78db7176ba84fbc50b7ad208722eaf04370f03b3f31f
|
File details
Details for the file kadoa_sdk-0.3.0-py3-none-any.whl.
File metadata
- Download URL: kadoa_sdk-0.3.0-py3-none-any.whl
- Upload date:
- Size: 21.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a1be61ec32e337c4e7d740b2766f822a109cc3d4a84450d2b7efd908b6a5605
|
|
| MD5 |
af7a8c4e2d128edb301407f619336968
|
|
| BLAKE2b-256 |
b126538cc822f85b8d996b39164497ab0aa081309463bc0fd6874cb65dca90a1
|