GDX2py
Read and write GAMS Data eXchange (GDX) files using Python.
Requirements
- GAMS: version 47.0 or higher
- Python: 3.8 or higher
Installing GAMS
Get GAMS from https://www.gams.com/download/ and install it to your system. No license is needed for the use of GDX libraries.
Installation
Install with
pip install gdx2py
Usage
>>> from gdx2py import GdxFile, GAMSSet, GAMSScalar, GAMSParameter
>>> with GdxFile('/path/to/gdx/file.gdx', mode='w') as gdx:
>>> gdx['set1'] = ['a', 'b', 'c'] # Write a simple set
>>> set1 = gdx['set1'] # Read a symbol
>>> # Write a 2-dimensional set
>>> gdx['set2'] = [('a', 'foo'), ('b', 'bar'), ('c', 'baz')]
>>> # Write a scalar with explanatory text
>>> gdx['scalar'] = GAMSScalar(3.14, expl_text="Value of pi")
>>> # Write a parameter with domain
>>> gdx['par1'] = GAMSParameter({'a': 1, 'b': 2,
'c': 3, 'd': 4 },
domain=['set1'])
Comparison to similar packages
Compared to other packages like PyGDX, gdx-pandas, gdxtools and gdxpy, GDX2py relies
only on the Python standard library and the low-level GDX API gamsapi.core.gdx module which is part of the GAMS
Python API (gamsapi) available on PyPI.
|
|
This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 774629. |
Metadata
Release files for GDX2py 2.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gdx2py-2.2.0.tar.gz | 10.9 kB | Without provenance | Details for gdx2py-2.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| GDX2py-2.2.0-py3-none-any.whl | Python 3 | none | any | Details for GDX2py-2.2.0-py3-none-any.whl |
Total release size: 20.3 kB
Release files / gdx2py-2.2.0.tar.gz
| Download URL | gdx2py-2.2.0.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2397df573878d24cacfd4eb835b532bed4d7a6d70bbd35c5d9121660a379d0ab
|
|
BLAKE2b-256 checksum How to use checksums |
bf84b520b039b018adbab22b32d2f9ff11b0f9bceaa8c99357f886e6301597af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / GDX2py-2.2.0-py3-none-any.whl
| Download URL | GDX2py-2.2.0-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a36b5090312c9c242adbbb5edb0c82db88a6017ea06e8513e2f83c8e17bce8a3
|
|
BLAKE2b-256 checksum How to use checksums |
b0c74f4633141ad31701e097ea351b7041df31c81ed682251a69ba7294c9bafa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Security for GDX2py 2.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.