
<p align="center">
<a href="https://github.com/codeflash-ai/codeflash">
<img src="https://img.shields.io/github/commit-activity/m/codeflash-ai/codeflash" alt="GitHub commit activity">
</a>
<a href="https://pypi.org/project/codeflash/">
<img src="https://img.shields.io/pypi/dm/codeflash" alt="PyPI Downloads">
</a>
<a href="https://pypi.org/project/codeflash/">
<img src="https://img.shields.io/pypi/v/codeflash?label=PyPI%20version" alt="PyPI Downloads">
</a>
</p>
[Codeflash](https://www.codeflash.ai) is a general purpose optimizer for Python that helps you improve the performance of your Python code while maintaining its correctness.
It uses advanced LLMs to generate multiple optimization ideas for your code, tests them to be correct and benchmarks them for performance. It then creates merge-ready pull requests containing the best optimization found, which you can review and merge.
How to use Codeflash -
- Optimize an entire existing codebase by running `codeflash --all`
- Automate optimizing all __future__ code you will write by installing Codeflash as a GitHub action.
- Optimize a Python workflow `python myscript.py` end-to-end by running `codeflash optimize myscript.py`
Codeflash is used by top engineering teams at [Pydantic](https://github.com/pydantic/pydantic/pulls?q=is%3Apr+author%3Amisrasaurabh1+is%3Amerged), [Langflow](https://github.com/langflow-ai/langflow/issues?q=state%3Aclosed%20is%3Apr%20author%3Amisrasaurabh1), [Roboflow](https://github.com/roboflow/inference/pulls?q=is%3Apr+is%3Amerged+codeflash+sort%3Acreated-asc), [Albumentations](https://github.com/albumentations-team/albumentations/issues?q=state%3Amerged%20is%3Apr%20author%3Akrrt7%20OR%20state%3Amerged%20is%3Apr%20author%3Aaseembits93%20) and many others to ship performant, expert level code.
Codeflash is great at optimizing AI Agents, Computer Vision algorithms, PyTorch code, numerical code, backend code or anything else you might write with Python.
## Installation
To install Codeflash, run:
```
pip install codeflash
```
Add codeflash as a development time dependency if you are using package managers like uv or poetry.
## Quick Start
1. To configure Codeflash for a project, at the root directory of your project where the pyproject.toml file is located, run:
```
codeflash init
```
- It will ask you a few questions about your project like the location of your code and tests
- Ask you to generate an [API Key](https://app.codeflash.ai/app/apikeys) to access Codeflash's LLMs
- Install a [GitHub app](https://github.com/apps/codeflash-ai/installations/select_target) to open Pull Requests on GitHub.
- Ask if you want to setup a GitHub actions which will optimize all your future code.
- The codeflash config is then saved in the pyproject.toml file.
2. Optimize your entire codebase:
```
codeflash --all
```
This can take a while to run for a large codebase, but it will keep opening PRs as it finds optimizations.
3. Optimize a script:
```
codeflash optimize myscript.py
```
## Documentation
For detailed installation and usage instructions, visit our documentation at [docs.codeflash.ai](https://docs.codeflash.ai)
## Demo
- Optimizing the performance of new code for a Pull Request through GitHub Actions. This lets you ship code quickly while ensuring it remains performant.
https://github.com/user-attachments/assets/38f44f4e-be1c-4f84-8db9-63d5ee3e61e5
## Support
Join our community for support and discussions. If you have any questions, feel free to reach out to us using one of the following methods:
- [Free live Installation Support](https://calendly.com/codeflash-saurabh/codeflash-setup)
- [Join our Discord](https://www.codeflash.ai/discord)
- [Follow us on Twitter](https://x.com/codeflashAI)
- [Follow us on Linkedin](https://www.linkedin.com/in/saurabh-misra/)
## License
Codeflash is licensed under the BSL-1.1 License. See the LICENSE file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "codeflash-ali-dev",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "LLM, ai, code, codeflash, machine learning, optimization, performance",
"author": null,
"author_email": "\"CodeFlash Inc.\" <contact@codeflash.ai>",
"download_url": "https://files.pythonhosted.org/packages/a5/fc/40384c68876505e7cd09d0372b0ee472a518f69c1dfa21fd7b86d8ac3e78/codeflash_ali_dev-0.10.11.tar.gz",
"platform": null,
"description": "\n<p align=\"center\">\n <a href=\"https://github.com/codeflash-ai/codeflash\">\n <img src=\"https://img.shields.io/github/commit-activity/m/codeflash-ai/codeflash\" alt=\"GitHub commit activity\">\n </a>\n <a href=\"https://pypi.org/project/codeflash/\">\n <img src=\"https://img.shields.io/pypi/dm/codeflash\" alt=\"PyPI Downloads\">\n </a>\n <a href=\"https://pypi.org/project/codeflash/\">\n <img src=\"https://img.shields.io/pypi/v/codeflash?label=PyPI%20version\" alt=\"PyPI Downloads\">\n </a>\n</p>\n\n[Codeflash](https://www.codeflash.ai) is a general purpose optimizer for Python that helps you improve the performance of your Python code while maintaining its correctness.\nIt uses advanced LLMs to generate multiple optimization ideas for your code, tests them to be correct and benchmarks them for performance. It then creates merge-ready pull requests containing the best optimization found, which you can review and merge.\n\nHow to use Codeflash -\n- Optimize an entire existing codebase by running `codeflash --all`\n- Automate optimizing all __future__ code you will write by installing Codeflash as a GitHub action.\n- Optimize a Python workflow `python myscript.py` end-to-end by running `codeflash optimize myscript.py`\n\nCodeflash is used by top engineering teams at [Pydantic](https://github.com/pydantic/pydantic/pulls?q=is%3Apr+author%3Amisrasaurabh1+is%3Amerged), [Langflow](https://github.com/langflow-ai/langflow/issues?q=state%3Aclosed%20is%3Apr%20author%3Amisrasaurabh1), [Roboflow](https://github.com/roboflow/inference/pulls?q=is%3Apr+is%3Amerged+codeflash+sort%3Acreated-asc), [Albumentations](https://github.com/albumentations-team/albumentations/issues?q=state%3Amerged%20is%3Apr%20author%3Akrrt7%20OR%20state%3Amerged%20is%3Apr%20author%3Aaseembits93%20) and many others to ship performant, expert level code.\n\nCodeflash is great at optimizing AI Agents, Computer Vision algorithms, PyTorch code, numerical code, backend code or anything else you might write with Python.\n\n\n## Installation\n\nTo install Codeflash, run:\n\n```\npip install codeflash\n```\nAdd codeflash as a development time dependency if you are using package managers like uv or poetry.\n## Quick Start\n\n\n1. To configure Codeflash for a project, at the root directory of your project where the pyproject.toml file is located, run:\n ```\n codeflash init\n ```\n - It will ask you a few questions about your project like the location of your code and tests\n - Ask you to generate an [API Key](https://app.codeflash.ai/app/apikeys) to access Codeflash's LLMs\n - Install a [GitHub app](https://github.com/apps/codeflash-ai/installations/select_target) to open Pull Requests on GitHub.\n - Ask if you want to setup a GitHub actions which will optimize all your future code.\n - The codeflash config is then saved in the pyproject.toml file.\n \n2. Optimize your entire codebase:\n ```\n codeflash --all\n ```\n This can take a while to run for a large codebase, but it will keep opening PRs as it finds optimizations.\n3. Optimize a script:\n ```\n codeflash optimize myscript.py\n ```\n\n## Documentation\nFor detailed installation and usage instructions, visit our documentation at [docs.codeflash.ai](https://docs.codeflash.ai)\n\n## Demo\n\n\n- Optimizing the performance of new code for a Pull Request through GitHub Actions. This lets you ship code quickly while ensuring it remains performant.\n\nhttps://github.com/user-attachments/assets/38f44f4e-be1c-4f84-8db9-63d5ee3e61e5\n\n## Support\n\nJoin our community for support and discussions. If you have any questions, feel free to reach out to us using one of the following methods:\n\n- [Free live Installation Support](https://calendly.com/codeflash-saurabh/codeflash-setup)\n- [Join our Discord](https://www.codeflash.ai/discord)\n- [Follow us on Twitter](https://x.com/codeflashAI)\n- [Follow us on Linkedin](https://www.linkedin.com/in/saurabh-misra/)\n\n## License\n\nCodeflash is licensed under the BSL-1.1 License. See the LICENSE file for details.\n",
"bugtrack_url": null,
"license": "BSL-1.1",
"summary": "Client for codeflash.ai - automatic code performance optimization, powered by AI",
"version": "0.10.11",
"project_urls": {
"Homepage": "https://codeflash.ai"
},
"split_keywords": [
"llm",
" ai",
" code",
" codeflash",
" machine learning",
" optimization",
" performance"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "a8c3c4cbad770a40a764bfb4939e294ba88609613325d2046b453e477f5d844b",
"md5": "18c34a19eb86ac3c7359eaf4700105d3",
"sha256": "024c5e5e0593fc1fb7ff3479d61d48e3395dd9295bd11bb056a67d7f07fade2c"
},
"downloads": -1,
"filename": "codeflash_ali_dev-0.10.11-py3-none-any.whl",
"has_sig": false,
"md5_digest": "18c34a19eb86ac3c7359eaf4700105d3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 216020,
"upload_time": "2025-07-12T15:22:17",
"upload_time_iso_8601": "2025-07-12T15:22:17.296763Z",
"url": "https://files.pythonhosted.org/packages/a8/c3/c4cbad770a40a764bfb4939e294ba88609613325d2046b453e477f5d844b/codeflash_ali_dev-0.10.11-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "a5fc40384c68876505e7cd09d0372b0ee472a518f69c1dfa21fd7b86d8ac3e78",
"md5": "ec634a7548cf00a4764fd03d3c50a47a",
"sha256": "893ad6cdbafbda08a6fae96d640947694083fdb729d3b645cca6f412cbca3b4a"
},
"downloads": -1,
"filename": "codeflash_ali_dev-0.10.11.tar.gz",
"has_sig": false,
"md5_digest": "ec634a7548cf00a4764fd03d3c50a47a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 180071,
"upload_time": "2025-07-12T15:22:19",
"upload_time_iso_8601": "2025-07-12T15:22:19.768334Z",
"url": "https://files.pythonhosted.org/packages/a5/fc/40384c68876505e7cd09d0372b0ee472a518f69c1dfa21fd7b86d8ac3e78/codeflash_ali_dev-0.10.11.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-12 15:22:19",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "codeflash-ali-dev"
}