Skip to main content

AMPS Python Client

Project description

AMPS Python Client

Introduction

The AMPS Python Client is a Python extension module that makes it easy to connect to AMPS. This client builds upon the AMPS C++ Client and Python/C api to bring high performance AMPS connectivity to Python code.

Prerequisites

To use the AMPS Python Client, you must have the following software installed and configured on your system:

  • Python 2.7 or Python 3.5 and above.
  • Python distutils. Most python installations build and include this package by default, but you may run into issues building this extension module if distutils is not functioning properly on your system. Python distutils may be packaged in a standalone package named 'python-distutils', or included in 'python-devel.x86_64'. You can also run the setup script available here.
  • C++ compiler. gcc 4.4 or greater on Linux, or a verion of Visual Studio with Mainstream Support from Microsoft (please refer to Microsoft product lifecycle policies) on Windows. Note that this must be the same compiler used to build your python distribution, else python distutils may be unable to invoke your compiler.

Fedora prerequisites:

  1. dnf install redhat-rpm-config
  2. dnf install python-devel # for use with Python2
  3. dnf install python3-devel # for use with Python3
  4. dnf install gcc-c++

Building From a Git Clone

If you obtained this client by a git clone of the 60East amps-client-python repository, you also need to fetch the correct version of the AMPS C++ client submodule. To do this, issue a git submodule command to initialize and update the src/cpp submodule. One easy way to do this is by issuing the command:

git submodule update --init

which will initialize and update the submodule in one step. Note that working with submodules in git requires extra care. Visit this chapter to learn more about git submodules.

Build

This client is distributed as source code and must be compiled before it is used. The build process emits a shared library (or DLL on Windows) that can be imported into your python application.

To build on Linux:

  1. Run python setup.py build from the AMPS Python Client directory to build the client.

    This script uses Python distutils to build the client library. Python distutils provides many additional options for installing the built library into your Python distribution, or otherwise controlling the output of the build process. Run python setup.py --help to view command help.

  2. Check under the build directory for AMPS.so -- this is the Python extension module. Ensure this library's directory is in your PYTHONPATH.

  3. To test, run python -c "import AMPS". If any errors occur importing the AMPS module, validate that the module built properly, and that the containing directory is in your PYTHONPATH.

To build on Windows:

  1. Use a Visual Studio Command Prompt to create a command prompt where the necessary Visual Studio environment variables are set for command line builds.

  2. Add the Python directory (the location of the python.exe interpreter) to your path. Note: The platform of your python installation must match the target platform for this python module. If you want to build a 64-bit module, you must set your PATH to a 64-bit Python installation; for a 32-bit module, you must set it to a 32-bit installation. If you'd like to build both, you must do so separately, once with each Python installation.

  3. Run python setup.py build fom the AMPS Python Client directory to build the client module. Use the -p win32 option to build a 32-bit client module.

  4. Check under the build directory for AMPS.pyd -- this is the Python extension module. Ensure this library's directory is in your PYTHONPATH.

  5. To test, run python -c "import AMPS". If any errors occur importing the AMPS module, validate that the module built properly, and that the containing directory is in your PYTHONPATH.

Installing the Python Binary Wheel

60East also provides Linux-x86-64 and Windows 64-bit binary wheels built with Python 2.7 and for Python 3.x. These wheel files are provided on the 60East website.

If your system is not Linux-x86-64, or you are not using Python 2.6, you can generate your own egg by running 'python setup.py bdist_wheel'.

Installing:

  1. Download the wheel file from the 60East client release page.

  2. run 'python -m pip install *.whl'.

Troubleshooting Build Problems

Symptom: Python.h not found

Resolution: Update or install python distutils. See the entry on python distutils in the prequisites section for information on installing this package.

For More Information

The developer's guide and generated reference documentation for this client are available under the doc/ directory.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

amps_python_client-5.3.4.0-cp34-abi3-win_amd64.whl (684.8 kB view details)

Uploaded CPython 3.4+ Windows x86-64

amps_python_client-5.3.4.0-cp34-abi3-win32.whl (427.0 kB view details)

