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

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.

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 a last 3 monthes notice

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': 'カ)エドムラサキ'}, ... ]

Referece

Logging 設定例

sagikozaはPython標準のloggingモジュールを利用しています。トラブルシュートや詳細な動作確認を行いたい場合は、以下のようにlogging設定を行うことで、詳細なログを出力できます。

import logging

logging.basicConfig(
    level=logging.INFO,  # 必要に応じてDEBUGなどに変更
    format='%(asctime)s %(levelname)s %(name)s %(message)s'
)

import sagikoza
sagikoza.fetch()

デフォルトではWARNING以上のみ出力されます。詳細なトレースが必要な場合はlevel=logging.DEBUGにしてください。

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.0.tar.gz (16.2 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.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sagikoza-1.0.0.tar.gz
  • Upload date:
  • Size: 16.2 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.0.tar.gz
Algorithm Hash digest
SHA256 70d57b75b0977ca330decdf951c4f7ae5ac848e22740a52fd2bd505ce5cad5f0
MD5 62602e46f9498985d6f7aef435689e27
BLAKE2b-256 8c7b9dbd63ec4f191144b1142cb8faf8edb1f881f3e4b0116ab286e6a8b6076f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sagikoza-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 40f382ce2e93710dabcfa1b72022314a84a2e636dc4f121bc21b77830c36a101
MD5 9526d35d26a7216720816345c8dc037f
BLAKE2b-256 83cbbbd321f7eb901b3ebd5db86c90bb5bf0dc2c47a0a39bc45e11f5c3e90575

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