A client to interact with the Rockefeller Archive Center's Collections API.
Project description
rac_api_client
A client to interact with the Rockefeller Archive Center's Collections API.
Dependencies
Getting Started
pip install rac_api_client
Usage
In order to use the client in your Python script, you first need to import it and create an instance.
from rac_api_client import Client
client = Client()
This client contains two methods to facilitate working with the RAC's Collections API.
get
sends a GET request for a single object. The URI for that object should be passed as the first argument.
client.get("/collections/WY7fpswEV3oLhyjiArpHES")
get_paged
returns all results for paged content, for example a list of collections or search results.
client.get_paged("/collections")
For both of these methods, parameters can optionally be passed as a dictionary.
client.get_paged("/objects", params={"online": True, "start_date__gte": "1950"})
client.get("/search", params={"query": "yellow fever"})
Development
This repository contains a configuration file for git pre-commit hooks which help ensure that code is linted before it is checked into version control. It is strongly recommended that you install these hooks locally by installing pre-commit and running pre-commit install
.
License
This code is released under the MIT License. See LICENSE.md
for more information.
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
File details
Details for the file rac_api_client-0.1.1.tar.gz
.
File metadata
- Download URL: rac_api_client-0.1.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10e1012408dc1fa76bf6a298eaba172d2ddf51acdbef8adb950b9eba28649212 |
|
MD5 | 451b4b82f2a39bac8dc3d0af818f56be |
|
BLAKE2b-256 | 0b0fc476e429e721aa1ce66bf73b5cf313a0dce92b01b02e459f55910a0b50ca |
File details
Details for the file rac_api_client-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: rac_api_client-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33eedbe680f8a04144b551ec59f455e0891e7fc51329664c638a7a4d8626c71f |
|
MD5 | 104cc6fbc945378a4aa2224561d74165 |
|
BLAKE2b-256 | 80cd3803e71f4f50f79333316f82c11119d418838ff45a1cb4d6dbecf6f51770 |