skillfed

amply

Amply allows you to load and manipulate AMPL/GLPK data as Python data structures

amply v0.1.7 786.3K downloads/30d#5,066 on PyPI20
Copyleft license Eclipse Public License 1.0 (EPL-1.0) Active released

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 amply

uv

uv add amply

poetry

poetry add amply

Installing 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

License :: OSI Approved :: Eclipse Public License 1.0 (EPL-1.0)

Tags

ampl data parserload ampl data pythonampl syntax parsergmpl data loaderoptimization problem dataampl set parameter parser
optimizationampl-parserdata-loading

More Mathematics packages