Metadata-Version: 2.1
Name: txpyfind
Version: 0.1.1
Summary: enables Pythonic access to data exports from TYPO3-find
Author: Donatus Herre
Author-email: donatus.herre@slub-dresden.de
License: GPLv3
Project-URL: homepage, https://github.com/slub/txpyfind
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Description-Content-Type: text/x-rst
License-File: LICENSE

========
txpyfind
========

``txpyfind`` enables access to data exports from `TYPO3-find <https://github.com/subugoe/typo3-find>`_
in Python. Details on the TYPO3-find setup required for data exports can be found in the section
`Data export <https://github.com/subugoe/typo3-find#data-export>`_ in the README file of that repository.

The three JSON formats ``json-all``, ``json-solr-results`` and ``raw-solr-response`` are already available
in the TYPO3 extension, see the
`partials <https://github.com/subugoe/typo3-find/tree/main/Resources/Private/Partials/Formats>`_ used
to create the three formats.

You can use the client class available in this Python package to query these exports. A simple parser
for the returned JSON objects is also available.

Installation
============

... via PyPI
~~~~~~~~~~~~

.. code-block:: bash

   pip install txpyfind

... or from Github source
~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: bash

   pip install git+https://github.com/slub/txpyfind.git


Usage Example
=============

.. code-block:: python

   from txpyfind.client import Find
   # create Find instance
   slub_find = Find("https://katalog.slub-dresden.de", document_path="id", export_format="json-ld")
   # retrieve JSON-LD data (detail view)
   slub_ld_doc = slub_find.get_document("0-1132486122")
   # retrieve JSON-LD data (query view)
   slub_ld_q_default = slub_find.get_query("manfred bonitz")
   # ...

See `slubfind <https://github.com/slub/slubfind>`_ for a full setup example.
