Catalog PyPI
Back to packageRELEASE DETAILS

0.2.2

PyPI

aimigrate

AI tool for migrating code

Published1 Mar 2025
Direct dependencies3
Transitive dependenciesNot calculated

README

Version 0.2.2 documentation

AIMigrate

AIMigrate helps migrate code to maintain compatability when one of your dependency packackages changes

Installation

pip install aimigrate

Configure LLM Provider

AIMigrate is compatabile with openai, gemini, and anthropic models. To use these tools you will need an API key.

Once you have these keys, we recommend using python-dotenv for managing your keys. Store them as environment variables GEMINI_API_KEY, OPENAI_API_KEY, or ANTHROPIC_API_KEY respective.

Running open weight (i.e., local) models: You can also use ollama to run models locally. To start open a terminal run ollama serve. If it is your first time running the model you'll need to pull it first (e.g., ollama run llama3). You will likely need to increase the context window.

DO NOT UNDER ANY CIRCUMSTANCE SHARE OR UPLOAD TO GITHUB YOUR API KEY!

Usage

Let's say we have a project Zombiesim that we want to migrate from Starsim v1 (v1.0.3) to v2 (v2.2.0). Typical usage is to migrate all the files in a folder to a new folder:

import starsim as ss
import aimigrate as aim

aim.migrate(
    starsim = ss, # can also be the path to the folder, which must be the cloned repo (not from pypi)
    from_version = 'v1.0.3', # can be any valid git tag or hash
    to_version = 'v2.2.0', # can be any valid git tag or hash
    model = 'openai:gpt-4o', # use aisuite provider:model syntax
    source = '/path/to/your/code/folder', # folder with the code to migrate
    dest = '/path/to/migrated/folder', # folder to output migrated code into
)

Tests

uv run --group dev pytest -v test_*.py

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 3

Native requirements
3 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
aisuite
Environment
{
  "extras": "anthropic,google,ollama,openai",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
aisuite[anthropic,google,ollama,openai]>=0.1.3runtime
sciris
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
sciris>=3.2.0runtime
tiktoken
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
tiktoken>=0.8.0runtime

Distribution files

2 collected
aimigrate-0.2.2-py3-none-any.whl

bdist_wheel · 17.81 KB · Python py3

Source file
aimigrate-0.2.2.tar.gz

sdist · 12.78 KB · Python source

Source file

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 11:19 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:544f53613ac0d85e1796e7c00bb5be93606b8cefbc6d14237cf8dc2bf67681db

Other collected versions

View all collected versions →