Skip to main content

Digital Archive

PyPI codecov PyPI - Python Version Documentation Status

A Python client for the Wilson Center's Digital Archive ("DA") of historical primary sources. This library provides an ORM for searching and accessing documents and other resources in the Digital Archive.

Installation

The client is available on pypi. It requires python 3.7+.

pip install digitalarchive

Usage

>>> import digitalarchive

# Search for documents:
>>> soviet_docs = digitalarchive.Document.match(title="soviet").all()

# Collections and other resource types are also searchable.
>> soviet_collections = digitalarchive.Collection.match(name="soviet")

# Grab a single, specific document:
>>> document = digitalarchive.Document.match(id="112566").first()

# Pull transcripts, translations, and original scans of documents:
>>> document.hydrate()
>>> document = test_doc.transcripts[0].html

# Pull the metadata and other assets for an entire resultset.
>>> chernobyl_docs = digitalarchive.Document.match(title="chernobyl")
>>> chernobyl_docs.hydrate()
>>> chernobyl_docs.all()

# Or just download all the documents!
>>> all_documents = digitalarchive.Document.match().all()

Complete documentation for the client and the Digital Archive's models are available here.

Disclaimers

  • This is an unofficial library. I am not presently affiliated with the Wilson Center. I understandthat the API is unlikely to change in the near future, but I cannot guarantee that this library won't break without warning.
  • If you plan to scrape the DA, please be respectful.

Planned Features

  • Support for searching by date range.
  • Asynchronous hydration of large result sets.
  • For Collections, inlcude keyword hits in short_description for searches. (modify collection searches to use the record.json instead of collection.json endpoint.

Metadata

Release files for digitalarchive 0.1.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for digitalarchive 0.1.12
File Size Uploaded
digitalarchive-0.1.12.tar.gz 15.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for digitalarchive 0.1.12
File Interpreter ABI Platform
digitalarchive-0.1.12-py3-none-any.whl Python 3 none any Details

Total release size: 30.6 kB

Release files / digitalarchive-0.1.12.tar.gz

Download URL digitalarchive-0.1.12.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5a7190a575b1a881038a3917dc3d7fa24736016b28fe92bc2f8601c48bf9c7a3
BLAKE2b-256 checksum
How to use checksums
e09cac119c0b3e424dd9e798d91e63011fa789d089ffbef0262758eb26f26bb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release files / digitalarchive-0.1.12-py3-none-any.whl

Download URL digitalarchive-0.1.12-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
91507ad575e741bf0f49cee369f1bf857e63ed8592b5c8da14dc04aecd375c7b
BLAKE2b-256 checksum
How to use checksums
b881013fadaa1c53495ffe44d9f7b3b563ae9857d9610dbc34dcf295e9aa1f9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release history Release notifications | RSS feed

This release

0.1.12 This release

2 release files

0.1.11

1 release file

0.1.10

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page