Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#*.gitignore
*.pem
_notes
.vscode
.vscode*
.devcontainer*

_new*
_test*
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) PTC Inc. and/or all its affiliates. All rights reserved.
Copyright (c) 2019-2024 PTC Inc. and/or all its affiliates. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
26 changes: 17 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Released Version](https://img.shields.io/pypi/v/kepconfig)](https://pypi.org/project/kepconfig) [![Supported Versions](https://img.shields.io/pypi/pyversions/kepconfig)](https://pypi.org/project/kepconfig) ![PyPI - Downloads](https://img.shields.io/pypi/dm/kepconfig) ![PyPI - License](https://img.shields.io/pypi/l/kepconfig)

This is a package to help create Python applications to conduct operations with the Kepware Configuration API. This package is designed to work with all versions of Kepware that support the Configuration API including Thingworx Kepware Server (TKS), Thingworx Kepware Edge (TKE) and KEPServerEX (KEP).
This is a package to help create Python applications to conduct operations with the Kepware Configuration API. This package is designed to work with all versions of Kepware that support the Configuration API including Thingworx Kepware Server (TKS), Thingworx Kepware Edge (TKE) and KEPServerEX (KEP). For reference, Kepware Server in this documentation will refer to both TKS and KEP versions.

**API reference documentation is available on [Github Pages](https://ptcinc.github.io/Kepware-ConfigAPI-SDK-Python)**

Expand All @@ -14,19 +14,23 @@ Package supported and tested on Python 3.9 or later. Older versions support earl

- Supports both HTTP and HTTPS connections with certificate validation options

SDK allows for *GET*, *ADD*, *DELETE*, and *MODIFY* functions for the following Kepware configuration objects:
Package allows for *GET*, *ADD*, *DELETE*, and *MODIFY* functions for the following Kepware configuration objects:

| Features | TKS/KEP | TKE |
| :----------: | :----------: | :----------: |
| **Project Properties** <br /> *(Get and Modify Only)* | Y | Y |
| **Connectivity** <br /> *(Channel, Devices, Tags, Tag Groups)* | Y | Y |
| **IoT Gateway** <br /> *(Agents, IoT Items)* | Y | Y |
| **Datalogger** <br /> *(Log Groups, Items, Mapping, Triggers, Reset Mapping Service)* | Y | Y |
| **UA Gateway** <br /> *(Certificates, Server Endpoints, Client Connections, Server Interface parameters)* | Y*** | N |
| **Administration** <br /> *(User Groups, Users, UA Endpoints, Local License Server)* | Y* | Y |
| **Product Info and Health Status\*\*** | Y | Y |
| **Import Project (via JsonProjectLoad Service) / Export Project\*\*\*\***| Y | Y |

- Note (*) - UA Endpoints and Local License Server supported for Kepware Edge only
- Note (**) - Added to Kepware Server v6.13 / Kepware Edge v1.5 and later builds
- Note (***) - TKS only v6.16 and later
- Note (****) - Added to Kepware Server v6.17 / Kepware Edge v1.10 and later builds

Driver specific features:

Expand All @@ -46,15 +50,18 @@ Configuration API *Services* implemented:

| Services | TKS/KEP | TKE |
| :----------: | :----------: | :----------: |
| **TagGeneration**<br />*(for supported drivers)* | Y | Y |
| **TagGeneration** <br /> *(for supported drivers)* | Y | Y |
| **ReinitializeRuntime** | Y* | Y |
| **ProjectLoad and ProjectSave**| Y | Y |
| **JsonProjectLoad\*\*** <br /> *(used for import project feature)*| Y | Y |

Note (*) - Reinitialize service was implemented for Kepware Server v6.8+

Filtering, sorting and pagination query options are added for any collections methods (ex: get_all_devices() or get_all_channel()).
Note (**) - Added to Kepware Server v6.17 / Kepware Edge v1.10 and later builds

Generic REST methods are provided to use for functions not developed in SDK package. These are found in the Server Class in [connection.py](./kepconfig/connection.py)
Filtering, sorting and pagination query options are added for any collections methods (ex: `get_all_devices()` or `get_all_channel()`).

Generic REST methods are provided to use for functions not developed in SDK package. These are found in the `Server` class in [connection.py](./kepconfig/connection.py)

## Known Limitations

Expand All @@ -72,9 +79,9 @@ Package can be installed with `pip` using the following:

## Key Concepts

NOTE: Detailed examples can also be found in the [examples](./examples/) folder.
**NOTE:** Detailed examples can also be found in the [examples](./examples/) folder.

### Create server connection
### Create server connection instance

```python
from kepconfig import connection
Expand All @@ -86,13 +93,13 @@ server = connection.server(host = '127.0.0.1', port = 57512, user = 'Administrat

```

For certificate validation, the SDK uses the OS/systems trusted CA certificate store. The connection uses the "create_default_context()" function as part of urllib as described at the following links:
For certificate validation, the SDK uses the OS/systems trusted certificate store. The connection uses the `create_default_context()` function as part of urllib as described at the following links:

- [ssl.create_default_context](https://docs.python.org/3/library/ssl.html#ssl.create_default_context)
- [ssl.SSLContext.load_default_certs](https://docs.python.org/3/library/ssl.html#ssl.SSLContext.load_default_certs)
- [set_default_verify_paths](https://docs.python.org/3/library/ssl.html#ssl.SSLContext.set_default_verify_paths)

For Windows OSes, the Kepware server's instance certificate can be loaded into the hosts "Trusted Root Certificate Authorities" store.
For Windows OSes, the Kepware Server's instance certificate can be loaded into the hosts "Trusted Root Certificate Authorities" store.

### Create an object

Expand Down Expand Up @@ -131,5 +138,6 @@ result = tag.add_tag(server, tag_path, tag_info)

**Visit:**

- [Kepconfig Package Documentation on Github Pages](https://ptcinc.github.io/Kepware-ConfigAPI-SDK-Python)
- [Kepware.com](https://www.kepware.com/)
- [PTC.com](https://www.ptc.com/)
Empty file removed docs/.nojekyll
Empty file.
Loading