A Python library for crawling and retrieving all notices published under Japan’s Furikome Sagi Relief Act, with support for both full data extraction and incremental updates.
Project description
sagikoza
A Python library for crawling and retrieving all notices published under Japan’s Furikome Sagi Relief Act, with support for both full data extraction and incremental updates.
日本語版の説明はこちらを参照ください
Features
- Automatically retrieves public notices under the Furikome Sagi Relief Act
- Supports fetching by year or for the most recent 3 months
- Incremental data retrieval
- Returns data as a list of dictionaries
Supported Python Versions
- Python 3.8 or later
Installation
sagikoza is available on pip installation.
$ python -m pip install sagikoza
GitHub Install
Installing the latest version from GitHub:
$ git clone https://github.com/new-village/sagikoza
$ cd sagikoza
$ python setup.py install
Usage
This section describes how to use this library.
Get a specific year's notice
Fetch notices published under the Furikome Sagi Relief Act from 2008 onwards. Returns the notices for the year passed as an argument as 'YYYY'.
>>> import sagikoza
>>> mule_accounts = sagikoza.fetch('2025')
>>> print(mule_accounts)
[{'doc_id': '12345', 'link': '/pubs_basic_frame.php?inst_code=1234&p_id=06&pn=123456&re=0', 'id': '1234-5678-9012', 'process': '債権消滅手続開始', 'bank_name': '大江戸銀行', 'branch_name': '丸の内支店', 'branch_code': '234', 'type': '普通預金', 'account': '1234567', 'name': 'カ)エドムラサキ'}, ... ]
Get the last 3 months' notices
Fetch notices published under the Furikome Sagi Relief Act during the most recent three-month period.
>>> import sagikoza
>>> mule_accounts = sagikoza.fetch()
>>> print(mule_accounts)
[{'doc_id': '12345', 'link': '/pubs_basic_frame.php?inst_code=1234&p_id=06&pn=123456&re=0', 'id': '1234-5678-9012', 'process': '債権消滅手続開始', 'bank_name': '大江戸銀行', 'branch_name': '丸の内支店', 'branch_code': '234', 'type': '普通預金', 'account': '1234567', 'name': 'カ)エドムラサキ'}, ... ]
Logging Example
sagikoza uses Python's standard logging module. To troubleshoot or verify detailed behavior, you can configure logging as shown below to output detailed logs.
import logging
logging.basicConfig(
level=logging.INFO, # Change to DEBUG if more detailed logs are needed
format='%(asctime)s %(levelname)s %(name)s %(message)s'
)
import sagikoza
sagikoza.fetch()
By default, only logs with a level of WARNING or higher are displayed. If you need detailed traces, set level=logging.DEBUG.
Contribution
Bug reports, feature requests, and pull requests are welcome. Please use GitHub Issues or Pull Requests.
License
This project is licensed under the Apache License. See the LICENSE file for details.
This software uses BeautifulSoup, which is licensed under the MIT License. See the LICENSE file for details.
Notes
- This library retrieves data from public sources. Changes to the source website may affect functionality.
- The accuracy and completeness of the retrieved data are not guaranteed. Please use it together with official information.
Referece
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 sagikoza-1.0.2.tar.gz.
File metadata
- Download URL: sagikoza-1.0.2.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a41dd3f63be26e928c7f5c1daa0f537709dbf3005e78ac91ab01017e41c871c
|
|
| MD5 |
54517d4862db04219933b40b983191a2
|
|
| BLAKE2b-256 |
6ef2a45cbceada8c61f2899ab193fd0df3495266f7bda0c35e412babd8fd77ab
|
File details
Details for the file sagikoza-1.0.2-py3-none-any.whl.
File metadata
- Download URL: sagikoza-1.0.2-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aebd4d052738ad01d1bdfe2754bb4d7e90caefb565830d541d486148118a55ab
|
|
| MD5 |
769b78bed295ea7ee7d88a8d27ba626c
|
|
| BLAKE2b-256 |
0ebe3bcca7a5552c8915d317c28748c9fa50153b1cf58ba5b51b3b4c3f918967
|