Uploaded CPython 3.4+ Windows x86

amps_python_client-5.3.4.0-cp34-abi3-macosx_10_9_universal2.whl (1.5 MB view details)

Uploaded CPython 3.4+ macOS 10.9+ universal2 (ARM64, x86-64)

amps_python_client-5.3.4.0-cp27-cp27m-win_amd64.whl (682.8 kB view details)

Uploaded CPython 2.7m Windows x86-64

amps_python_client-5.3.4.0-cp27-cp27m-win32.whl (465.5 kB view details)

Uploaded CPython 2.7m Windows x86

File details

Details for the file amps_python_client-5.3.4.0-cp34-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for amps_python_client-5.3.4.0-cp34-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 6f9760fdcad65630a4addae2fa99793632ec9a83d1472c349c80b2582c40e52c
MD5 f3b245cb1943dd1aec8ae6556f302ec9
BLAKE2b-256 21fd099920eabcfd7b4752313ed1ebd665f9fb08a85238879682fb277f163291

See more details on using hashes here.

File details

Details for the file amps_python_client-5.3.4.0-cp34-abi3-win32.whl.

File metadata

File hashes

Hashes for amps_python_client-5.3.4.0-cp34-abi3-win32.whl
Algorithm Hash digest
SHA256 aa77b1663e30b5edd1ddbb12c8f94123dfec51ecfce8e1580ce486f1ef0c87c1
MD5 abe4253e61530fadf5777757c597f0c7
BLAKE2b-256 8de4320431b055d31f14700711786b729fed1095de7fd246c4c13fa58b1e449d

See more details on using hashes here.

File details

Details for the file amps_python_client-5.3.4.0-cp34-abi3-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for amps_python_client-5.3.4.0-cp34-abi3-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e322add7d926d75268a72131ab4ad5f101c23a7da011af19963dbe2ba8975eb5
MD5 5611993efc1d47d0e6015a99e3986b5a
BLAKE2b-256 1ac8be7f30cd9647f104e5226c4b6ab779af23a5eb311e16b4d2c0757c195a05

See more details on using hashes here.

File details

Details for the file amps_python_client-5.3.4.0-cp34-abi3-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for amps_python_client-5.3.4.0-cp34-abi3-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 68a6d3213488b0029b5ed073206b95e2c9980a97495295b451c173ffe75c851f
MD5 f3c652bcac04ee3524ace7e1ba7c9c3e
BLAKE2b-256 01450b66f6aa7d4322dec515520bb3c8661b2787d540d6fd5e6e94f75c92e5c6

See more details on using hashes here.

File details

Details for the file amps_python_client-5.3.4.0-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for amps_python_client-5.3.4.0-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 237598d6c24ba6d3559ffe1919e1b734d34ae27ed5a70f847d428fbaf5a75f23
MD5 f24a637333858849596fba0c82599bbe
BLAKE2b-256 33a2cb2f13bf3e38b0cf1d1b47d9747b24acfe7a87e52db18de6a6d2b8035ca3

See more details on using hashes here.

File details

Details for the file amps_python_client-5.3.4.0-cp27-cp27m-win_amd64.whl.

File metadata

File hashes

Hashes for amps_python_client-5.3.4.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 f61b5586fbdf293c2e8c0b20fc8b778133f6afeaec19755f27ad3f51e7a2812a
MD5 0c1ce23e07a119a0cf59ef24607ab9db
BLAKE2b-256 a9903ad42c11e7a84b6488f71a9419adbbf6a2632416d494a1b71dc4b9216fc8

See more details on using hashes here.

File details

Details for the file amps_python_client-5.3.4.0-cp27-cp27m-win32.whl.

File metadata

File hashes

Hashes for amps_python_client-5.3.4.0-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 2f9804833ab053c89ce9377a1f738c442a9abb0f1c55b586e3ff162cdcdc539e
MD5 47598c55adba22ebf774fecfa1ad6e6c
BLAKE2b-256 4fc8d57a77bb5d9ea4310554e6709c2a636c1b941b0b349fe10f706a79043cc7

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