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
cd PYHANDLE/
python setup.py 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.3.1.tar.gz (76.6 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for pyhandle-1.3.1.tar.gz
Algorithm Hash digest
SHA256 8dc7c310d0230f6a11bbb6cb32bdf9c35934309b91bc332667d6c4c1d236cd71
MD5 45b2777c37caa87fedb411f5b17f9152
BLAKE2b-256 ee2524608ed177e897db25f4a50f7f1ff8b200cc0981cbef12c656e893eedbf7

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyhandle-1.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0a9f6595101a55b32be0645cc5b36c759d29afafb59c429b0775f73dc4dadacd
MD5 bf92fefeec82c8c532902c41f6591ec6
BLAKE2b-256 80f09017424f35102d1e3b2a606f3fea4cdd1df49ba1662e071b757762b70437

See more details on using hashes here.

Supported by

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