Skip to main content

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)

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


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.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datacrawl_sdk-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file datacrawl_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: datacrawl_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for datacrawl_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dc523cb09395927eaae3497b329f0a18a0212d87d98b8ce9ce9fe1c854c12213
MD5 bc65cf32257215c2ebeaf8e1778861b7
BLAKE2b-256 4b2e835f3590960b357d9f1fd64419933832e2210a2d82cfae5e573693b86a27

See more details on using hashes here.

File details

Details for the file datacrawl_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: datacrawl_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for datacrawl_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e1220af99817c918bd61152e19bf3b4d61db3cbcfeddf72255f61325a4555ad
MD5 c981cc7c03d714e25639b9272aae524c
BLAKE2b-256 d8feb05a415a953511f84ec5a868e1c55cf53ca921f6a9162e7b30f25fa9791d

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