GridDB Python Client is developed using GridDB C Client and SWIG (Simplified Wrapper and Interface Generator).
Starting a GridDB instance is simple.
Run images griddb sever default mode and default setting
$ docker run --network="host" griddb/python
All variable of docker GridDB python client
| Variable | Value default | Type of variable |
|---|---|---|
| GRIDDB_CLUSTER_NAME | dockerGridDB | STRING |
| GRIDDB_USERNAME | admin | STRING |
| GRIDDB_PASSWORD | admin | STRING |
| NOTIFICATION_PORT | 31999 | NUMBER |
| NOTIFICATION_ADDRESS | 239.0.0.1 | STRING |
| IP_NOTIFICATION_MEMBER | NULL | STRING |
All method of docker GridDB python
| MODE | STATUS(default) |
|---|---|
| MULTICAST | ON |
| FIXED LIST | OFF |
Run images GridDB python simple with multicast mode
$ docker run --network="host" griddb/python
Run image GridDB python with environment config for multicast mode
docker run --name container_name \
--network="host" \
-e GRIDDB_CLUSTER_NAME=<clustername> \
-e NOTIFICATION_PORT=<port> \
-e NOTIFICATION_ADDRESS=<multicast_address> \
-e GRIDDB_USERNAME=<user> \
-e GRIDDB_PASSWORD=<passwd> \
griddb/python
Run images GridDB server simple with fixed list mode
$ docker run --network="host" -e IP_NOTIFICATION_MEMBER="10.10.xx.xx" griddb/python
Run image GridDB server with environment config for fixed list mode
docker run --name container_name \
--network="host" \
-e GRIDDB_CLUSTER_NAME=<clustername> \
-e GRIDDB_USERNAME=<user> \
-e GRIDDB_PASSWORD=<passwd> \
-e IP_NOTIFICATION_MEMBER=<ip_machine_member> \
griddb/python
Note :
$ docker run -d --network="host" griddb/griddb
$ docker run --network="host" griddb/python
Output :
--> Person: name=name02 status=false count=2 lob=[65, 66, 67, 68, 69, 70, 71, 72, 73, 74]
$ docker run -d --network="host" -e NOTIFICATION_MEMBER=1 griddb/griddb
$ docker run --network="host" -e IP_NOTIFICATION_MEMBER="10.10.xx.xx" griddb/python
Output :
--> Person: name=name02 status=false count=2 lob=[65, 66, 67, 68, 69, 70, 71, 72, 73, 74]
The more information about python client. Could please refer to here
The docker exec command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside your GridDB python container:
$ docker exec -it container-name bash
About use docker exec for excute container python:
Step 1: Start GridDB server
Step 2: Run image GridDB python
$ docker run -d --network="host" -v `pwd`:/root/. --name griddb_python griddb/python tail -f /dev/null
Note: After finshed to run step 2. Image GridDB python has:
$ docker ps about show it.pwd is current path when run image. The "/root/." is path into docker container. This 2 value can change with user purposeStep 3: Sample execute
$ docker execute -it griddb_python /bin/bash -xec "Your command"
Example:
$ docker execute -it griddb_python /bin/bash -xec "python sample1.py 239.0.0.1 31999 dockerGridDB admin admin"
If run sample GridDB python.
$ docker run --network="host" griddb/python
After finshed run sample image auto finish process.
If run execute GridDB python image
$ docker run -d --network="host" -v `pwd`:/root/. --name griddb_python griddb/python tail -f /dev/null
GridDB python will stop with command:
$ docker container stop griddb_python
or
$ docker kill griddb_python
The griddb python images come in many flavors, each designed for a specific use case.
griddb/pythongriddb/python:<version>-focalgriddb/python:<version>-centos7griddb/python:<version>-bionicView license information for the software contained in this image.
Content type
Image
Digest
sha256:e255a89d9…
Size
219.1 MB
Last updated
about 4 years ago
docker pull griddb/python-client:0.8.5-centos7