Flexiv PDK (Python)
Python package for creating robotic applications using the Flexiv PDK.
It provides the flexiv.pdk client and the generated gRPC message types for
talking to a Flexiv PDK server.
The Flexiv PDK Manual is the main reference, with tutorials, every service, and the Python API. The source and examples are in flexiv_pdk.
Requirements
- Python 3.10+
- A running Flexiv PDK server to connect to: see Install the Server.
Install
Pick the option that matches what you have. Both leave you with an activated
virtual environment that can import flexiv.pdk; afterwards continue to
Verify your installation.
Option 1 — pre-built wheel (recommended for most users)
Install flexivpdk and its dependencies from PyPI:
python3 -m venv .venv
source .venv/bin/activate
pip install "flexivpdk==<version>"
Use the <version> of the flexiv_pdk release you are using, such as 1.0.0; it
must match the server's.
Option 2 — from a source checkout
The SDK's gRPC stubs are generated from its .proto files and are not part of a
bare checkout, so a helper script does the whole setup in one step — it creates
a virtual environment, generates the stubs, and installs the SDK. From the root
of a clone of flexiv_pdk:
cd python
source setup_venv.sh # source, not bash — it activates the venv for you
Verify your installation
-
Confirm the package imports:
python -c "from flexiv.pdk import Client; import flexiv.pdk.workcell.workcell_service_pb2; print('flexiv.pdk OK')"
-
Run a real example against a running PDK server (see examples/python for the full list and prerequisites):
python examples/python/scene_example.py
Quick usage
The Client class creates and manages the gRPC service client stubs.
import grpc
from flexiv.pdk import Client
from flexiv.pdk.workcell.workcell_service_pb2 import NameRequest
def run_sample():
with Client("localhost:50052") as client:
try:
res = client.workcell.stub.Exists(NameRequest(name="example_workcell"))
print(f"Workcell exists: {res.exists}")
except grpc.RpcError as e:
print(f"Connection failed: {e}")
if __name__ == "__main__":
run_sample()
A client works with a server of the same major and minor version. To check before doing anything else:
compatible, message = client.check_version()
if not compatible:
raise SystemExit(message)
Command-line interface
Installing this package also provides pdk-scene, a terminal tool for
inspecting and modifying a scene on a running server without writing any code:
pdk-scene --help # list commands
pdk-scene object list # e.g. list scene objects on the active workcell
Full guide: README_CLI.md.
Licensed services
Most services are free. Three require a license, one each:
| Service | License code |
|---|---|
client.point_to_point_path |
point_to_point_path |
client.surface_finish |
surface_finish |
client.mesh_operation |
mesh_operation |
A license is tied to the security chip in the computer running the server, so it needs no network at run time.
Calling one of those without a license returns PERMISSION_DENIED (code 5) in
the response's status field, and status.message names the service and says
what to do about it - the same check you already use for every other call. To
find out before calling, or to install a license:
from flexiv.pdk.license.license_service_pb2 import ListRequest
response = client.license.stub.List(ListRequest())
for service in response.services:
print(service.display_name, service.state, service.detail)
Buying a license moves two files: pdk-scene license identifier writes the
one you email to Flexiv, and pdk-scene license install -f <file.lic>
installs the one Flexiv sends back. From code, install it with the path Flexiv's
file was saved at:
response = client.license.install_file("NEB-2026-0042.lic")
if response.status.code != 0:
print(response.status.message)
The file is read on this machine and its contents sent over gRPC, so the server
may be another host or a container. It takes effect without a restart. The
pdk-scene license commands wrap the same service - see
README_CLI.md.
Related docs
- The Flexiv PDK Manual: tutorials, every service, and the Python API
- Runnable example scripts and their prerequisites: examples/python
- Repository overview: README.md
Metadata
Release files for flexivpdk 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flexivpdk-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / flexivpdk-1.0.0-py3-none-any.whl
| Download URL | flexivpdk-1.0.0-py3-none-any.whl |
|---|---|
| Size | 173.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cadeb6eac7632e0415c5d04c97888d0932318461f17a836268180e260503eaf8
|
|
BLAKE2b-256 checksum How to use checksums |
8da961a8acabee150fbbcd9cabb0042cd9a897741a86f8a15350c3c48f6a67a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Security for flexivpdk 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.