Claude-Powered Python Performance Optimizer
Project description
Achilles: LLM-powered Python performance optimizer
How to use Achilles
Install Achilles using the following command:
uv add achilles-optimizer
Once Achilles is installed, you can optimize a python executable using the following command:
uv run achilles optimize your_python_file.py --your_python_args
If you've already ran Achilles once, you can benchmark it against the non-optimized python code with the following command:
uv run achilles benchmark your_python_file.py --your_python_args
To run a python executable using achillles, just type the following command:
uv run achilles run your_python_file.py --your_python_args
Additional Information
Requirements
- Python 3.13 or later
- uv package manager
- An Anthropic API key (Claude)
Environment Setup
You can set up your Anthropic API key in one of two ways:
- Set the
ANTHROPIC_API_KEYenvironment variable - Create a
.envfile in your project directory with the following content:ANTHROPIC_API_KEY=your_api_key_here
How It Works
Achilles uses Claude to analyze your Python code and optimize its performance by:
- Identifying bottlenecks through profiling
- Implementing optimizations automatically in C++
- Importing these optimizations at runtime
Command Reference
| Command | Description |
|---|---|
uv run achilles optimize <file.py> |
Analyzes and optimizes your Python file |
uv run achilles benchmark <file.py> |
Compares optimized vs. original performance |
uv run achilles run <file.py> |
Runs your Python file with Achilles |
Contributing
Contributions are welcome! Feel free to submit issues or pull requests on GitHub.
License
This project is open source. See the repository for license details.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file achilles_optimizer-0.1.3.tar.gz.
File metadata
- Download URL: achilles_optimizer-0.1.3.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20ed680ea465bd28660ea5a20595cc87230cf4fe91b7d999b316e71f521265d0
|
|
| MD5 |
acc39886d5b04b33b0fcf2cef1e7cccf
|
|
| BLAKE2b-256 |
dca4e05238fbd140dfdefd382418739f606c8c2484747d8f924a65995f945d8c
|
File details
Details for the file achilles_optimizer-0.1.3-py3-none-any.whl.
File metadata
- Download URL: achilles_optimizer-0.1.3-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a524ba8ff26861a5f2f6b76400c77e99aeffbdd76029c2e583b1bf49992dd1f7
|
|
| MD5 |
25c6acdb04386a0dfe353b6cdc63cf97
|
|
| BLAKE2b-256 |
3a030edad5dec4f6e3bf77a74ff0c0fd63651e5be61282465e0f1d7107ee9766
|