Skip to main content

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


Download files

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

Source Distribution

rac_api_client-0.1.3.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

rac_api_client-0.1.3-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file rac_api_client-0.1.3.tar.gz.

File metadata

  • Download URL: rac_api_client-0.1.3.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for rac_api_client-0.1.3.tar.gz
Algorithm Hash digest
SHA256 3c3f8d8ffbfa60b9a2bd062fc157616020843477f7ab338f00217e55f87f95e2
MD5 58352d55620a9bc0c5e5cef456195ef0
BLAKE2b-256 ae97b47381cae4358435a1f5dcbc78719ca1618c75bbd15a558a8fc61ae37ff4

See more details on using hashes here.

Provenance

The following attestation bundles were made for rac_api_client-0.1.3.tar.gz:

Publisher: pythonpublish.yml on RockefellerArchiveCenter/rac_api_client

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

File details

Details for the file rac_api_client-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: rac_api_client-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for rac_api_client-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 995bea8f1215a08a56b1b226d7419af39b100c82f5658102618c6ee12f2c8977
MD5 2d2133a6be2a4d1a9e954070e2eeeb70
BLAKE2b-256 dd8f5029ff9d8639d5c065f44631e333792bef0d7d78e94e033c4c8b3b397c48

See more details on using hashes here.

Provenance

The following attestation bundles were made for rac_api_client-0.1.3-py3-none-any.whl:

Publisher: pythonpublish.yml on RockefellerArchiveCenter/rac_api_client

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