A client to interact with freud-net API
Project description
Freud API Crawler
A client to interact with freud-net API
install
- create a virtual environment and install the package with
pip install freud_api_crawler
- provide FRD_USER (freud-net username) and FRD_PW (freud-net password) as environment varibles, e.g. by
- create a file called
env.secret
to store you freud-net api credentials - run
./set_env_variables.sh
- create a file called
example env.secret
FRD_USER=username
FRD_PW=password
usage
Download a Work
download_work -s . -w 2da622da-de12-46e4-bb1d-c9c4a7ae877e
-s
path to save the created files into;.
will write the files into./werke/...
-w
the Drupal-API-ID of the Werk to process (see below on how to get those IDs)
dev
-
clone the repo
-
create virtual env
-
install dev-depenencies
pip install -r requirements_dev.txt
-
install the package (so you have the actual dependencies as well)
pip install -e .
-
run test with
coverage run -m pytest -v
-
create test-report
coverage report
orcoverage html
api-utils
get work by title
https://www.freud-edition.net/jsonapi/node/werk?filter[field_titel.value]=%C3%9Cber%20den%20Traum https://www.freud-edition.net/jsonapi/node/werk?filter[field_titel.value]=Über den Traum
get manifestaion by node id
this ID can be taken from edit-url, e.g. https://www.freud-edition.net/node/51190/edit
https://www.freud-edition.net/jsonapi/node/manifestation?filter[drupal_internal__nid]=51190
https://www.freud-edition.net/jsonapi/node/manifestation?filter[drupal_internal__nid]=38946 https://www.freud-edition.net/node/38946/edit
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for freud_api_crawler-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a49c24c269a3f46b22f976cf968b25cdf019606f814543623c4589b8dd3ee5d9 |
|
MD5 | 88848507af9014e41d22020ba21374aa |
|
BLAKE2b-256 | 2a11e403bb8f5c3efd3cd58724c41d24177a0a7e94e34ce1eb419be68a64cfa1 |