DataCrawl Python SDK
Project description
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/*
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
datacrawl_sdk-0.1.1.tar.gz
(9.9 kB
view details)
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 datacrawl_sdk-0.1.1.tar.gz.
File metadata
- Download URL: datacrawl_sdk-0.1.1.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4307a2c6597b03b89d86f2cc524bc76471caa7f765e834559d43afb0d205f7b1
|
|
| MD5 |
3ce0e3a3f9b178c67b50721b10314e6b
|
|
| BLAKE2b-256 |
98f157e141efcbd3d82696392a992ee8fd7ba5011e58520287edd671f082ceb9
|
File details
Details for the file datacrawl_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: datacrawl_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcb6c55c8cee04f8468bcb2ca91aebda11b0384721a02129d81ab9c74cc008e8
|
|
| MD5 |
38c511b650daa615caa05b3afe931f0f
|
|
| BLAKE2b-256 |
7aa299243562450d8798c8fd85e11cbe49beaa4b1f40b5e94b940b1bb8255203
|