Practical overview
When it fits
Use it to study or experiment with an LSTM Python-completion pipeline, rather than to add a ready-made completion feature to an editor.
Who it is for
- Developers exploring token-based Python code completion.
- Researchers or learners comparing code-prediction approaches and evaluation workflows.
Documented uses
- Prepare Python source files for the model.
- Evaluate completion predictions with the included checkpoint.
- Train the model on prepared code.
- Explore changes to beam-search length or token-boundary behavior.
Requirements & limits
- The repository is MIT-licensed and written in Python.
- The model removes comments, strings and blank lines before training and prediction.
- Beam search is described as predicting about 10 characters ahead; increasing its length can produce longer suggestions.
- Suggestions may stop partway through identifiers or span operators; token-boundary completion is proposed, not shown as implemented.
- The README says the approach is too inefficient for editor integration.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare code and evaluate the included model
Set up the documented repository workflow and evaluate its saved checkpoint on prepared Python source.
Before you start
- Clone the repository.
- Install the requirements listed in requirements.txt.
- Place source data in ./data/source.
Steps
Run extract_code.py to collect Python files, encode them and merge them into all.py.
Run evaluate.py to evaluate the model using the included checkpoint.
Expected outcome
The documented workflow prepares Python source and evaluates predictions from the included model checkpoint.
Guide limitations
- The README does not specify the evaluation output format.
- The project describes its beam-search approach as too inefficient for editor integration.
Train the model from prepared source
Run the documented training stage after preparing Python source data.
Before you start
- Clone the repository.
- Install the requirements listed in requirements.txt.
- Place source data in ./data/source.
Steps
Run extract_code.py to collect Python files, encode them and merge them into all.py.
Run train.py to train the model.
Expected outcome
The repository's documented training script is run on the prepared source workflow.
Guide limitations
- The README does not specify training duration, resource needs or resulting model-output details.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 6 November 2026
- Original website title
- vpj/python_autocomplete · Official homepage title · retained in its source language

