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.4.5.tar.gz (1.8 MB 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.4.5-cp34-abi3-win_amd64.whl (617.6 kB view details)

Uploaded CPython 3.4+Windows x86-64

amps_python_client-5.3.4.5-cp34-abi3-manylinux_2_24_aarch64.whl (16.6 MB view details)

Uploaded CPython 3.4+manylinux: glibc 2.24+ ARM64

amps_python_client-5.3.4.5-cp34-abi3-manylinux1_x86_64.whl (14.6 MB view details)

Uploaded CPython 3.4+

amps_python_client-5.3.4.5-cp34-abi3-macosx_10_9_universal2.whl (1.6 MB view details)

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

amps_python_client-5.3.4.5-cp27-cp27mu-manylinux1_x86_64.whl (14.6 MB view details)

Uploaded CPython 2.7mu

amps_python_client-5.3.4.5-cp27-cp27m-win_amd64.whl (732.0 kB view details)

Uploaded CPython 2.7mWindows x86-64

File details

Details for the file amps-python-client-5.3.4.5.tar.gz.

File metadata

  • Download URL: amps-python-client-5.3.4.5.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for amps-python-client-5.3.4.5.tar.gz
Algorithm Hash digest
SHA256 c6e2c3dd4718f78d52ba20beb6698cdf0bdce48ba93c1b87eed962d9d4764822
MD5 dd69684073248b2bd0b127adb4a41de6
BLAKE2b-256 13b92f3b261262477ff710cff3f4e1082b386e2f310257c525c1a5696be0633a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amps_python_client-5.3.4.5-cp34-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 61d222d7955ce538ab636f06872ebf52d4ef82e5108be17984c00ad30d31b3a3
MD5 cfcb0d7ef48f67cac9e3d4aa57e5685d
BLAKE2b-256 cc38f49b5f38fedf1200f7033e52d7eee2b0d78c7aa7c02ea40602f4c53d165f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amps_python_client-5.3.4.5-cp34-abi3-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 c009ddce4ffc28caf35e52a9cac39d20158bf2c61af18446fde844ac31e7790e
MD5 ada3bf11addf3fd2612bc4120075034a
BLAKE2b-256 f8ca9c15bb9f95fc367fdb0ca7faa596b6517e397d2ae69d9c945479ba6f40cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amps_python_client-5.3.4.5-cp34-abi3-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 aa43840c1531519c74c6d3ab1e272f1e3165996096211c86d9465ca068bd9405
MD5 95dcef2a4975073ede7663046229569e
BLAKE2b-256 019cf381c5711a61a7f7f93f642fe132cd34346345e4a5430f6af21b514c11b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amps_python_client-5.3.4.5-cp34-abi3-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 507cbc8e3e7b982e9018dbbcb296f0ca5d7d4808fd5ecd9344f5c248d6d1000a
MD5 e38e3950e5232afe0155f5c88a43765a
BLAKE2b-256 8069e96bcfb1556bb70d9d49bb7d14e5713188035b0afe3aa265bffdec947868

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amps_python_client-5.3.4.5-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d3abd35cb07635a846bd530bd6229ca061d29534affedef82914160a0a2ce68a
MD5 c7d26e3b1d5fb8a4bc2b3fbbd363af27
BLAKE2b-256 eb80d423ca0214fd0989e4e556608f2971cbd750c242a2baca43a1396ca7365b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amps_python_client-5.3.4.5-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 7eb7ef1ee52f38272bfaab2ae08c7198ba5b4a54336e31a8ca7367330853e4c5
MD5 2e6bc9a51267c20bd5c4ce6ef50d2779
BLAKE2b-256 4cf99c82ef27c296011dabdf636f155375f198a435a32948710d0313193c7334

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