Skip to main content
[![Build Status](https://travis-ci.org/puntonim/inspire-service-orcid.svg?branch=master)](https://travis-ci.org/puntonim/inspire-service-orcid)

# Inspire ORCID service client

This package is service client for ORCID API used in inspire-next.

## Client usage

```python
# Configure settings.
import inspire_service_orcid.conf
d = dict(
DO_USE_SANDBOX=False,
CONSUMER_KEY='myorcidappkey',
CONSUMER_SECRET='myorcidappsecret',
REQUEST_TIMEOUT=30,
)
inspire_service_orcid.conf.settings.configure(**d)

# Use the client.
from inspire_service_orcid.client import OrcidClient
client = OrcidClient('mytoken', '0000-0002-0942-3697')
response = client.get_all_works_summary()
response.raise_for_result()
putcode = response['group'][0]['work-summary'][0]['put-code']
```

In order to use time_execution to collect metrics, configure it first:
```python
import time_execution
from inspire_service_orcid import hooks

hooks = [
hooks.status_code_hook,
hooks.orcid_error_code_hook,
hooks.orcid_service_exception_hook,
]
time_execution.settings.configure(
backends=[mybackend],
hooks=hooks,
origin='inspire_next'
)
```

## Development

```bash
# Create a venv and install the requirements:
$ make venv

# Run isort and lint:
$ make isort
$ make lint

# Run all the tests:
$ make test # tox against Python27 and Python36.
$ tox -e py27 # tox against a specific Python version.
$ pytest # pytest against the active venv.

# Run a specific test:
$ make test/tests/test_client.py # tox against Python27 and Python36.
$ tox -e py27 -- tests/test_client.py # tox against a specific Python version.
$ pytest tests/test_client.py # pytest against the active venv.
```

To publish on PyPi, first set the PyPi credentials:

```bash
# Edit .pypirc:
$ cat $HOME/.pypirc
[pypi]
username: myuser
password: mypass
```

```bash
# Tag the new version:
$ git tag 1.1.1
# Then generate setup.py and publish:
$ make setup.py
$ make publish
# Commit the setup.py file:
$ git add .
$ git commit -m '1.1.1 released'
$ git push origin master --tags
```

Metadata

Release files for inspire-service-orcid 9.0.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 inspire-service-orcid 9.0.0
File Size Uploaded Provenance Actions
inspire-service-orcid-9.0.0.tar.gz 10.0 kB Without provenance Details for inspire-service-orcid-9.0.0.tar.gz

Release files / inspire-service-orcid-9.0.0.tar.gz

Download URL inspire-service-orcid-9.0.0.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
cacee4fb19224ea2eb8a0e7e943479ef628c47f4b8b51f271263c2816a6814a1
BLAKE2b-256 checksum
How to use checksums
3b37a6a18bc4c829dfdf908ca0918a2a7ce46420cddafe583b293f251a95194b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.10

Security for inspire-service-orcid 9.0.0

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.

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