Skip to main content

A Python client for interacting with the ROR API

Project description

RORClient

Become a sponsor to ADernild GitHub LinkedIn Akami Cloud Computing Pydantic v2 httpx Python versions

🚀 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


Download files

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

Source Distribution

rorclient-0.1.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

rorclient-0.1.0-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

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

Hashes for rorclient-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d9bd2fdf981ff4f3377ad1ed13ad87edffc654bf8e29a86bcf80ffe063432b85
MD5 8935ddf6bd495d4b65a3c2650c95934a
BLAKE2b-256 85f846ff718a1b95778ab52dd95e9c468555fa2bf76ec8661140fc1b087eb534

See more details on using hashes here.

Provenance

The following attestation bundles were made for rorclient-0.1.0.tar.gz:

Publisher: python-publish.yml on ADernild/RORClient

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for rorclient-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 586285378ee2edcd04a8abac40cf481d8b7480ab53b627a7ee094771ff2bc959
MD5 9d49cc25127df54ad29e367eaf191a75
BLAKE2b-256 8abcebf7241c36f6d3f5d8f43186a66df8526ee4d4549f4702c4431927b62096

See more details on using hashes here.

Provenance

The following attestation bundles were made for rorclient-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on ADernild/RORClient

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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