Link integrity support for guillotina
Project description
Guillotina link integrity
The package aims to provide link integrity support for Guillotina.
Features:
- Ability to check for linked content
- Automatically redirect requests when content is renamed or moved
- Manage aliases to content
- Translate resolveuid urls in text
Dependencies
- Python >= 3.6
- Guillotina
- PG/Cockroachdb
Installation
This example will use virtualenv:
python -m venv .
./bin/pip install .[test]
Running
Running Postgresql Server:
docker run --rm -e POSTGRES_DB=guillotina -e POSTGRES_USER=guillotina -p 127.0.0.1:5432:5432 --name postgres postgres:9.6
Most simple way to get running:
./bin/guillotina
API
The package provides some high level APIs for interacting with content.
Working with linked content:
import guillotina_linkintegrity as li
await li.get_links(ob)
await li.get_links_to(ob)
await li.add_links(ob, [ob2, ob3])
await li.remove_links(ob, [ob2, ob3])
await li.update_links_from_html(ob, content)
How about aliases:
import guillotina_linkintegrity as li
await li.get_aliases(ob)
await li.add_aliases(ob, ['/foo/bar'])
await li.remove_aliases(ob, ['/foo/bar'])
# what about aliases from parents that might affect it?
await li.get_inherited_aliases(ob)
Translate uid linked content:
import guillotina_linkintegrity as li
result = await li.translate_links(content)
1.0.2 (2018-09-26)
-
Add
@links-to
endpoint and utils.get_links_to [vangheem] -
Do not fail when using dummy storage [vangheem]
1.0.1 (2018-09-26)
- Fix imports to match docs [vangheem]
1.0.0 (2018-09-25)
- initial release
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
Close
Hashes for guillotina_linkintegrity-1.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8eb744e0a8d5f9b10ddad48e2fa7c8be361a02ed421974f1dd6db298a35c5034 |
|
MD5 | 9432a3d01963ed17aed2e4511e150f19 |
|
BLAKE2b-256 | ccd4136ff463f89c030a16e07376c3fcf93a2e2124922700e0480cc62c5189f3 |
Close
Hashes for guillotina_linkintegrity-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d4e89c4241f932c2bb97d147772c848dfd624faac1020b3d653320fb12dc33a |
|
MD5 | f2018b4f485ad66e67bc17154a5b29cd |
|
BLAKE2b-256 | 5f8b7a8edada2d8f347169b518fab8f91bd0a7d6d2b9ed75bcac41e1a3d15c69 |