https://github.com/gleasonw/gallica-getter
JSON API proxy for the French National Archive (context) and Gallicagram (n-gram series data)
https://github.com/gleasonw/gallica-getter
gallica history json-api python
Last synced: 3 months ago
JSON representation
JSON API proxy for the French National Archive (context) and Gallicagram (n-gram series data)
- Host: GitHub
- URL: https://github.com/gleasonw/gallica-getter
- Owner: gleasonw
- Created: 2023-03-23T23:11:13.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-11-16T00:17:38.000Z (7 months ago)
- Last Synced: 2025-12-16T18:44:08.583Z (6 months ago)
- Topics: gallica, history, json-api, python
- Language: Python
- Homepage:
- Size: 6.54 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gallica-getter
Find documents where a word occurs, context for the occurrence, full text for OCR document pages. Compose Gallica services with service-specific classes.
Alongside Gallica wrappers, this project contains a JSON API. Deploy this API anywhere. Railway, Google App Engine, AWS, Fly.io, a Raspberry PI.
## Setup
Build your Python venv in the cloned gallica-getter directory:
```
virtualenv venv
```
Activate the venv:
```
source venv/bin/activate
```
Install the project dependencies from the requirements file:
```
python -m pip install -r requirements.txt
```
Run the FastAPI app locally:
```
python -m uvicorn main:app --reload
```
The server should be running at port 8000. Try a request:
```
http://localhost:8000/api/gallicaRecords?terms=portland&source=periodical&link_term=oregon&link_distance=20
```
## Test
An end-end test suite calls each Gallica wrapper endpoint and verifies the result.
```
python -m pytest app/tests/gallicaE2E.py
```