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 Distribution

amps_python_client-5.3.5.1.tar.gz (599.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

amps_python_client-5.3.5.1-cp34-abi3-win_amd64.whl (439.8 kB view details)

Uploaded CPython 3.4+Windows x86-64

amps_python_client-5.3.5.1-cp34-abi3-manylinux_2_24_aarch64.whl (16.7 MB view details)

Uploaded CPython 3.4+manylinux: glibc 2.24+ ARM64

amps_python_client-5.3.5.1-cp34-abi3-manylinux1_x86_64.whl (14.8 MB view details)

Uploaded CPython 3.4+

amps_python_client-5.3.5.1-cp34-abi3-macosx_14_0_x86_64.whl (869.1 kB view details)

Uploaded CPython 3.4+macOS 14.0+ x86-64

amps_python_client-5.3.5.1-cp34-abi3-macosx_14_0_arm64.whl (777.9 kB view details)

Uploaded CPython 3.4+macOS 14.0+ ARM64

File details

Details for the file amps_python_client-5.3.5.1.tar.gz.

File metadata

  • Download URL: amps_python_client-5.3.5.1.tar.gz
  • Upload date:
  • Size: 599.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for amps_python_client-5.3.5.1.tar.gz
Algorithm Hash digest
SHA256 9dbc59f0e795a41dc45e3afd03147001b5150805182a9206a3c1e9416596fb70
MD5 81fbe3379763e52b56fe570061669cc5
BLAKE2b-256 9c51a4e961e1c0464689344aeba95833ab6d070305721cf0ea234ec00d4b419e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amps_python_client-5.3.5.1-cp34-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 70a68b1f8caadba190312d2dfa0a5666d08a3ae594f9b4be45a7e89a42cb1c72
MD5 5bb2c45f071f1f94e14a48d3fa5646d8
BLAKE2b-256 431593bfc24cdca0db1867caebbf37f3b62574e288075fef981528567bee7185

See more details on using hashes here.

File details

Details for the file amps_python_client-5.3.5.1-cp34-abi3-manylinux_2_24_aarch64.whl.

File metadata

File hashes

Hashes for amps_python_client-5.3.5.1-cp34-abi3-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 c4b574bd686759bd63206f26afeda314bd4b876b390845b9a7bacfcf3f7f15a5
MD5 175c01a3b235326e01d3f911b4dcb3fd
BLAKE2b-256 80ddd600a2f864ce0fe27a7eebf557dfec206bc8b22f73714f40f57ed3087f5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amps_python_client-5.3.5.1-cp34-abi3-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d577f23297be2806bfb3803857a8228d2d86920a5c15da4bb1253de1d0c4ab17
MD5 7f23edfeda886399b121a83eef378cb7
BLAKE2b-256 2acbf39d18ac9e108a59430fede0b8d4105c63610614f41fd8bd6c2eeabf7c82

See more details on using hashes here.

File details

Details for the file amps_python_client-5.3.5.1-cp34-abi3-macosx_14_0_x86_64.whl.

File metadata

File hashes

Hashes for amps_python_client-5.3.5.1-cp34-abi3-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 57b1d3b3780817dbd4add29324b356c67d3a825797e8077666f1bb495438f7e6
MD5 9d7e0abd430ef3f0ebdf343c46ff3b5b
BLAKE2b-256 c2ba64ff694d6f1fd9cd435acbd1c75200d7076bd439c1e9af0d43fb70ed3df1

See more details on using hashes here.

File details

Details for the file amps_python_client-5.3.5.1-cp34-abi3-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for amps_python_client-5.3.5.1-cp34-abi3-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 3e83fafd78ee11353bf84264fb6241bc6ac216f8410a6b0bc795bfca22586d6c
MD5 eb6f33bb3ab5d0e64dc85a1bc595d39f
BLAKE2b-256 05cd543bcd46647fd4adfa2c212c03b51c71b905f52590444224739306151440

See more details on using hashes here.

Supported by

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