Skip to main content

jp-diet-search

PyPI Python License

Python client for the National Diet Library Kokkai Kaigiroku Kensaku System (国会会議録検索システム).

This package provides:

  • A plain-vanilla Object API for programmatic access
  • Robust error handling and safe pagination
  • No heavy dependencies or hidden magic

Features

Python Object API

  • Explicit endpoint objects:
    • client.meeting_list
    • client.meeting
    • client.speech
  • Typed query objects (MeetingListQuery, MeetingQuery, SpeechQuery)
  • Automatic pagination with optional total caps
  • Optional on-disk caching

Installation

For development:

uv sync --group dev

For normal use (after PyPI release):

pip install jp-diet-search

Development Workflow

uv sync --group dev        # Install development dependencies
uv run python -m compileall src
uv run --group dev pytest

Python API (Object API)

Basic usage

from jp_diet_search import DietClient
from jp_diet_search.queries import SpeechQuery

client = DietClient(cache_dir=".cache")

query = SpeechQuery(
    any="科学技術",
    maximum_records=100,
)

result = client.speech.search(query, limit_total=5)

print(result["numberOfRecords"])
for record in result.get("records", []):
    print(record.get("speaker"), record.get("date"))

Endpoint overview

client.meeting_list.search(MeetingListQuery(...))
client.meeting.search(MeetingQuery(...))
client.speech.search(SpeechQuery(...))

Returned values are raw JSON dictionaries aggregated across pages.


Project Structure

jp-diet-search/
  src/
    jp_diet_search/
      __init__.py
      client.py
      core.py
      endpoints.py
      queries.py
      cli.py
      exceptions.py
      models.py   # reserved (currently unused)
  tests/
  README.md
  pyproject.toml
  Makefile

Design Notes

  • The public API avoids **kwargs bags in favor of explicit query objects.
  • Internal HTTP and pagination logic lives in a dedicated core layer.
  • models.py is intentionally unused for now; responses are returned as raw JSON.
  • Console scripts are the primary execution model (no python -m required).

License

MIT License.

Metadata

Release files for jp-diet-search 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jp-diet-search 0.2.0
File Size Uploaded Provenance
jp_diet_search-0.2.0.tar.gz 13.9 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for jp-diet-search 0.2.0
File Interpreter ABI Platform
jp_diet_search-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.0 kB

Release files / jp_diet_search-0.2.0.tar.gz

Download URL jp_diet_search-0.2.0.tar.gz
Size 13.9 kB
Tags Source
SHA-256 checksum
How to use checksums
eed4ee16d84d25f0b1f31347ff44c04f675575edaf51cfea4a17a9c6b18df0d3
BLAKE2b-256 checksum
How to use checksums
ce8d65b651b81fe685bc5a519aa87e83e712b1616d73388e9407b500a7f17a31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 3, 2026.

Transparency log

Release files / jp_diet_search-0.2.0-py3-none-any.whl

Download URL jp_diet_search-0.2.0-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69501bbd6c21204a0e6ccc0eb08bc46ec6ff222855a007c0ac777e8824cec9b6
BLAKE2b-256 checksum
How to use checksums
c2a39ed6b46c51dc023400ee2521ebe9cb9e559f264a0f67ffb923018d31b366
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 3, 2026.

Transparency log

Security for jp-diet-search 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for jp_diet_search-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page