Skip to main content

JS7 Python Client

PyPI version Python versions

The JS7 Python Client provides methods for accessing the JS7 JOC Cockpit REST API. It offers functionality similar to the JS7 Unix CLI: JS7 Unix CLI.

Requirements

  • Python version 3.8 or later
  • A JS7 installation with version 2.6.5–2.8.3
  • A Java JVM version 17 or later for encryption and decryption functionality

Installation

pip install js7-client-python

Quick Start

The following example shows how to create a client instance and perform an operation.

Note: Additional examples showing how the client can be used can be found in the ./example directory of this repository.

Client Initialization

Client initialization begins with configuring the JOC Cockpit API endpoint and the user’s credentials.

import js7

client = js7.Client(
    http_config=js7.model.HTTPConfiguration(
        host="192.168.1.14",
        port=4443
    ),
    auth_config=js7.model.AuthConfiguration(
        basic_auth=js7.model.BasicAuth(
            username="root",
            password="changeit"
        )
    )
)

SSL and Certificate-Based Authentication

The code snippet above shows authentication using Basic Auth. However, the JS7 Python Client also supports certificate-based authentication and client certificates for HTTPS connections.

client = js7.Client(
    http_config=js7.model.HTTPConfiguration(
        host="192.168.1.14",
        port=4446,
        ssl=True,
        cafile_path="./certificate.crt"
    ),
    auth_config=js7.model.AuthConfiguration(
        cert_auth=js7.model.CertAuth(
            certfile_path="./client.crt",
            keyfile_path="./client.key"
        )
    )
)

Import Inventory Configurations

A common use case is importing inventory configurations into JS7 JOC Cockpit. We use the previously created client instance to import configurations.

ok = client.inventory.manage.import_configurations(
    file_path="/path/to/file/or/folder",
    inventory_target_folder="/test-folder"
)

print(f"Operation successful: {ok}")

Namespaces

The Client class follows the domains of the JS7 JOC Cockpit REST API, but groups its methods into three namespaces:

  • Manage: Used to manage configurations and resources, such as importing, updating, or removing them.
  • Operate: Used to control runtime behavior, such as resuming a workflow or canceling an order.
  • Deploy: Used to deploy configurations, such as workflows.

Resources

Metadata

Release files for js7-client-python 2.0.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for js7-client-python 2.0.17
File Size Uploaded
js7_client_python-2.0.17.tar.gz 16.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for js7-client-python 2.0.17
File Interpreter ABI Platform
js7_client_python-2.0.17-py3-none-any.whl Python 3 none any Details

Total release size: 33.4 MB

Release files / js7_client_python-2.0.17.tar.gz

Download URL js7_client_python-2.0.17.tar.gz
Size 16.6 MB
Tags Source
SHA-256 checksum
How to use checksums
a069b75c42d17df85ca2c47683a76793fe7c3c4ca63c4bf7004b647fb199f13f
BLAKE2b-256 checksum
How to use checksums
bd1ec17bd2ed3e055038b4134b8c9b98c68e6e7b5104d1d09889c81e2e5ad9b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / js7_client_python-2.0.17-py3-none-any.whl

Download URL js7_client_python-2.0.17-py3-none-any.whl
Size 16.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
8f6ed2fc253054fc0b7f3763af0e6005532d3907cf2e5b4ac79229c63ac0608b
BLAKE2b-256 checksum
How to use checksums
e76804f6d4b1a0ffc8bbe629f2c728b0ab5515ca582ee90ac06427915684d1cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

2.0.17 This release

2 release files

2.0.16

2 release files

2.0.15

2 release files

2.0.13

2 release files

2.0.12

2 release files

2.0.9

3 release files

2.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page