global-intel-exchange (Python)
Python client for the Global Intelligence Exchange x402 M2M API.
Install (from source, not yet published)
cd sdks/python
pip install -e .
Usage
from global_intel_exchange import IntelligenceExchangeClient
client = IntelligenceExchangeClient(base_url="https://your-deployment.example.com")
result = client.query(
type="compliance",
query="Example Trading Co",
payment_hash="0x...",
machine_signature="0x...",
payment_value_eth=0.01,
)
if result.get("dataSource") != "LIVE_VERIFIED":
print("Warning: this was an AI estimate, not a real registry check:", result.get("sourceDetail"))
print(result["data"])
Checking the compliance audit trail
chain = client.verify_compliance_audit_chain()
assert chain["valid"], f"Audit chain integrity broken at index {chain['brokenAtIndex']}"
record = client.get_compliance_audit_record(result["transactionId"])
print(record["recordHash"])
Error handling
Network errors and 5xx responses raise IntelligenceExchangeError (with
.status_code and .body). 4xx application-level responses (e.g.
status: "payment_required" or "unprofitable") are returned normally as a
dict — check result["status"] rather than relying on an exception for
those, since they're expected outcomes, not failures.
See also
../../docs/API_REFERENCE.md— full endpoint reference../../docs/DATA_SOURCES.md— whatdataSourceactually means per vector../../docs/COMPLIANCE_AUDIT.md— the audit hash-chain model
Release files for global-intel-exchange 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| global_intel_exchange-0.1.0.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| global_intel_exchange-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / global_intel_exchange-0.1.0.tar.gz
| Download URL | global_intel_exchange-0.1.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ee8b5b88ad09d0c5e95e7456cd6c6b2fabd94a7cf4f3eb8dfe1efcd3e9fbb02
|
|
BLAKE2b-256 checksum How to use checksums |
177273c096670a0ee912c004a742d77f360e5d7fe3bb832c88a189d61859aeb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|
Release files / global_intel_exchange-0.1.0-py3-none-any.whl
| Download URL | global_intel_exchange-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
792723be1d3ff7f3dcc1223a6bc5d7308f68de70322e42a95e7dce6cfc585b9a
|
|
BLAKE2b-256 checksum How to use checksums |
1ba25ce383b46886f54e831434a07e80fe060218ccfe8556f776d77b06a6cfc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|