Skip to main content

PYHANDLE

PyHandle is a Python client library for interaction with a Handle System server, providing basic create, read, update and delete capabilities for Handles. The library offers a client for the HTTP REST interface. It also includes a client that interacts directly with a Handle server SQL back-end and a client that creates customized Batch files (containing Batch operations that can be performed using the GenericBatch command utility provided by the Handle System), but those two are no longer maintained.

PyHandle currently supports Python >=3.5 (tested up to 3.10), and requires at least a Handle System server 9. The library requires OpenSSL v1.0.1 or higher. Python 2.7 and 3.10 are supported.

PyHandle is based on a prior development of the EUDAT project under the name B2Handle. As B2Handle was developed with a specific scope - Handle operations in the EUDAT project - in mind, it has been improved and made more generic to cater to a broader audience.

We advice you to use PyHandle isteard of B2HADNLE.

Installation

You can install the PyHandle library as follows:

git clone https://github.com/EUDAT-B2SAFE/PYHANDLE.git

( for python <= 3.11) cd PYHANDLE/ && python setup.py install

(for python >= 3.12) cd PYHANDLE/ && pip install .

The library is also available on PyPi and can be installed via pip:

 pip install pyhandle

For more information on the methods offered by the library, please consult the technical documentation.

Instantiate:

One of the core steps is to instantiate the file with the needed credentials. A guide on how to use them is the following:

credentials_file = './credentials/creds.json'
# Path must be relative to current working dir
# JSON file must contain absolute paths, or paths relative to the creds.json file!!
creds = pyhandle.clientcredentials.PIDClientCredentials.load_from_JSON(credentials_file)
client = pyhandle.handleclient.PyHandleClient('rest').instantiate_with_credentials(
        creds, HTTPS_verify=https_verify)

Link to documentation

Check out the technical documentation here.

Check out the overall documentation here.

License

Copyright 2015-2022, Deutsches Klimarechenzentrum GmbH, GRNET S.A., SURFsara

The PYHANDLE library is licensed under the Apache License, Version 2.0 (the "License"); you may not use this product except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Github contributions

Devs:

  • Please make contributions based on the devel branch, then issue a PR to the devel branch.
  • Small contributions (e.g. typos, README, ...) can be pushed directly to devel if you have permissions.

Owners:

  • Run unit tests on PR
  • Merged PR into devel
  • If/when changes are ready for a next release, bump the version number (no PR, but push directly to the repo)
  • Run unit tests again on this devel branch.
  • Merge devel into master (no PR, directly merge them with --no-ff to keep history and push to master)
  • Add "-dev" to the incremented version number on devel
  • Send release to pypi:

Metadata

Release files for pyhandle 1.5.0

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

Source distribution (sdist)

Source distribution for pyhandle 1.5.0
File Size Uploaded
pyhandle-1.5.0.tar.gz 76.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyhandle 1.5.0
File Interpreter ABI Platform
pyhandle-1.5.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 178.5 kB

Release files / pyhandle-1.5.0.tar.gz

Download URL pyhandle-1.5.0.tar.gz
Size 76.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6f95272941b4e1d68f0843bf462b2d40bb55b6173a8d073858f29bd67931acb5
BLAKE2b-256 checksum
How to use checksums
489cd7d06d7937b185c01c454c10e35bf658e338094aa0ceead7c4abdd3702d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.2

Release files / pyhandle-1.5.0-py2.py3-none-any.whl

Download URL pyhandle-1.5.0-py2.py3-none-any.whl
Size 101.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
45393a7a4a1413b2f531a39f992956f7542405ea2992ab611ccf8940581c839b
BLAKE2b-256 checksum
How to use checksums
ba622f1f2eed0b22a8a280ba8c3e5f4c49283194c4c89008c01c3ed736e2c866
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

1.5.0 This release

2 release files

1.4.1

2 release files

1.3.1

2 release files

1.2.1

2 release files

1.2.0

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

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