Skip to main content

GridGain binary client Python API

Project description

pygridgain

GridGain Community Edition thin (binary protocol) client, written in Python 3.

Prerequisites

  • Python 3.7 or above (3.7, 3.8, 3.9 and 3.10 are tested),
  • Access to GridGain node, local or remote. The current thin client version was tested on GridGain CE 8.7 and 8.8 (binary client protocol 1.7.1).

Installation

From repository

This is a recommended way for users. If you only want to use the pygridgain module in your project, do:

$ pip install pygridgain

From sources

This way is more suitable for developers or if you install client from zip archive.

  1. Download and/or unzip GridGain Python client sources to gridgain_client_path
  2. Go to gridgain_client_path folder
  3. Execute pip install -e .
$ cd <gridgain_client_path>
$ pip install -e .

This will install the repository version of pygridgain into your environment in so-called “develop” or “editable” mode. You may read more about editable installs in the pip manual.

Then run through the contents of requirements folder to install the additional requirements into your working Python environment using

$ pip install -r requirements/<your task>.txt

You may also want to consult the setuptools manual about using setup.py.

optional C extension

There is an optional C extension to speedup some computational intensive tasks. If it's compilation fails (missing compiler or CPython headers), pygridgain will be installed without this module.

  • On Linux or MacOS X only C compiler is required (gcc or clang). It compiles during standard setup process.

  • For building universal wheels (binary packages) for Linux, just invoke script ./scripts/create_distr.sh.

    NB! Docker is required.

  • On Windows MSVC 14.x required, and it should be in path, also python versions 3.7, 3.8, 3.9 and 3.10 both for x86 and x86-64 should be installed. You can disable some of these versions but you'd need to edit script for that.

  • For building wheels for Windows, invoke script .\scripts\BuildWheels.ps1 using PowerShell. Just make sure that your execution policy allows execution of scripts in your environment.

    Ready wheels for x86 and x86-64 for different python versions (3.7, 3.8, 3.9 and 3.10) will be located in distr directory.

Updating from older version

To upgrade an existing package, use the following command:

pip install --upgrade pygridgain

To install the latest version of a package:

pip install pygridgain

To install a specific version:

pip install pygridgain==1.4.0

Documentation

The package documentation is available at RTD for your convenience.

If you want to build the documentation from source, do the developer installation as described above, then run the following commands:

$ pip install -r requirements/docs.txt
$ cd docs
$ make html

Then open <client_root_directory>/docs/generated/html/index.html in your browser.

Examples

Some examples of using pygridgain are provided in examples folder. They are extensively commented in the “Examples of usage” section of the documentation.

This code implies that it is run in the environment with pygridgain package installed, and GridGain node is running on localhost:10800.

Testing

NB! It is recommended installing pygridgain in development mode. Refer to this section for instructions.

Do not forget to install test requirements:

$ pip install -r requirements/install.txt -r requirements/tests.txt

Also, you'll need to have a binary release of Ignite with log4j2 enabled and to set IGNITE_HOME environment variable:

$ cd <gridgain_binary_release>
$ export IGNITE_HOME=$(pwd)
$ cp -r $IGNITE_HOME/libs/optional/ignite-log4j2 $IGNITE_HOME/libs/

Run basic tests

$ pytest

Run with examples

$ pytest --examples 

If you need to change the connection parameters, see the documentation on testing.

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

pygridgain-1.4.0.tar.gz (265.2 kB view details)

Uploaded Source

Built Distributions

pygridgain-1.4.0-cp310-cp310-win_amd64.whl (138.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

pygridgain-1.4.0-cp310-cp310-win32.whl (137.9 kB view details)

Uploaded CPython 3.10 Windows x86

pygridgain-1.4.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl (150.1 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.5+ x86-64

pygridgain-1.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl (149.6 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.5+ i686

pygridgain-1.4.0-cp39-cp39-win_amd64.whl (138.8 kB view details)

Uploaded CPython 3.9 Windows x86-64

pygridgain-1.4.0-cp39-cp39-win32.whl (137.9 kB view details)

Uploaded CPython 3.9 Windows x86

pygridgain-1.4.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (149.9 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.5+ x86-64

pygridgain-1.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl (149.4 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.5+ i686

pygridgain-1.4.0-cp38-cp38-win_amd64.whl (138.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

pygridgain-1.4.0-cp38-cp38-win32.whl (137.8 kB view details)

Uploaded CPython 3.8 Windows x86

pygridgain-1.4.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (149.8 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.5+ x86-64

pygridgain-1.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl (149.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.5+ i686

pygridgain-1.4.0-cp37-cp37m-win_amd64.whl (138.8 kB view details)

Uploaded CPython 3.7m Windows x86-64

pygridgain-1.4.0-cp37-cp37m-win32.whl (137.8 kB view details)

Uploaded CPython 3.7m Windows x86

pygridgain-1.4.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (150.9 kB view details)

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

pygridgain-1.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl (150.4 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.5+ i686

File details

Details for the file pygridgain-1.4.0.tar.gz.

File metadata

  • Download URL: pygridgain-1.4.0.tar.gz
  • Upload date:
  • Size: 265.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for pygridgain-1.4.0.tar.gz
Algorithm Hash digest
SHA256 6c106faff495f7edb5c4f804ff54e896010363da0bfd8dcf542f221b19ee0416
MD5 b1b365ced36be8ee617bf10bacf7c7c5
BLAKE2b-256 b6ef59eca05293aa18b63686acec2b734c26f3919d88bea9ce0641e3f136e40f

See more details on using hashes here.

File details

Details for the file pygridgain-1.4.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pygridgain-1.4.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2697392444ff15dca08668b2aef2d219aa749cfd2eb6602757e1bbf2ee843197
MD5 035c76448d762191fad717f887aa88b3
BLAKE2b-256 7744c311d35ee7e082ee2c7bf4215a66ac37289ea9d1c96cc59dcb599ebe20ae

See more details on using hashes here.

File details

Details for the file pygridgain-1.4.0-cp310-cp310-win32.whl.

File metadata

  • Download URL: pygridgain-1.4.0-cp310-cp310-win32.whl
  • Upload date:
  • Size: 137.9 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for pygridgain-1.4.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 4c2dff46fedf57b9963957f78c1f87acaa39cb668bc1b31418b5b42aff7c4ae0
MD5 2e9fbce1726950b77d8bcef0ac623cee
BLAKE2b-256 a000cef5b73aa05f7d732c3b329d3b6e633a24bb1923d99f34386e1d114f07b0

See more details on using hashes here.

File details

Details for the file pygridgain-1.4.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for pygridgain-1.4.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e64c2c205a669a47666abec34e1fefe937202d9e8dfa396a6a2c90bdcd69f722
MD5 5e9999687ebb06d13d23ffdf34877b70
BLAKE2b-256 78d822c42a95f73d6b1a48d700b2face0897ffe601e824b36d3ceea4fe8490a1

See more details on using hashes here.

File details

Details for the file pygridgain-1.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for pygridgain-1.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 490abb76e639d675eacb3560c0145f53f8fb7ddf6034d888baf761adeee352a5
MD5 a4faa615c32b6469beb5dee6d66e4ac5
BLAKE2b-256 0058577b16e82e95dd97010800a49154a9f2ec9ab469ec5da90afaf3e161933a

See more details on using hashes here.

File details

Details for the file pygridgain-1.4.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pygridgain-1.4.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 138.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for pygridgain-1.4.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 abbf3720b4bf437e7a79265218d198da24eb70f0f613dad77fb752f424b494ae
MD5 d33e72a350f932843defa2c9260792b3
BLAKE2b-256 81a617d2e959f819dc7935d279de7de23b8005c31a04e8abcdf2730dffd68625

See more details on using hashes here.

File details

Details for the file pygridgain-1.4.0-cp39-cp39-win32.whl.

File metadata

  • Download URL: pygridgain-1.4.0-cp39-cp39-win32.whl
  • Upload date:
  • Size: 137.9 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for pygridgain-1.4.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 c6b8b5307bf686f958b8cd7848e233a212d67229d5b4b54040d8c5ff61e5431c
MD5 0913a588154c0349bc5ef5a0c5c03507
BLAKE2b-256 4ef5aad8d79317f60d789f79e2efebf4361cbf8405c49ff3965b2d1036e0270e

See more details on using hashes here.

File details

Details for the file pygridgain-1.4.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for pygridgain-1.4.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8a1b562c23a75fd9bf20556bfc1a7107c873225a344b3f0b75adbacd49d9606c
MD5 3875de06d1e2593998860102e7d6f790
BLAKE2b-256 234dc914a0a3829fd58bf67856871b5f3acc3d00588e81865d79795c7fb2dccc

See more details on using hashes here.

File details

Details for the file pygridgain-1.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for pygridgain-1.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 772e7333f4c06e94e2ae60d66ecc71e5faeeb6105b0f277a85511a515e3b13eb
MD5 c20ce3f082ff20aa123ba6de8438ab94
BLAKE2b-256 11fb08dc5a512466d7f5c20a3ad9fd7bea46b0c0d4d312ba589678165f51eda4

See more details on using hashes here.

File details

Details for the file pygridgain-1.4.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pygridgain-1.4.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 138.8 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for pygridgain-1.4.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 7d28f56408be71de0dbfb351f3228a3e19ada81f1a60d01d0069371711919cd7
MD5 30fb3a5d48254d972c6e491f6e477e6c
BLAKE2b-256 f60ca9b9cca0d6cd75fa2c85d87ff4443bb2c7a4bd9c9efdb32b8951859ff844

See more details on using hashes here.

File details

Details for the file pygridgain-1.4.0-cp38-cp38-win32.whl.

File metadata

  • Download URL: pygridgain-1.4.0-cp38-cp38-win32.whl
  • Upload date:
  • Size: 137.8 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for pygridgain-1.4.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 ec6f3b5e1685cd97405d368ac361ae205c4a14769cdc0627a7b343f6838b5bfe
MD5 a5a3bf90bdb7a7635187d3da378434d5
BLAKE2b-256 170590df6dce9b848fcf37d14d9e988e1a70f00c635cb85b5196f4bc2de7b71b

See more details on using hashes here.

File details

Details for the file pygridgain-1.4.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for pygridgain-1.4.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 fa3473273f6a4bd16980b0bcc3f5c90893c48df01225af5205596e5cf80b97b4
MD5 fa62af8a231afecda4322e7738e83fac
BLAKE2b-256 73acc66d4782f6cee94a7841d47d1701761a002c694c1535d9fb78da8e479ba6

See more details on using hashes here.

File details

Details for the file pygridgain-1.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for pygridgain-1.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 92d2d235a50288cf80f140ddf46ac8936dcf803aee22001e27939c905b6fb12f
MD5 cd5c62fe87d079a4d15b781fb4d4c241
BLAKE2b-256 1c0df353c4bcc2467772bdd9945c33e3d7ee01db1c6dbdb433f5e535c822b151

See more details on using hashes here.

File details

Details for the file pygridgain-1.4.0-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for pygridgain-1.4.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 7918a1a117171ce4cc4573581f7c91d145b36bbc1de1bb5106734ed28163dbb6
MD5 0be07f4bd7057f4d0ecdac3b2c0c706b
BLAKE2b-256 416d53fd7103c0e816ce4500c40e4eb625e00df9aca884dabf6ffe21289a7b10

See more details on using hashes here.

File details

Details for the file pygridgain-1.4.0-cp37-cp37m-win32.whl.

File metadata

  • Download URL: pygridgain-1.4.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 137.8 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for pygridgain-1.4.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 bf036d2547eb4487fa7383ca22a06060136b4880b4a354af57526a5790d3a9f2
MD5 b3f5e0ff01146350250cc32fc454fde3
BLAKE2b-256 fbd088773478e855dcb98828279cb71e4727ee12b1fb6f797929e8107eb3ac44

See more details on using hashes here.

File details

Details for the file pygridgain-1.4.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for pygridgain-1.4.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7f48aef7141938599923ee8df01685038fc2603bc48b194c7e9ec435b69d3a33
MD5 c58f8aa9fbdf4e3a43308d1fe17c651b
BLAKE2b-256 dbc592a2e8ae37f1bc18c63a516158066d4f641154232971ded3766d5d0af76a

See more details on using hashes here.

File details

Details for the file pygridgain-1.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for pygridgain-1.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 40f5ea3f709c23e9f02a43d2a422f18f9f4655a5d9174a4904ba271792229b9b
MD5 dc10919f78cfb87e0ca03855232d83a4
BLAKE2b-256 9dffb3094e3c43d46b50738806f9d40100878c8aef06bcf4991230caa072885e

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