Python client & CLI for the National Diet Library Minutes Search API (国会会議録検索システム)
Project description
jp-diet-search
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_listclient.meetingclient.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
**kwargsbags in favor of explicit query objects. - Internal HTTP and pagination logic lives in a dedicated core layer.
models.pyis intentionally unused for now; responses are returned as raw JSON.- Console scripts are the primary execution model (no
python -mrequired).
License
MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jp_diet_search-0.2.0.tar.gz.
File metadata
- Download URL: jp_diet_search-0.2.0.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eed4ee16d84d25f0b1f31347ff44c04f675575edaf51cfea4a17a9c6b18df0d3
|
|
| MD5 |
e28b5730ee400478558332704e34280a
|
|
| BLAKE2b-256 |
ce8d65b651b81fe685bc5a519aa87e83e712b1616d73388e9407b500a7f17a31
|
Provenance
The following attestation bundles were made for jp_diet_search-0.2.0.tar.gz:
Publisher:
pypi.yml on yeiichi/jp-diet-search
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jp_diet_search-0.2.0.tar.gz -
Subject digest:
eed4ee16d84d25f0b1f31347ff44c04f675575edaf51cfea4a17a9c6b18df0d3 - Sigstore transparency entry: 2052748045
- Sigstore integration time:
-
Permalink:
yeiichi/jp-diet-search@71bb16bf6a97be8d317cdee0edd76f7144b7a4ea -
Branch / Tag:
refs/heads/main - Owner: https://github.com/yeiichi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@71bb16bf6a97be8d317cdee0edd76f7144b7a4ea -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file jp_diet_search-0.2.0-py3-none-any.whl.
File metadata
- Download URL: jp_diet_search-0.2.0-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69501bbd6c21204a0e6ccc0eb08bc46ec6ff222855a007c0ac777e8824cec9b6
|
|
| MD5 |
c7caaefb8c983409c39f16214ef618b6
|
|
| BLAKE2b-256 |
c2a39ed6b46c51dc023400ee2521ebe9cb9e559f264a0f67ffb923018d31b366
|
Provenance
The following attestation bundles were made for jp_diet_search-0.2.0-py3-none-any.whl:
Publisher:
pypi.yml on yeiichi/jp-diet-search
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jp_diet_search-0.2.0-py3-none-any.whl -
Subject digest:
69501bbd6c21204a0e6ccc0eb08bc46ec6ff222855a007c0ac777e8824cec9b6 - Sigstore transparency entry: 2052748329
- Sigstore integration time:
-
Permalink:
yeiichi/jp-diet-search@71bb16bf6a97be8d317cdee0edd76f7144b7a4ea -
Branch / Tag:
refs/heads/main - Owner: https://github.com/yeiichi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@71bb16bf6a97be8d317cdee0edd76f7144b7a4ea -
Trigger Event:
workflow_dispatch
-
Statement type: