amply
Amply allows you to load and manipulate AMPL/GLPK data as Python data structures
What it is and what it does
Amply is a Python parser for AMPL (A Mathematical Programming Language) data syntax. It reads AMPL set and parameter declarations and data statements and converts them into Python objects—sets behave like lists, parameters like dictionaries. The package is designed specifically for loading data from AMPL-like syntax, not for parsing the full AMPL modeling language; it supports only a limited subset including set declarations, set data statements, parameter declarations, and parameter data statements.
You would use Amply when you have optimization problem data written in AMPL format and want to work with it in Python without installing AMPL itself. It handles multidimensional sets and parameters, slice notation, matrix notation, and default values. The library does not validate data—it focuses on parsing and structural conversion.
Use it for:
- Load optimization problem data from AMPL files into Python for use with solvers like PuLP or Pyomo.
- Parse AMPL data sections to extract sets and parameters for analysis or transformation.
- Convert AMPL-formatted data into nested dictionaries and lists for downstream processing.
- Prototype optimization models using AMPL syntax without requiring AMPL or GLPK installed.
- Read multidimensional parameter and set definitions with slice and matrix notation support.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Amply parses AMPL data syntax (sets and parameters) into Python data structures, letting you load optimization problem data without a full AMPL installation.
Yes, if you work with AMPL data files and want to load them into Python. Install friction is low, maintenance is active, and there are no known vulnerabilities. The copyleft license (EPL-1.0) requires disclosure of modifications and same-license redistribution, which is typical for open-source optimization tools and unlikely to be a blocker for most use cases.
Install
amply on PyPI
pip
pip install amplyuv
uv add amplypoetry
poetry add amplyInstalling amply
Before you install
Low friction—pure Python wheel with only docutils and pyparsing as runtime dependencies. Actively maintained as of 2026-08-12 with a recent release.
License in practice
Licensed under Eclipse Public License 1.0 (EPL-1.0), a copyleft license. You must disclose source code modifications and distribute under the same license if you redistribute the package.
Quickstart
from amply import Amply
data = Amply("set CITIES := Auckland Wellington Christchurch;")
print(data.CITIES)
# Output: <SetObject: ['Auckland', 'Wellington', 'Christchurch']>
Verify before relying
- Whether the package handles AMPL syntax beyond the documented subset (set/parameter declarations and data statements only).
- Performance characteristics when parsing large AMPL data files or deeply nested multidimensional structures.
Package facts
| License | Eclipse Public License 1.0 (EPL-1.0) (copyleft) |
| Python support | supports the current Python release (>=2.7,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — docutils, pyparsing |
| Maintenance | actively maintained — 51 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 786,294/month — #5,066 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: amply-0.1.7-py3-none-any.whl
Keywords: ampl, gmpl
Tags
More Mathematics packages
NetworkX provides data structures and…
permissive · top 1,000 on PyPI
kiwisolverkiwisolver is a Python binding to a fast C++…
permissive · top 1,000 on PyPI
sympySymPy is a Python library for symbolic…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
torchPyTorch provides GPU-accelerated tensor…
permissive · top 1,000 on PyPI
onnxruntimeonnxruntime loads and executes Open Neural…
permissive · top 1,000 on PyPI
amplpyamplpy is a Python interface to AMPL, an…
permissive · top 15,000 on PyPI
optlangOptlang formulates and solves linear,…
permissive · top 15,000 on PyPI
PuLPPuLP is a linear and mixed-integer programming…
permissive · top 5,000 on PyPI
mipPython MIP models and solves mixed-integer…
copyleft · top 15,000 on PyPI
mltableMLTable provides fast, flexible data loading…
unclear · top 15,000 on PyPI
stringzillaStringZilla provides SIMD and SWAR-accelerated…
permissive · top 5,000 on PyPI
ideniden manages machine learning datasets…
permissive · top 15,000 on PyPI
levalLeval evaluates limited expressions safely by…
permissive · top 15,000 on PyPI
paramParam provides declarative class attributes…
permissive · top 5,000 on PyPI
coolacoola compares complex nested data structures…
permissive · top 5,000 on PyPI