Skip to main content

Library for management of handles

Project description

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:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyhandle-1.5.0.tar.gz (76.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyhandle-1.5.0-py2.py3-none-any.whl (101.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pyhandle-1.5.0.tar.gz.

File metadata

  • Download URL: pyhandle-1.5.0.tar.gz
  • Upload date:
  • Size: 76.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.2

File hashes

Hashes for pyhandle-1.5.0.tar.gz
Algorithm Hash digest
SHA256 6f95272941b4e1d68f0843bf462b2d40bb55b6173a8d073858f29bd67931acb5
MD5 c67449ff0f64e9999f190e38926b81ee
BLAKE2b-256 489cd7d06d7937b185c01c454c10e35bf658e338094aa0ceead7c4abdd3702d1

See more details on using hashes here.

File details

Details for the file pyhandle-1.5.0-py2.py3-none-any.whl.

File metadata

  • Download URL: pyhandle-1.5.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 101.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.2

File hashes

Hashes for pyhandle-1.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 45393a7a4a1413b2f531a39f992956f7542405ea2992ab611ccf8940581c839b
MD5 c3ab13e427cb48b7f3b6a7bbae31d620
BLAKE2b-256 ba622f1f2eed0b22a8a280ba8c3e5f4c49283194c4c89008c01c3ed736e2c866

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page