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.

Build Status

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("/collections")

For both of these methods, parameters can optionally be passed as a dictionary.

client.get("/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.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

rac_api_client-0.1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rac_api_client-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for rac_api_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e7ba5efba9be334989a8767b1d8f811079411df441d6b2f001ca191eccfd0708
MD5 aaba1b67dcec6964aff2d9ed72d4369f
BLAKE2b-256 31dbaec367db2a5927fdf232eb89a238c229b8738d4e57689a26ec24de13b544

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rac_api_client-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for rac_api_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8eaa6ed36a79ad0667f0cd5d90afd7f171b884164f31688a922086d72928d25f
MD5 6f91cbfb3d2073733c97e6afc7d2e6ce
BLAKE2b-256 e6201e47a282872d31d5a2c2419a07a1e8e10ec6fc685bcc01230a82c111a86b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page