Skip to main content

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

PyPI - Version
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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sagikoza-1.0.3.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sagikoza-1.0.3-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file sagikoza-1.0.3.tar.gz.

File metadata

  • Download URL: sagikoza-1.0.3.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

Hashes for sagikoza-1.0.3.tar.gz
Algorithm Hash digest
SHA256 d1767046af44b53947b851aa0e8290d2c636b0a24c990f8f1ae74a7ec25a40f5
MD5 718da66504b8fc3c52abad02fb711843
BLAKE2b-256 e94f70f8694ee7da206f4cb4d5138effbdc39361b3cde5d06b73aaf59d79bd92

See more details on using hashes here.

File details

Details for the file sagikoza-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: sagikoza-1.0.3-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

Hashes for sagikoza-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9c76384445d12ec9d83284cd450354dbc44039edfc23bb04ad5b6079a58284fc
MD5 ad0c0573c2d890944f53b122f363df5f
BLAKE2b-256 607c747bcd4907d71681e8d3489d6c479e50140b14d793f0c09f3631d2360453

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page