DD

devnorsai/devnors-data-python

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

901 stars 3 forks 品質 71 トレンド 24MIT

devnorsai/devnors-data-python は、https://github.com/devnorsai/devnors-data-python. からインポートされたMCPサーバー候補です。

概要

devnorsai/devnors-data-python は、https://github.com/devnorsai/devnors-data-python. からインポートされたMCPサーバー候補です。

概要(AI 翻訳)

简体中文 |英語

PythonのDevnorsデータを1つのAPIキーで使います。

法的訴訟、法律、企業データ、コンテンツ索引、学術研究などを呼び出します (論文/特許/ジャーナル/学者)、エクスプレストラッキングなど、 単一のPOST /v1/data/queryゲートウェイ。すべてのヒットはAIエージェント向けに設計されており、 該当する場合は公式の出典追跡可能性。

インストール

クイックスタート

APIキーを作成してください 開発者コンソール、それなら:

同期:

トークン

DevnorsのデータAPIキーは以下のいずれかの方法で使います:

または:

オプションのプライベート/セルフホストベースのURL:

あなたができること

再試行とページ設定

  • 自動再試行 429 / 5xx / 接続エラー(有界指数関数的) バックオフ)を終えた。400 / [401 / 402 / 501 のような再試行不可のエラーは決して実行されません 再挑戦。DevnorsData(..., max_retries=0)で無効化。
  • ページ内整理ヘルパー: paginate(...)はtotal_hitsを使ってページを歩きます。

請求とエラー

  • 成功したコールはunits(トークンチャージ済み)とrequest_id]を返します。
  • 残高不足がDevnorsDataError(code="insufficient_balance", status=402)の上昇。
  • レート制限はcode="rate_limited"(429)を上げます。

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Devnors Data Python SDK

简体中文 | English

Use Devnors Data from Python with one API Key.

Call legal cases, laws, enterprise data, content indexes, academic research (papers / patents / journals / scholars), express tracking, and more through a single POST /v1/data/query gateway. Every hit is designed for AI agents, with official-source traceability where applicable.

Install

pip install devnors-data

Quick Start

Create an API Key in the developer console, then:

from devnors_data import DevnorsData

client = DevnorsData(api_key="devnors_sk_live_xxx")  # or set DEVNORS_API_KEY

# Legal judgment documents
res = client.legal_cases("民间借贷 利息", top_k=10)
for hit in res["hits"]:
    print(hit.get("case_no"), hit.get("title"))

# Law articles
laws = client.legal_laws("合同解除 违约金")

# Unified entry for any domain / type
res = client.query(domain="legal", type="case", query="劳动争议", top_k=5)
print(res["units"], "tokens used")

Async:

import asyncio
from devnors_data import AsyncDevnorsData

async def main():
    client = AsyncDevnorsData(api_key="devnors_sk_live_xxx")
    res = await client.legal_cases("交通事故 责任认定")
    print(res["total_hits"])

asyncio.run(main())

Token

Use your Devnors Data API Key in one of these ways:

DevnorsData(api_key="devnors_sk_live_xxx")

or:

DEVNORS_API_KEY=devnors_sk_live_xxx

Optional private / self-hosted base URL:

DEVNORS_DATA_BASE_URL=https://data.devnors.com

Things You Can Do

Search Chinese legal judgment documents for private lending disputes.
Look up current PRC law articles about contract termination and liquidated damages.
Query company registration details with a credit code or company name.
Check whether a company is on the dishonest judgment debtor list.
Get Baidu suggest keywords for "lawyer".
Track a parcel with company code and tracking number.
Search academic papers, patents, journals, or scholars, then fetch a detail by ID.
Paginate legal case hits until I have 100 results.

Retry and Pagination

  • Automatic retry for 429 / 5xx / connection errors (bounded exponential backoff). Non-retryable errors such as 400 / 401 / 402 / 501 are never retried. Disable with DevnorsData(..., max_retries=0).
  • Pagination helper: paginate(...) walks pages using total_hits.
for hit in client.paginate("legal", "case", "借贷纠纷", page_size=20, max_items=100):
    print(hit.get("case_no"))

Billing and Errors

  • Successful calls return units (tokens charged) and request_id.
  • Insufficient balance raises DevnorsDataError(code="insufficient_balance", status=402).
  • Rate limit raises code="rate_limited" (429).
  • Each DevnorsDataError includes code / retryable / next_action / request_id.

Data Domains

GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →