Skip to main content

Python interface to LINGO API

Project description

# The Python Interface to LINGO.

This package requires Lingo and a valid license key. Please refer to the [Lingo user manual](https://lindo.com/downloads/PDF/LINGO.pdf) for installation instructions, and to learn more about the Lingo modeling language.

## Installation For LINGO 20

This python package can be installed with pip. It is assumed Lingo 20 is installed on host system.

For administrative users:

`bash > pip install lingo_api `

For standard (non-administrative) users:

`bash > pip install lingo_api --user `

## Installation For LINGO 19

This python package can be installed with pip. It is assumed Lingo 19 is installed on host system.

For administrative users:

`bash > pip install lingo_api==19.0.6 `

For standard (non-administrative) users:

`bash > pip install lingo_api==19.0.6 --user `

## Testing

A quick way to test the installation is to run `bash > python -m lingo_test `

It is also good to test the LINGO API on one of the included examples. ` > cd examples/CHESS > python chess.py `

## Possible errors due to misconfiguration

If the user does not have the correct LINGO environment variable set, they will not be able to load the lingo_api library instead they will receive an error message.

To fix the problem follow these steps

### Using Windows On the command line depending on the users LINGO installation:

LINGO 20 on windows 64-bit `dos > setx LINGO64_20_HOME "C:\path\to\LINGO64_20" ` LINGO 20 on windows 32-bit `dos > setx LINGO_20_HOME "C:\path\to\LINGO20" `

LINGO 19 on windows 64-bit `dos > setx LINGO64_19_HOME "C:\path\to\LINGO64_19" ` LINGO 19 on windows 32-bit `dos > setx LINGO_19_HOME "C:\path\to\LINGO19" `

### Using Linux On the command line depending on the users LINGO installation:

LINGO 20 For administrative users: ` $ export LINGO_20_HOME="/opt/lingo20" ` For standard (non-administrative) users: ` $ export LINGO_20_HOME="~/lingo20" `

LINGO 19 ` $ export LINGO_19_HOME="/opt/lingo19" ` For standard (non-administrative) users: ` $ export LINGO_19_HOME="~/lingo19" `

To have this variable set automatically, add the above line to the ~/.bashrc or ~/.bash_profile file.

## How to Build Wheel and Install (for package managers)

To build the python package on any operating system first start by creating a whl file. From the top of the lingoapi-python directory run the command.

`bash > python -m build `

If the command is successful a new directory named dist is created in the lingoapi-python directory. The new directory will have two files with extension .whl and .tar.gz. For example, if the LINGO API is built it on Windows using Python 3.10 the new directory will look like this.

`bash ├── dist │ ├── lingo_api-x.y.z-cp310-cp310-win_amd64.whl │ └── lingo-x.y.z.tar.gz `

The package can now be installed locally using the command. `bash > pip install dist/*.whl `

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lingo-api-20.0.9.tar.gz (12.8 kB view details)

Uploaded Source

Built Distributions

lingo_api-20.0.9-cp310-cp310-win_amd64.whl (19.9 kB view details)

Uploaded CPython 3.10 Windows x86-64

lingo_api-20.0.9-cp310-cp310-win32.whl (19.1 kB view details)

Uploaded CPython 3.10 Windows x86

lingo_api-20.0.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.4 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

lingo_api-20.0.9-cp39-cp39-win_amd64.whl (19.9 kB view details)

Uploaded CPython 3.9 Windows x86-64

lingo_api-20.0.9-cp39-cp39-win32.whl (19.1 kB view details)

Uploaded CPython 3.9 Windows x86

lingo_api-20.0.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.4 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

lingo_api-20.0.9-cp38-cp38-win_amd64.whl (19.9 kB view details)

Uploaded CPython 3.8 Windows x86-64

lingo_api-20.0.9-cp38-cp38-win32.whl (19.1 kB view details)

Uploaded CPython 3.8 Windows x86

lingo_api-20.0.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.4 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

lingo_api-20.0.9-cp37-cp37m-win_amd64.whl (19.8 kB view details)

Uploaded CPython 3.7m Windows x86-64

lingo_api-20.0.9-cp37-cp37m-win32.whl (19.1 kB view details)

Uploaded CPython 3.7m Windows x86

lingo_api-20.0.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.4 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

File details

Details for the file lingo-api-20.0.9.tar.gz.

File metadata

  • Download URL: lingo-api-20.0.9.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.9

File hashes

Hashes for lingo-api-20.0.9.tar.gz
Algorithm Hash digest
SHA256 268bb50857c838c9f57081417051021ab485858cb6b56c9b37d73eb83c083fcd
MD5 50e049e1a8f4ab3c1e49366b8dea93ce
BLAKE2b-256 58046d6f88d9c857b7b385a53b76d6642cd33e5074ca12a52e306dc7358cbcef

See more details on using hashes here.

File details

Details for the file lingo_api-20.0.9-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for lingo_api-20.0.9-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d020ec14f84ef873b30865af2a590d5e592cfd71dd3d4133b0096e30fc1548f6
MD5 d537ab86812673bd1afad0d1163e7d46
BLAKE2b-256 37a6c6515d9cd8bc23802ccb2f9f65b20a0ca043c7902bae5bc4bdf53ea4d237

See more details on using hashes here.

File details

Details for the file lingo_api-20.0.9-cp310-cp310-win32.whl.

File metadata

  • Download URL: lingo_api-20.0.9-cp310-cp310-win32.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.9

File hashes

Hashes for lingo_api-20.0.9-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 3893d297168b51fb69b533d7122e6dd4531617400ceb0176f069d77c3a90c568
MD5 cf0a3835ae6f7258d423c75a2d517bd3
BLAKE2b-256 0641ceed7862e26165268df7ff54b0cb112813eedcb6dc8a6e9a79809529f894

See more details on using hashes here.

File details

Details for the file lingo_api-20.0.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lingo_api-20.0.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 19ce3138b79fcfb8a6d97a49d89721d5a0621a479f1967a0cde932462d5eaad2
MD5 65a099816269da7cca5e4c5c5c0512e3
BLAKE2b-256 d9c26c63742d1aa9327698f92f6b3f9c25ea381a8dbae81fc66505ae2446242e

See more details on using hashes here.

File details

Details for the file lingo_api-20.0.9-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for lingo_api-20.0.9-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f2a7ee2fc9b8902f894d26aa1808df54627cefc9935b786eff4fead4104799db
MD5 ff910b0b31cc1e07f60f653b2e116f59
BLAKE2b-256 5d5089813b5e35f73bb9d46883dc136211edd700b969b99f5b5ba0e6a8c33f1f

See more details on using hashes here.

File details

Details for the file lingo_api-20.0.9-cp39-cp39-win32.whl.

File metadata

  • Download URL: lingo_api-20.0.9-cp39-cp39-win32.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.9

File hashes

Hashes for lingo_api-20.0.9-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 7818b8860f10d158ec2ed451b6953d0649daf4983274d6d235a6a2edf756a104
MD5 8b699a84af2a5317e1490550a177a40a
BLAKE2b-256 6016292d3b5e27791d9c8bde625b32338cc24e568cecc2d38db793dc0d38daf3

See more details on using hashes here.

File details

Details for the file lingo_api-20.0.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lingo_api-20.0.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1ec9f201e9998dfe3a7ca0a7e1bb542bb0fab8264752fa90f8f02ed762c8d56f
MD5 79708ebda4bfbae0ba2f6683531d9686
BLAKE2b-256 379b5cf9bdcc8c0aa53044e137155051d79f1f63ef23149d6b7573a4efd969c1

See more details on using hashes here.

File details

Details for the file lingo_api-20.0.9-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for lingo_api-20.0.9-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 75280cdcbe757152fdf02b543379b58719cef96e9d9c48c05a11df74d599ecc4
MD5 5653d353862ae09bda7653b700b26272
BLAKE2b-256 1ab8c73c4153029c9083d2cea02c17a9418d25ae4226642176776daf291afdb6

See more details on using hashes here.

File details

Details for the file lingo_api-20.0.9-cp38-cp38-win32.whl.

File metadata

  • Download URL: lingo_api-20.0.9-cp38-cp38-win32.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.9

File hashes

Hashes for lingo_api-20.0.9-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 c94ce30ace4dc89e8fc56c12d280e577ca7bc86ceb0f09ccbdfb86f85956a17f
MD5 2b1c1823f2284964a1fa78f5ac91eda0
BLAKE2b-256 caeec0d6cd038509099a11cde2e749444d76eb2c3cd0c5d44a5ce4a78d0ab861

See more details on using hashes here.

File details

Details for the file lingo_api-20.0.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lingo_api-20.0.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3927f932986dab0b089c0c0b2ae71c1c6e6fb654dacfda582ae2039ca4fea24a
MD5 db4b0aa4f89a6cf219bdc73771095582
BLAKE2b-256 c5bffc7ae14996cd424af20a0f2afc37c3727f28a53b0d11d1d7b9627535f3fc

See more details on using hashes here.

File details

Details for the file lingo_api-20.0.9-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for lingo_api-20.0.9-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 f7baab6f1f1b1f08e0085c337c95fca568582a444e652fc743cd1b4272e52dfa
MD5 da637f694b5a9cd7c866fc59b01caf83
BLAKE2b-256 a85ee12eaa15636081c4c6055783e780ad7347ac457e6738f3022a5143cda8bd

See more details on using hashes here.

File details

Details for the file lingo_api-20.0.9-cp37-cp37m-win32.whl.

File metadata

  • Download URL: lingo_api-20.0.9-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.9

File hashes

Hashes for lingo_api-20.0.9-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 fa5dddc823834aa76d0faa6034fc0bafc6e7c92f722fa26334808c9caa03c0f4
MD5 67aed8246c8a7851c3c5ddff5f286178
BLAKE2b-256 73fdbf039bfafd84a33d4108bcb609dd190bca1f664eeb684d992c1a86bbf45f

See more details on using hashes here.

File details

Details for the file lingo_api-20.0.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lingo_api-20.0.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 30cccf48f598d5efed90bcdf195ade1f5d9ca4cc8cb2db201d2e775a9473bf05
MD5 fb29d271ed2ea683e385a11ac611408e
BLAKE2b-256 2d85f244ad149e44be28bb83b195746f711b9142ec20bcb5a082d26ce2ce0987

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page