Skip to main content

We love AJuM!

Release License Issues Status

This small library is a Python wrapper for ajum.de, querying the book review database of the german working group for children's and youth literature and media ("Arbeitsgemeinschaft Jugendliteratur und Medien" or "AJuM"), which is part of the german Education and Science Worker's Union ("Gewerkschaft Erziehung und Wissenschaft" or "GEW").

We deem their work to be invaluable for kindergartens, (pre)schools, universities and other educational institutions. We are thankful for AJuM's commitment and want to give something back by spreading the word and provide an easy way to interact with their review database.

Note: We DO NOT want to disrupt their services in any way, so by default the responsible function sleep()s for three seconds after each API call. Furthermore, as downloading reviews just to build an index file means making A LOT of requests, we included index.json. It was created using strict mode (which means that invalid ISBNs were skipped) and contains all review IDs per ISBN - currently totalling 44757 (valid) ISBNs with 83710 reviews (averaging 1.87 reviews per ISBN).

Getting started

Running setup.bash will install all dependencies inside a virtual environment, ready for action:

# Set up & activate virtualenv
virtualenv -p python3 venv

# shellcheck disable=SC1091
source venv/bin/activate

# Install dependencies
python -m pip install --editable .

From there, it's easy to roll out your own script:

from src.ajum import Ajum

# Initialize object
ajum = Ajum()

# Fetch review data
data = ajum.get_review('SOME_ID')

For more examples, have a look at src/cli.py and src/ajum.py to get you started - feedback appreciated, as always!

Usage

The following commands are available:

$ ajum --help
Usage: ajum [OPTIONS] COMMAND [ARGS]...

  Tools for interacting with the 'AJuM' database.

Options:
  -t, --timer FLOAT      Waiting time after each request.
  -f, --is_from TEXT     "From" header.
  -u, --user-agent TEXT  User agent.
  -v, --verbose          Enable verbose mode.
  --version              Show the version and exit.
  --help                 Show this message and exit.

Commands:
  backup  Backs up remote database
  build   Builds local database DB_FILE from INDEX_FILE
  clear   Removes cached results files
  index   Exports index of reviews per ISBN to INDEX_FILE
  query   Queries remote database
  show    Shows data of given REVIEW
  stats   Shows statistics
  update  Updates local database

Commands

backup

.. remote database:

$ ajum backup --help
Usage: ajum backup [OPTIONS]

  Backs up remote database

Options:
  -a, --archived        Include all reviews.
  -h, --html-file PATH  HTML results file.
  --help                Show this message and exit.

index

.. reviews per ISBN:

$ ajum index --help
Usage: ajum index [OPTIONS] [INDEX_FILE]

  Exports index of reviews per ISBN to INDEX_FILE

Options:
  -s, --strict        Whether to skip invalid ISBNs.
  -j, --jobs INTEGER  Number of threads.
  --help              Show this message and exit.

build

.. local database:

$ ajum build --help
Usage: ajum build [OPTIONS] [INDEX_FILE] [DB_FILE]

  Builds local database DB_FILE from INDEX_FILE

Options:
  -j, --jobs INTEGER  Number of threads.
  --help              Show this message and exit.

show

.. review data for given ID:

$ ajum show --help
Usage: ajum show [OPTIONS] REVIEW

  Shows data of given REVIEW

Options:
  --help  Show this message and exit.

query

.. remote database for given search terms:

$ ajum query --help
Usage: ajum query [OPTIONS]

  Queries remote database

Options:
  -s, --search-term TEXT  Search term.
  -t, --title TEXT        Book title.
  -f, --first-name TEXT   First name of author.
  -l, --last-name TEXT    Last name of author.
  -i, --illustrator TEXT  Name of illustrator.
  -a, --all-reviews       Include all reviews.
  -w, --wolgast           Include only Wolgast laureates.
  --help                  Show this message and exit.

clear

.. cached results files:

$ ajum clear --help
Usage: ajum clear [OPTIONS]

  Removes cached results files

Options:
  --help  Show this message and exit.

Disclaimer

For legal reasons (see here) we only provide you with the means to download reviews. We assume neither ownership nor intellectual property of any review - they are publically available on the AJuM website and are subject to their legal sphere alone.

Happy coding!

:copyright: Fundevogel Kinder- und Jugendbuchhandlung

Metadata

Release files for we-love-ajum 0.7.3

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

Source distribution (sdist)

Source distribution for we-love-ajum 0.7.3
File Size Uploaded
we-love-ajum-0.7.3.tar.gz 27.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for we-love-ajum 0.7.3
File Interpreter ABI Platform
we_love_ajum-0.7.3-py3-none-any.whl Python 3 none any Details

Total release size: 53.2 kB

Release files / we-love-ajum-0.7.3.tar.gz

Download URL we-love-ajum-0.7.3.tar.gz
Size 27.0 kB
Tags Source
SHA-256 checksum
How to use checksums
55877be5732c95982028d8a0fd737c0a3cc28a249cde700bb1f676a42cf009be
BLAKE2b-256 checksum
How to use checksums
69c1f8a49850f41ccfe9aef93ffdf2739926e2296c07bd2a4a54cf9ae6d819b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.5

Release files / we_love_ajum-0.7.3-py3-none-any.whl

Download URL we_love_ajum-0.7.3-py3-none-any.whl
Size 26.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74e8bebbf11f1ed6ead778afb5b7676ce6dc51712e620fb35a9ea50a37dacae1
BLAKE2b-256 checksum
How to use checksums
9d06d559d5a48e35b5c68a550cba43b045a7571446e35bc89d46dcfed381cda2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.7.3 This release

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