Skip to main content

DataCrawl Python SDK

Python client for DataCrawl agent authorization APIs.

Install

Editable local install from this repository root:

pip install -e ./packages/sdk-python

Install from package index (after publish):

pip install datacrawl

Quickstart

from datacrawl import DataCrawl

client = DataCrawl(
    api_key="dc_live_xxx",
    base_url="https://datacrawl.org",
)

result = client.authorize(
    tool="gmail.send_email",
    payload={"to": "security@example.com", "subject": "Policy check"},
)

print(result.decision, result.reason, result.request_id)

API Surface

  • DataCrawl.authorize(tool, payload, idempotency_key=None)
  • DataCrawl.record(request_id, outcome, error_code=None, duration_ms=None)
  • DataCrawl.protect(tool, overrides=None)
  • DataCrawl.poll_approval(approval_id, poll_interval_s=2.0, timeout_s=60.0)
  • DataCrawl.validate(contract_id, payload, request_id=None)
  • DataCrawl.validate_contract(contract_id, payload, request_id=None)
  • DataCrawl.list_tools(), DataCrawl.get_tool(tool_id), DataCrawl.execute_tool(tool_id, input_payload)
  • DataCrawl.search_tools(query, limit=None, optimize=None), DataCrawl.find_tools(query, debug=False)
  • DataCrawl.create_contract(tool_name, ..., runtime_settings=None)
  • DataCrawl.list_contracts(), DataCrawl.get_contract(contract_id)
  • DataCrawl.update_contract(contract_id, patch), DataCrawl.delete_contract(contract_id)

Local Validation

python -m pip install -e ./packages/sdk-python
python -c "from datacrawl import DataCrawl, DataCrawlError; print('ok')"
python -m pip show datacrawl

Release (Optional)

cd packages/sdk-python
python -m pip install --upgrade build twine
python -m build
twine check dist/*
# twine upload dist/*

Metadata

Release files for datacrawl-sdk 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for datacrawl-sdk 0.1.1
File Size Uploaded Provenance Actions
datacrawl_sdk-0.1.1.tar.gz 9.9 kB Without provenance Details for datacrawl_sdk-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for datacrawl-sdk 0.1.1
File Interpreter ABI Platform Actions
datacrawl_sdk-0.1.1-py3-none-any.whl Python 3 none any Details for datacrawl_sdk-0.1.1-py3-none-any.whl

Total release size: 17.7 kB

Release files / datacrawl_sdk-0.1.1.tar.gz

Download URL datacrawl_sdk-0.1.1.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4307a2c6597b03b89d86f2cc524bc76471caa7f765e834559d43afb0d205f7b1
BLAKE2b-256 checksum
How to use checksums
98f157e141efcbd3d82696392a992ee8fd7ba5011e58520287edd671f082ceb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / datacrawl_sdk-0.1.1-py3-none-any.whl

Download URL datacrawl_sdk-0.1.1-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bcb6c55c8cee04f8468bcb2ca91aebda11b0384721a02129d81ab9c74cc008e8
BLAKE2b-256 checksum
How to use checksums
7aa299243562450d8798c8fd85e11cbe49beaa4b1f40b5e94b940b1bb8255203
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for datacrawl-sdk 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page