This package was renamed to openaleph-client for clarity.
OpenAleph
Python client for the OpenAleph data API.
Installation
pip install openaleph-client
Command-Line Interface
All commands share the same global options:
openaleph --host URL --api-key KEY [--retries N] <command> [options]
--hostOpenAleph API host URL (default fromOPAL_HOSTenv var)--api-keyAPI key for authentication (default fromOPAL_API_KEYenv var)--retriesNumber of retry attempts on server failure (default: 5)
crawldir
Recursively upload the contents of a folder to a collection, with optional pause/resume:
openaleph crawldir -f <foreign-id> [--resume] [--parallel N] [--noindex] [--casefile] [-l LANG] <path>
-f, --foreign-idForeign-ID of the target collection (required)--resumeResume from an existing state database; omit to start fresh (this will delete the state file!)-p, --parallel NNumber of parallel upload threads (default: 1)-i, --noindexSkip indexing on ingest--casefileTreat files as case files-l, --language LANGLanguage hints (ISO 639; repeatable)
fetchdir
Download all entities in a collection (or a single entity) into a folder tree:
openaleph fetchdir -f <foreign-id> [-e <entity-id>] [-p <path>] [--overwrite]
Other commands
reingestRe-ingest all documents in a collectionreindexRe-index all entities in a collectiondeleteDelete a collection and its contentsflushDelete all contents of a collectionwrite-entityIndex a single entity from stdinwrite-entitiesBulk-index entities from stdinstream-entitiesStream entities to stdoutentitysetsList entity setsentitysetitemsList items in an entity setmake-listCreate a new list entity set
State Persistence
When running crawldir, OpenAleph maintains a small SQLite database file in your crawl root:
<crawl-root>/.openaleph_crawl_state.db
- Purpose: track which files have already been successfully uploaded.
- Resume support:
- Passing
--resumeskips any files recorded in this DB. - Omitting
--resumedeletes any existing state DB and starts fresh.
- Passing
- Thread-safe: uploads are recorded under a lock to support parallel threads.
- Update datasets later: The db file stays in the directory, allowing you to update your local repository at any time and only sync the new files to OpenAleph.
Ignore File
You can create a file named:
<crawl-root>/.openalephignore
and list glob patterns for any files or directories you want to skip entirely:
# Skip hidden files
.*
# Common junk
.DS_Store
Thumbs.db
# Temporary directories
tmp/
build/
# Log files
*.log
- Patterns are matched against the relative path of each file or folder.
- A pattern ending in
/only matches directories (and their contents). - Blank lines and lines beginning with
#are ignored. - Anything matched here is never enqueued or uploaded.
- the
.openalephignorefile itself is ignored by default, and so is the state file
Final Report
After a crawl completes, OpenAleph will print a summary to the console. If any failures occurred, by default a file is written to:
<crawl-root>/.openaleph-failed.txt
It contains one relative path per line for each file that could not be uploaded permanently. You can inspect this file to retry or investigate failures.
Metadata
Release files for openaleph 1.0.1.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| openaleph-1.0.1.post1.tar.gz | 18.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| openaleph-1.0.1.post1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.3 kB
Release files / openaleph-1.0.1.post1.tar.gz
| Download URL | openaleph-1.0.1.post1.tar.gz |
|---|---|
| Size | 18.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b8b00560a3ff52983af7ebf3e09856f16a5ab267fdec6d3f55408db245305204
|
|
BLAKE2b-256 checksum How to use checksums |
a422296aea9c33d45464356b646df06cdd42c1d7c9929055805d320119ea403c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / openaleph-1.0.1.post1-py3-none-any.whl
| Download URL | openaleph-1.0.1.post1-py3-none-any.whl |
|---|---|
| Size | 20.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
017f628ca2aae48ab5f68bfba29d661b29337eecba045948137e51258abecfec
|
|
BLAKE2b-256 checksum How to use checksums |
dd48caa138335b2cc0ccfef85c95cf30a62ca187e72523cc5d19e0682ad80a25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|