Skip to main content

ClaudePy: high-compatibility Python rewrite of Claude Code

Project description

ClaudePy

Claude Code rewrite by Python.

Quick Start

Install

pip install -e .

Environment Variables

Provider

OpenAI Resonse
CLAUDE_CODE_PROVIDER=openai
OPENAI_API_STYLE=responses
OPENAI_BASE_URL=http://api.hack3rx.cn
OPENAI_API_KEY=sk-xxxxxxxx
OPENAI_REASONING_EFFORT=xhigh
OpenAI ChatCompletions
CLAUDE_CODE_PROVIDER=openai
OPENAI_API_STYLE=chat_completions
OPENAI_BASE_URL=http://api.hack3rx.cn
OPENAI_API_KEY=sk-xxxxxxxx
OPENAI_REASONING_EFFORT=xhigh
Anthropic
ANTHROPIC_BASE_URL=http://api.hack3rx.cn
ANTHROPIC_AUTH_TOKEN=sk-xxxxxxxx
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1

Tool-call limits

CLAUDE_CODE_MAX_TURNS=64
CLAUDE_CODE_AGENT_MAX_TURNS=32

Token limits

CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000
CLAUDE_CODE_MAX_CONTEXT_TOKENS=1000000
CLAUDE_CODE_AUTO_COMPACT_ENABLED=1
CLAUDE_CODE_AUTO_COMPACT_WINDOW=900000

Setting

~\settings.json

{
  "model": "gpt-4.5",
  "permissions": {
    "defaultMode": "acceptEdits"
  },
  "enabledPlugins": []
}

Run

claude

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

claudepy-0.1.2.tar.gz (127.0 kB view details)

Uploaded Source

Built Distribution

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

claudepy-0.1.2-py3-none-any.whl (156.9 kB view details)

Uploaded Python 3

File details

Details for the file claudepy-0.1.2.tar.gz.

File metadata

  • Download URL: claudepy-0.1.2.tar.gz
  • Upload date:
  • Size: 127.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for claudepy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9b12bb2d389c11fba46501171da0617ef9234bb74170a18991654d71a04e968c
MD5 63f1e169db7501cd6738d55eaf9c927a
BLAKE2b-256 7448025e667ea8470aae0ef7af1861b974e7efde3174f117ff18fa905cdb8b38

See more details on using hashes here.

File details

Details for the file claudepy-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: claudepy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 156.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for claudepy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e773371a1260174108aa1bde789c0527acec2122205e7afa5d5f9eac5cceb937
MD5 638cd12d31182975a4ff83e46e9b3016
BLAKE2b-256 f1342b8d3d2b38037aa1affccf6290a9aa915c082c29d25be704f1141ebae25d

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