A Python client for interacting with the ROR API
Project description
RORClient
🚀 A Python client for interacting with the ROR API. RORClient provides a simple, efficient way to query the Research Organization Registry (ROR) API using HTTPX and Pydantic.
📖 Table of Contents
⚡ Installation
⚠ Work in Progress: RORClient is not yet available via PyPI. Clone the repository and install dependencies manually:
git clone https://github.com/ADernild/rorclient.git
cd rorclient
uv sync
🚀 Quick Start
Synchronous Client
from rorclient import RORClient
with RORClient() as client:
# Get institution details
org = client.get_institution("03yrm5c26")
if org:
print(f"Found institution: {org.name}")
# Fetch multiple institutions
multiple_orgs = client.get_multiple_institutions(["03yrm5c26", "029z82x56"])
print(f"Fetched {len(multiple_orgs)} institutions")
Asynchronous Client
import asyncio
from rorclient import AsyncRORClient
async def main():
async with AsyncRORClient() as client:
# Get institution details
org = await client.get_institution("03yrm5c26")
if org:
print(f"Found institution: {org.name}")
# Fetch multiple institutions
multiple_orgs = await client.get_multiple_institutions(["03yrm5c26", "029z82x56"])
print(f"Fetched {len(multiple_orgs)} institutions")
asyncio.run(main())
🏛 Models
RORClient uses Pydantic models to structure API responses. The main model is Institution, which represents an organization in ROR.
Example usage:
from rorclient import RORClient
client = RORClient()
org = client.get_institution("03yrm5c26")
if org:
print(org.name) # Stanford University
print(org.external_ids) # External identifiers like GRID, ISNI
print(org.location.country) # Country of the institution
For a full list of available fields, see the institution.py file. You can also have a look at the ROR API documentation
🧪 Testing
To run the test suite, run:
uv run pytest
🤝 Contributing
Contributions are welcome! Please open an issue or submit a pull request.
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rorclient-0.1.0.tar.gz.
File metadata
- Download URL: rorclient-0.1.0.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9bd2fdf981ff4f3377ad1ed13ad87edffc654bf8e29a86bcf80ffe063432b85
|
|
| MD5 |
8935ddf6bd495d4b65a3c2650c95934a
|
|
| BLAKE2b-256 |
85f846ff718a1b95778ab52dd95e9c468555fa2bf76ec8661140fc1b087eb534
|
Provenance
The following attestation bundles were made for rorclient-0.1.0.tar.gz:
Publisher:
python-publish.yml on ADernild/RORClient
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rorclient-0.1.0.tar.gz -
Subject digest:
d9bd2fdf981ff4f3377ad1ed13ad87edffc654bf8e29a86bcf80ffe063432b85 - Sigstore transparency entry: 181124868
- Sigstore integration time:
-
Permalink:
ADernild/RORClient@5ee717c0c183cbde1622c19ab92494fd782a88bc -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ADernild
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@5ee717c0c183cbde1622c19ab92494fd782a88bc -
Trigger Event:
release
-
Statement type:
File details
Details for the file rorclient-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rorclient-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
586285378ee2edcd04a8abac40cf481d8b7480ab53b627a7ee094771ff2bc959
|
|
| MD5 |
9d49cc25127df54ad29e367eaf191a75
|
|
| BLAKE2b-256 |
8abcebf7241c36f6d3f5d8f43186a66df8526ee4d4549f4702c4431927b62096
|
Provenance
The following attestation bundles were made for rorclient-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on ADernild/RORClient
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rorclient-0.1.0-py3-none-any.whl -
Subject digest:
586285378ee2edcd04a8abac40cf481d8b7480ab53b627a7ee094771ff2bc959 - Sigstore transparency entry: 181124871
- Sigstore integration time:
-
Permalink:
ADernild/RORClient@5ee717c0c183cbde1622c19ab92494fd782a88bc -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ADernild
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@5ee717c0c183cbde1622c19ab92494fd782a88bc -
Trigger Event:
release
-
Statement type: