Skip to main content

PyCSW monkey patched for Slovak national catalogue service

Project description

PyCSW RPI pycsw-rpi

Monkey patched pycsw for Slovak national catalogue service.

Check original pycsw documentation for more details.


Setup

Use exactly like original pycsw

Install

pip install --user pycsw-rpi

Create configuration file

Configuration file is not distributed with package.

Sample configuration can be downloaded from <<url>>

Administrative command (CLI)

pycsw_rpi-admin script is installed with package in $PATH, this script is replacement for original pycsw-admin.py script supporting modified beahaviour and can be used exactly like original one.

Create database

pycsw_rpi-admin -c setup_db -f <<pconfiguration_file>>

Load records

pycsw_rpi-admin -c load_records -f <<pconfiguration_file>> -p <<path_to_records_directory>>

Check original documentation for pycsw-admin.py administrative command.

Run "dev" self contained (toy) server

python -m pycsw_rpi.wsgi

Deploy as WSGI application

pycsw_rpi.wsgi module contains WSGI application object (function) ready to be deployed with WSGI server (e.g. gunicorn, uwsgi). No WSGI server is installed with this package as dependecy.

To deploy with gunicorn:

# `gunicorn` package need to installed separately
pip install --user gunicorn
gunicorn pycsw_rpi.wsgi:application

Modifications implemented (via monkey patches) to original pycsw

Added queryables to APISO plugin:

  • rpi:OrganizationUUID
  • rpi:IsViewable
  • rpi:IsSearchable

Modified APISO queryables:

  • apiso:ParentIdentifier support for gmx:Anchor encoding added
  • apiso:SpecificationTitle support for gmx:Anchor encoding added
  • apiso:Subject support for gmx:Anchor encoding added in keywords parsing

Transaction web hook:

On succesfull insert/delete CSW transaction HTTP POST request is made on transactions_webhook_url set in manager section in configuration file. Request body contains json list of executed transaction description

[
    {
        "transaction": <transaction_type>,
        "id": <metadata_record_identifier>,
        "type": <metadata_record_type>
    },
    ...
]

If transaction_webhook_url is not set in configuration file webhook is skipped.

Feature is implemented as monkey patch of pycsw.core.repository.Repository.insert and pycsw.core.repository.Repository.delete methods.

Contributions

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycsw_rpi-0.1.5.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycsw_rpi-0.1.5-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file pycsw_rpi-0.1.5.tar.gz.

File metadata

  • Download URL: pycsw_rpi-0.1.5.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/5.15.0-119-generic

File hashes

Hashes for pycsw_rpi-0.1.5.tar.gz
Algorithm Hash digest
SHA256 ef0f332ddbe2e45b4d0bba04f86a6b534e12bd1decefe0008b26fc4ceffaefd9
MD5 bf4e8677018be706e462805446a50ab8
BLAKE2b-256 2b4515a0f3eccf5eea7824e675ca181d42007fd7a04c502bcf630697b6f32b27

See more details on using hashes here.

File details

Details for the file pycsw_rpi-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: pycsw_rpi-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/5.15.0-119-generic

File hashes

Hashes for pycsw_rpi-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 34120f72cab34f79149283bb24ac5b1742758b36d3bde5ad5aa43ad8e187d623
MD5 b89d868b0f7c4c57d4a41311ed94c2f7
BLAKE2b-256 d8fb7462da495c774f6a65cf618a1619911d0e590bf8f585952165cc81cc01ac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page