easyhandle
A lightweight python package for accessing handle services.
Installation
This python package can be installed using pip.
pip install easyhandle
Getting Started
This library provides different HandleClient classes (e.g. BasicAuthHandleClient), differing in the way authentication is handled.
All clients inherit from the super class HandleClient.
Instantiating the client object
To instantiate a client object either use its constructor:
client = HandleClient('https://hdl.handle.net',
prefix='TEST',
verify=True)
or the respective classmethod load_from_config:
client = HandleClient.load_from_config({
'handle_server_url': 'https://hdl.handle.net',
'prefix': 'TEST',
'HTTPS_verify': True
})
Usage
All methods described below return the according Response object of the request submitted to the handle server
To create a new handle entry (requires authentication) use the put_handle method, e.g.:
client.put_handle({
'handle': 'TEST/0aca26ca-016f-11eb-adc1-0242ac120002'
'values': [
{
'index': 1,
'type': 'URL',
'data': {
'format': 'string',
'value': 'https://www.google.com'
}
]
})
To retrieve a handle record use the get_handle method, e.g.:
client.get_handle('TEST/0aca26ca-016f-11eb-adc1-0242ac120002')
To delete a handle record use the delete_handle method, e.g.:
client.delete_handle('TEST/0aca26ca-016f-11eb-adc1-0242ac120002')
Available Clients
BasicAuthHandleClient
Required config properties:
| Name | Description | Default |
|---|---|---|
| handle_server_url | base url to the handle service | https://hdl.handle.net |
| prefix | handle prefix used, when new PIDs are issued | |
| HTTPS_verify | defines wehter the server certificate should be validated | True |
| username | username used for basic authentication | |
| password | password used for basic authentication |
Metadata
Release files for easyhandle 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| easyhandle-0.0.7.tar.gz | 3.4 kB | Without provenance | Details for easyhandle-0.0.7.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| easyhandle-0.0.7-py3-none-any.whl | Python 3 | none | any | Details for easyhandle-0.0.7-py3-none-any.whl |
| easyhandle-0.0.7-py2-none-any.whl | Python 2 | none | any | Details for easyhandle-0.0.7-py2-none-any.whl |
Total release size: 34.5 kB
Release files / easyhandle-0.0.7.tar.gz
| Download URL | easyhandle-0.0.7.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d9ebd404f9fee8904da351f70c9b77dc8f137b49dcea6353025a763d72176cd
|
|
BLAKE2b-256 checksum How to use checksums |
6d1069bcf6a422d5891a38f77f3cf8d7fe7ac9895173743a7af8d350ab18eab6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
|
Release files / easyhandle-0.0.7-py3-none-any.whl
| Download URL | easyhandle-0.0.7-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ff2116d06aab1f8965adf555845ac02ec20811f9341c51dea32bcad62b03353
|
|
BLAKE2b-256 checksum How to use checksums |
3f314e00bc5cb28dde8970c74f8478c411a335f64b028a07c168b18a8384f8e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
|
Release files / easyhandle-0.0.7-py2-none-any.whl
| Download URL | easyhandle-0.0.7-py2-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
239ce12569e1921e0f363d7d461e2615c8852a3cc67cec2917b88ca7e3339daa
|
|
BLAKE2b-256 checksum How to use checksums |
4d0920d854829eeefd7e8930694340e2c6a3a56f9ebe88509ba1f777fcb5ee59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
|
Security for easyhandle 0.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.