https://github.com/aces/loris-python-client
https://github.com/aces/loris-python-client
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/aces/loris-python-client
- Owner: aces
- Created: 2025-07-07T17:21:08.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-08T16:37:01.000Z (11 months ago)
- Last Synced: 2025-07-08T17:41:39.153Z (11 months ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LORIS Python API client
## Description
This repository contains the LORIS Python API client, a Python client to interact with the LORIS public HTTP API.
## Installation
To install this project, use the following command:
```sh
pip install git+https://github.com/aces/loris-python-client.git
```
## Example
To use the LORIS Python API client, use the `LorisApiClient.connect` method to connect to the API and pass the client to the desired endpoints.
```py
from loris_api_client.client import LorisApiClient
from loris_api_client.endpoints.visit import try_get_candidate_visit
client = LorisApiClient.connect('https://demo.loris.ca', 'username', 'password')
candidate = 'DCC060'
visit = 'V1'
candidate_visit = try_get_candidate_visit(client, candidate, visit)
if candidate_visit is not None:
print(f"Candidate {candidate} exists and has visit {visit} for project {visit.meta.project}.")
else:
print(f"Candidate {candidate} does not exist or has no visit {visit}.")
```
## Documentation
This repository unfortunately does not have much documentation, however, you can always refer to the type hints or the LORIS API documentation for instructions. Do not hesitate to open an issue or PR if needed.