Skip to main content

A Python library which can be used to interact with the Dutch government's publication repository.

Project description

PyPublicaties

PyPublicaties is a Python library that facilitates easy access to the 'officielepublicaties' collection through the SRU 2.0 interface provided by the Dutch government. This library simplifies the process of querying, retrieving, and managing 'officiële publicaties' with just a few lines of code.

Features

  • Easy construction of queries for searching within the 'officielepublicaties' collection.
  • Retrieval of publications with options to limit the number of records.
  • Direct access to publication details such as identifiers and titles in a Python-friendly way.

Installation

Install PyPublicaties using pip:

pip install PyPublicaties

Quick Start

Here's a simple example to get you started with PyPublicaties:

from PyPublicaties import retrieve_publications

query_list = [
    'w.subrubriek=Stemmingen',
    'dt.identifier=h-tk-20192020-46-12'
]

publications = retrieve_publications(query_list=query_list, max_records=100, start_record=1)

publication = publications[0]

This code will search for publications under the 'Stemmingen' subcategory and print details for up to 100 of them. The function always returns a list of objects

This allows for easy interaction in an object oriented way. For example, this code will access the title of the first retrieved result:

print(publication.title[0])
Stemming Wet wijziging woonplaatsbeginsel

For consistency, every variable of the object is returned as a list since some variables hold multiple values.

Documentation

For more detailed information on all the capabilities, documentation will be made available in a later stadium.

Contributing

Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request with your changes.

Support

If you encounter any issues or have questions, please submit an issue on the GitHub issues page.

License

PyPublicaties is released under the MIT License. See the LICENSE file for more details.

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

PyPublicaties-0.2.3.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

PyPublicaties-0.2.3-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file PyPublicaties-0.2.3.tar.gz.

File metadata

  • Download URL: PyPublicaties-0.2.3.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for PyPublicaties-0.2.3.tar.gz
Algorithm Hash digest
SHA256 1b524cf2b1cab80456bd1c865cb59bd3c5bf1c28cc6b808dfd436b1ee095c267
MD5 c98a106ed0453c73636ff5e11f1a85f6
BLAKE2b-256 88e502cca8e94895d29394e96a0455f5b4c0eb2211b33a43c0e9ab7ff819df3d

See more details on using hashes here.

File details

Details for the file PyPublicaties-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: PyPublicaties-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for PyPublicaties-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b6033e3ed76ddb016c238a3a3ac8e1626aa91fc3083b7632ac9fde67eaa331a8
MD5 cee736e7a294a949e401a02d8a35774b
BLAKE2b-256 23c708e8ffc524e01c14cc0a85350d0327e76d5f8bbeb2603e352b89d721a08a

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