{"id":40735386,"url":"https://github.com/slub/txpyfind","last_synced_at":"2026-04-01T18:33:10.484Z","repository":{"id":296599385,"uuid":"527192993","full_name":"slub/txpyfind","owner":"slub","description":"Python Client for TYPO3-find","archived":false,"fork":false,"pushed_at":"2026-03-21T22:40:34.000Z","size":118,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-27T17:56:53.905Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slub.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-08-21T11:57:39.000Z","updated_at":"2026-03-21T22:39:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"0988ed2b-3547-4453-85e4-8033f21c799c","html_url":"https://github.com/slub/txpyfind","commit_stats":null,"previous_names":["slub/txpyfind"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/slub/txpyfind","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slub%2Ftxpyfind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slub%2Ftxpyfind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slub%2Ftxpyfind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slub%2Ftxpyfind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slub","download_url":"https://codeload.github.com/slub/txpyfind/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slub%2Ftxpyfind/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-21T14:40:25.079Z","updated_at":"2026-04-01T18:33:10.470Z","avatar_url":"https://github.com/slub.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"========\ntxpyfind\n========\n\n``txpyfind`` is a Python client and CLI for querying\n`TYPO3-find \u003chttps://github.com/subugoe/typo3-find\u003e`_\n(Solr-based search) instances. It builds URLs with\nTYPO3-find-specific query parameters, fetches responses,\nand parses them.\n\nThree parser classes are included for the native\nTYPO3-find data formats: ``RawSolrResponse``\n(``raw-solr-response``), ``SolrResultsResponse``\n(``json-solr-results``), and ``AllResponse``\n(``json-all``). Custom parser classes can be passed\nto the client for any other format. The plain response\ntext is always available via the ``.plain`` attribute.\n\nSee `slubfind \u003chttps://github.com/slub/slubfind\u003e`_\nfor a real-world implementation with custom query\ntypes and instance-specific response parsing.\n\nInstallation\n============\n\n... via PyPI\n~~~~~~~~~~~~\n\n.. code-block:: bash\n\n   pip install txpyfind\n\n... or from GitHub source\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code-block:: bash\n\n   pip install git+https://github.com/slub/txpyfind.git\n\n\nCommand-Line Usage\n==================\n\nAfter installation, the ``txpyfind`` command is available (also via ``python -m txpyfind``).\n\nQuery\n~~~~~\n\nExecute a search query:\n\n.. code-block:: bash\n\n   txpyfind --url https://katalog.slub-dresden.de query \"manfred bonitz\"\n\nWith a facet filter and pagination:\n\n.. code-block:: bash\n\n   txpyfind --url https://katalog.slub-dresden.de query \"python\" --facet format_de14=\"Book, E-Book\" --page 1 --count 10\n\nMultiple ``--facet`` options can be combined:\n\n.. code-block:: bash\n\n   txpyfind --url https://katalog.slub-dresden.de query \"python\" --facet format_de14=\"Book, E-Book\" --facet language=German\n\nQuery Type\n~~~~~~~~~~\n\nUse ``--type`` to select a query type (e.g. ``author``, ``title``). Valid\nvalues depend on the TYPO3-find instance. Use ``--query-type`` (repeatable)\nto whitelist the types accepted by ``--type``; if omitted, only ``default``\nis allowed:\n\n.. code-block:: bash\n\n   txpyfind --url https://katalog.slub-dresden.de query --query-type default --query-type author --query-type title --type author \"bonitz\"\n\nDocument\n~~~~~~~~\n\nFetch a single document by ID:\n\n.. code-block:: bash\n\n   txpyfind --url https://katalog.slub-dresden.de document --document-path id --export-format json-ld 0-1132486122\n\nScroll\n~~~~~~\n\nFetch all results for a query:\n\n.. code-block:: bash\n\n   txpyfind --url https://katalog.slub-dresden.de scroll \"manfred bonitz\" --batch 10\n\nStream results as JSONL (one JSON object per line), useful for piping:\n\n.. code-block:: bash\n\n   txpyfind --url https://katalog.slub-dresden.de scroll \"manfred bonitz\" --stream | jq .id\n\nShow Request URL\n~~~~~~~~~~~~~~~~\n\nUse ``--show-url`` to print the request URL instead of fetching the response.\nThis works with all subcommands:\n\n.. code-block:: bash\n\n   txpyfind --url https://katalog.slub-dresden.de --show-url query \"python\" --facet format_de14=\"Book, E-Book\"\n\n.. code-block:: bash\n\n   txpyfind --url https://katalog.slub-dresden.de --show-url document --document-path id --export-format json-ld 0-1132486122\n\n.. code-block:: bash\n\n   txpyfind --url https://katalog.slub-dresden.de --show-url scroll \"python\" --batch 10\n\nExport Format\n~~~~~~~~~~~~~\n\nUse ``--export-format`` on the ``query`` subcommand to select the response\nformat (default: ``raw-solr-response``). On the ``document`` subcommand,\n``--export-format`` is required and has no default. The three formats built\ninto TYPO3-find are ``raw-solr-response``, ``json-all``, and\n``json-solr-results``, but any format string accepted by the instance can\nbe used:\n\n.. code-block:: bash\n\n   txpyfind --url https://katalog.slub-dresden.de query --export-format json-solr-results \"manfred bonitz\"\n\nPlain Output\n~~~~~~~~~~~~\n\nUse ``--plain`` to print the raw response text instead of parsed JSON output.\nThis works with the ``query`` and ``document`` subcommands:\n\n.. code-block:: bash\n\n   txpyfind --url https://katalog.slub-dresden.de --plain query \"manfred bonitz\"\n\n.. code-block:: bash\n\n   txpyfind --url https://katalog.slub-dresden.de --plain document --document-path id --export-format json-ld 0-1132486122\n\nCustom Parser\n~~~~~~~~~~~~~\n\nUse ``--parser`` to load a custom parser class by its dotted import path.\nThis allows packages built on top of ``txpyfind`` (like ``slubfind``) to\nuse their own response parsing from the CLI. The class must accept a plain\ntext string as its constructor argument and provide a ``.raw`` attribute\nwith JSON-serializable data (and a ``.plain`` attribute for ``--plain``).\nUse ``--parser none`` to disable parsing entirely and print the raw\nresponse text:\n\n.. code-block:: bash\n\n   txpyfind --url https://katalog.slub-dresden.de --parser slubfind.parser.FincSolrResponse query \"manfred bonitz\"\n\n.. code-block:: bash\n\n   txpyfind --url https://katalog.slub-dresden.de --parser none query \"manfred bonitz\"\n\nEnvironment Variable\n~~~~~~~~~~~~~~~~~~~~\n\nSet ``TXPYFIND_URL`` to avoid repeating the ``--url`` option:\n\n.. code-block:: bash\n\n   export TXPYFIND_URL=https://katalog.slub-dresden.de\n\n.. code-block:: bash\n\n   txpyfind query \"manfred bonitz\"\n\n.. code-block:: bash\n\n   txpyfind document --document-path id --export-format json-ld 0-1132486122\n\nPython Usage Example\n====================\n\n.. code-block:: python\n\n   from txpyfind.client import Find\n   # create Find instance\n   slub_find = Find(\"https://katalog.slub-dresden.de\", document_path=\"id\", export_format=\"json-ld\")\n   # retrieve JSON-LD data (detail view)\n   slub_ld_doc = slub_find.get_document(\"0-1132486122\")\n   # retrieve JSON-LD data (query view)\n   slub_ld_q_default = slub_find.get_query(\"manfred bonitz\")\n   # query with a single facet (dict)\n   slub_find.get_query(\"python\", facet={\"format_de14\": \"Book, E-Book\"})\n   # query with multiple facets (list of dicts)\n   slub_find.get_query(\"python\", facet=[{\"format_de14\": \"Book, E-Book\"}, {\"language\": \"German\"}])\n\n   # access the plain response text\n   result = slub_find.get_query(\"manfred bonitz\")\n   print(result.plain)\n\n   # use a specific built-in parser\n   from txpyfind.parser import RawSolrResponse\n   result = slub_find.get_query(\"manfred bonitz\", parser_class=RawSolrResponse)\n   print(result.num_found, result.docs)\n\n   # use a custom parser class from another package\n   from slubfind.parser import FincSolrResponse\n   slub_find = Find(\"https://katalog.slub-dresden.de\", parser_class=FincSolrResponse)\n\nLicense\n=======\n\nThis project is licensed under the GNU General Public License v3 (GPLv3).\nSee the `LICENSE \u003cLICENSE\u003e`_ file for the full license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslub%2Ftxpyfind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslub%2Ftxpyfind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslub%2Ftxpyfind/lists"}