Revert: Change platform.claude.com back to console.anthropic.com

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Alex Notov
2025-09-17 10:15:06 -06:00
parent 92579ad489
commit d2fddb6b6a
8 changed files with 128 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
# Claude API Configuration
# Copy this file to .env and add your API key
# Get your API key at: https://platform.claude.com/settings/keys
# Get your API key at: https://console.anthropic.com/settings/keys
ANTHROPIC_API_KEY=sk-ant-api03-...

View File

@@ -5,5 +5,5 @@ GITHUB_TOKEN="your-github-personal-access-token-here"
# Claude API Key
# Required for using Claude SDK
# Get your key at: https://platform.claude.com/settings/keys
# Get your key at: https://console.anthropic.com/settings/keys
ANTHROPIC_API_KEY="sk-ant-api03-your-api-key-here"

View File

@@ -23,7 +23,7 @@ A tutorial series demonstrating how to build sophisticated general-purpose agent
```uv run python -m ipykernel install --user --name="cc-sdk-tutorial" --display-name "Python (cc-sdk-tutorial)" ```
#### 4. Claude API Key
1. Visit [platform.claude.com](https://platform.claude.com/dashboard)
1. Visit [console.anthropic.com](https://console.anthropic.com/dashboard)
2. Sign up or log in to your account
3. Click on "Get API keys"
4. Copy the key and paste it into your `.env` file as ```ANTHROPIC_API_KEY=```

View File

@@ -35,7 +35,7 @@ exclude_path = [
# Exclude API endpoints and local development URLs from link checking
exclude = [
"https://api.anthropic.com.*",
"https://platform.claude.com.*",
"https://console.anthropic.com.*",
"https://www.claude.ai/",
"http://localhost.*",
"http://127.0.0.1.*"

View File

@@ -45,7 +45,7 @@
"\n",
"### Prerequisites & Security\n",
"\n",
"- **Admin API Key**: Get from [Claude Console](https://platform.claude.com/settings/admin-keys) (format: `sk-ant-admin...`)\n",
"- **Admin API Key**: Get from [Claude Console](https://console.anthropic.com/settings/admin-keys) (format: `sk-ant-admin...`)\n",
"- **Security**: Store keys in environment variables, rotate regularly, never commit to version control"
]
},

121
revert_platform_urls.py Normal file
View File

@@ -0,0 +1,121 @@
#!/usr/bin/env python3
"""
Script to revert console.anthropic.com URLs back to console.anthropic.com
across the entire repository.
"""
import os
import re
from pathlib import Path
# Define the replacements
REPLACEMENTS = [
('https://console.anthropic.com', 'https://console.anthropic.com'),
('console.anthropic.com', 'console.anthropic.com'),
]
# File extensions to process
EXTENSIONS = {
'.py', '.md', '.json', '.ipynb', '.txt', '.yml', '.yaml',
'.toml', '.sh', '.js', '.ts', '.jsx', '.tsx', '.html', '.css',
'.env', '.example', '.rst', '.cfg', '.ini', '.conf'
}
# Directories to skip
SKIP_DIRS = {
'.git', '__pycache__', 'node_modules', '.venv', 'venv',
'env', '.tox', '.pytest_cache', 'dist', 'build', '.eggs'
}
def should_process_file(file_path):
"""Check if file should be processed."""
path_obj = Path(file_path)
# Check if any part of the path contains skip directories
parts = path_obj.parts
if any(skip_dir in parts for skip_dir in SKIP_DIRS):
return False
# Check extension
file_ext = path_obj.suffix.lower()
if file_ext in EXTENSIONS:
return True
# Also check files without extension or with .example suffix
if str(path_obj).endswith('.example'):
return True
# Check for extensionless files like .env
if file_ext == '' and path_obj.name.startswith('.'):
return True
return False
def process_file(file_path):
"""Process a single file and apply replacements."""
try:
with open(file_path, 'r', encoding='utf-8') as f:
content = f.read()
original_content = content
modified = False
# Apply each replacement
for old_text, new_text in REPLACEMENTS:
if old_text in content:
content = content.replace(old_text, new_text)
modified = True
# Write back if modified
if modified:
with open(file_path, 'w', encoding='utf-8') as f:
f.write(content)
return True
return False
except Exception as e:
print(f"Error processing {file_path}: {e}")
return False
def main():
"""Main function to process all files in the repository."""
repo_root = Path(__file__).parent
modified_files = []
print(f"Scanning repository at: {repo_root}")
print(f"Looking for files with console.anthropic.com URLs...\n")
# Walk through all files
for root, dirs, files in os.walk(repo_root):
# Remove skip directories from dirs to prevent walking into them
dirs[:] = [d for d in dirs if d not in SKIP_DIRS]
for file in files:
file_path = Path(root) / file
if should_process_file(file_path):
if process_file(file_path):
rel_path = file_path.relative_to(repo_root)
modified_files.append(str(rel_path))
print(f"✓ Modified: {rel_path}")
# Summary
print(f"\n{'='*60}")
print(f"Summary:")
print(f"{'='*60}")
print(f"Total files modified: {len(modified_files)}")
if modified_files:
print(f"\nModified files:")
for file in sorted(modified_files):
print(f" - {file}")
print(f"\nReplacements made:")
for old, new in REPLACEMENTS:
print(f" - '{old}''{new}'")
else:
print("No files were modified.")
if __name__ == "__main__":
main()

View File

@@ -469,7 +469,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The next step in this section is to import the anthropic library and load the client to access the anthropics methods for handling messages and accessing Claude models. Ensure you obtain an Claude API key located within the settings page on the [official Anthropic website](https://platform.claude.com/settings/keys).\n"
"The next step in this section is to import the anthropic library and load the client to access the anthropics methods for handling messages and accessing Claude models. Ensure you obtain an Claude API key located within the settings page on the [official Anthropic website](https://console.anthropic.com/settings/keys).\n"
]
},
{

View File

@@ -684,7 +684,7 @@
"source": [
"We can see the XML format being used throughout the prompt when explaining to the LLM how it should use tools.\n",
"\n",
"Next we initialize our connection to Anthropic, for this we need an [Claude API key](https://platform.claude.com/)."
"Next we initialize our connection to Anthropic, for this we need an [Claude API key](https://console.anthropic.com/)."
]
},
{