Skip to main content

echoscan (Python)

中文 | English

中文

可用调用方式

  • EchoScanLiteClient(api_key=...)
  • EchoScanProClient(api_key=...)

方法:

  • Lite: get_report(imprint)
  • Pro: get_report(imprint, account_ref=...), get_history(imprint, days=..., from_=..., to=..., recent=...)

不传 account_ref 时保持原有 GET;传入时发送一次不自动重试的 Account Map JSON POST。该值必须是 1–256 个 UTF-8 字节、无首尾空白且无控制字符的字符串。服务端细分错误码位于 ApiError.server_code。

History 查询:

仅 Pro 客户端可用(需要 Pro API Key)。

返回值与错误

get_report() 顶层结构:

{
  "analysis": {},
  "lyingCount": 0,
  "projection": {}
}

get_history() 顶层结构:

{
  "imprint": "fp_session_...",
  "range": {},
  "recent": [],
  "summary": {},
  "timeline": []
}

Geo 字段说明(重要)

  • SDK 只透传服务端返回,不在客户端自行做 IP 地理定位。
  • 若服务端仅有 GeoLite2-Country.mmdb,通常只能返回国家级 geo;region/city 可能为空。
  • 若服务端 geo enrichment 不可用,返回会降级(例如仅有 country_hint 或无 geo 字段)。
  • 若服务端 geo enrichment 可用,主要查看 projection.geo.data.geo_public,字段包括:country_code、country_name、region_code、region_name、city、timezone。
  • analysis.geo 提供主地理结果聚合字段:final_ip、country_code、country_name、region_code、region_name、city。
  • projection.geo.data 还会带 confidence 与 geo_low_trust(例如 locale 与 IP 国家冲突)用于前端展示可信度提示。
  • 在存储/调试字段中:geo_source_ip 是主判定 IP(canonical/best-effort),geo_request_client_ip 是请求链路观测 IP(证据);两者可能不同(代理或多跳网络常见)。
  • confidence 与 geo_low_trust 评价的是主结果(geo_public + geo_source_ip),不是 geo_request_client_ip 的评分。
  • 若你的产品对外展示 MaxMind GeoLite 数据,请附署名:This product includes GeoLite Data created by MaxMind, available from https://www.maxmind.com.

完整字段说明链接:echoscan

示例

import os
from echoscan import EchoScanProClient

pro = EchoScanProClient(api_key=os.environ["ECHOSCAN_PRO_KEY"])
report = pro.get_report("fp_session_123")
account_report = pro.get_report("fp_session_123", account_ref="account_test_a")
history = pro.get_history("fp_session_123", from_="2026-03-01", to="2026-03-18", recent=20)

print(report)
print(account_report)
print(history)

English

Usage

  • EchoScanLiteClient(api_key=...)
  • EchoScanProClient(api_key=...)

Methods:

  • Lite: get_report(imprint)
  • Pro: get_report(imprint, account_ref=...), get_history(imprint, days=..., from_=..., to=..., recent=...)

Without account_ref, the existing GET is unchanged. When supplied, the SDK sends one Account Map JSON POST with no automatic retry. It must be a string of 1–256 UTF-8 bytes with no leading/trailing whitespace or control characters. The stable server-specific error code is available as ApiError.server_code.

History query:

Pro-only (requires a Pro API key).

Response and errors

get_report() top-level shape:

{
  "analysis": {},
  "lyingCount": 0,
  "projection": {}
}

get_history() top-level shape:

{
  "imprint": "fp_session_...",
  "range": {},
  "recent": [],
  "summary": {},
  "timeline": []
}

Geo fields (important)

  • The SDK forwards server responses and does not perform client-side IP geolocation.
  • If the backend only has GeoLite2-Country.mmdb, geo is typically country-level only; region/city may be empty.
  • If backend geo enrichment is unavailable, responses degrade (for example country_hint only, or no geo fields).
  • When geo enrichment is available, the primary display payload is projection.geo.data.geo_public with fields: country_code, country_name, region_code, region_name, city, timezone.
  • analysis.geo provides a flattened primary result: final_ip, country_code, country_name, region_code, region_name, city.
  • projection.geo.data also includes confidence and geo_low_trust (for example locale vs IP-country mismatch) for trust-aware UX.
  • In storage/debug fields, geo_source_ip is the primary canonical (best-effort) lookup IP, while geo_request_client_ip is request-chain observed evidence; they may differ (common with proxies or multi-hop networks).
  • confidence and geo_low_trust rate the primary result (geo_public derived from geo_source_ip), not geo_request_client_ip.
  • If your product displays MaxMind GeoLite data externally, include attribution: This product includes GeoLite Data created by MaxMind, available from https://www.maxmind.com.

Full field reference: echoscan

Example

import os
from echoscan import EchoScanProClient

pro = EchoScanProClient(api_key=os.environ["ECHOSCAN_PRO_KEY"])
report = pro.get_report("fp_session_123")
account_report = pro.get_report("fp_session_123", account_ref="account_test_a")
history = pro.get_history("fp_session_123", from_="2026-03-01", to="2026-03-18", recent=20)

print(report)
print(account_report)
print(history)

Metadata

Release files for echoscan 0.2.3

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

Source distribution (sdist)

Source distribution for echoscan 0.2.3
File Size Uploaded Provenance Actions
echoscan-0.2.3.tar.gz 7.6 kB With provenance Details for echoscan-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for echoscan 0.2.3
File Interpreter ABI Platform Actions
echoscan-0.2.3-py3-none-any.whl Python 3 none any Details for echoscan-0.2.3-py3-none-any.whl

Total release size: 14.0 kB

Release files / echoscan-0.2.3.tar.gz

Download URL echoscan-0.2.3.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
abfe7bf78e91f8a950e04fd7a76d7c990bc121f589cc592cbcbeca3cacd589e2
BLAKE2b-256 checksum
How to use checksums
b2f4fe7ebbb3d3612c20091c24bd85d77d535a8457ebc6c260ec77fa47f1d9fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 8, 2026.

Transparency log

Release files / echoscan-0.2.3-py3-none-any.whl

Download URL echoscan-0.2.3-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d36dda13bf51f12501727f5351d9a3fd28d2c49b84cd97c41fed9b7e6470f3a
BLAKE2b-256 checksum
How to use checksums
e8ef8b8c94f71d4bdc6801bcb2a18f8a35619b827db73ba81a649d3387de2bfc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 8, 2026.

Transparency log

Security for echoscan 0.2.3

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for echoscan-0.2.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 8, 2026.

Transparency log

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.

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