Skip to main content

A Python api to access moneywiz sqlite database (fork of moneywiz-api)

Project description

moneywiz-db-api

这是 moneywiz-api 的 fork 版本。 原项目已数月未更新,此版本用于持续维护和功能增强。感谢原作者 iLeoDo 的贡献。

Static Badge PyPI

A Python API to access MoneyWiz Sqlite database.

Get Started

pip install moneywiz-db-api
# 或使用 uv
uv add moneywiz-db-api
from pathlib import Path
from moneywiz_api import MoneywizApi

# macOS 默认数据库路径
DB_PATH = Path("~/Library/Containers/com.moneywiz.personalfinance"
               "/Data/Documents/.AppData/ipadMoneyWiz.sqlite").expanduser()

with MoneywizApi(DB_PATH) as api:
    # 获取所有交易
    transactions = api.transaction_manager.get_all()

    # 获取所有分类
    categories = api.category_manager.get_all()

    # 查询无分类交易
    uncategorized = api.transaction_manager.get_uncategorized()

# 或指定其他路径
with MoneywizApi(Path("/path/to/ipadMoneyWiz.sqlite")) as api:
    record = api.accessor.get_record(record_id)
    print(record)

Interactive CLI

本包提供交互式命令行工具 moneywiz-cli

# 使用默认数据库路径
moneywiz-cli

# 指定数据库路径
moneywiz-cli /path/to/moneywiz.sqlite

文档

完整接口参考(含所有 Manager 方法、数据模型字段、使用示例及 AI Agent 调用指引):

docs/api-reference.md

Contribution

This project is in very early stage, all contributions are welcomed!

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

moneywiz_db_api-0.1.3.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

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

moneywiz_db_api-0.1.3-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file moneywiz_db_api-0.1.3.tar.gz.

File metadata

  • Download URL: moneywiz_db_api-0.1.3.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for moneywiz_db_api-0.1.3.tar.gz
Algorithm Hash digest
SHA256 2a8a1d308ad4096ab232609ffe739e0b5f90bc110a9493cdb4e2e89eb4ea2a76
MD5 7750f236b9a5c66adefb983dec1b087d
BLAKE2b-256 03c48e4b32865dae9cbc531ce6b52d045e116559376b1627cdfad00561abd2ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for moneywiz_db_api-0.1.3.tar.gz:

Publisher: python-publish.yml on philo-veritas/moneywiz-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file moneywiz_db_api-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: moneywiz_db_api-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for moneywiz_db_api-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 042e5188adab3a56ae935a5e6f756433f6d6cc8d5a60798960f77be47ea989d1
MD5 27b5c0da91d4b80cba9bb52dc28c210a
BLAKE2b-256 02662c18a5673ee4e6b3aa623620b820bfd603e498ad5825e9705df10f959242

See more details on using hashes here.

Provenance

The following attestation bundles were made for moneywiz_db_api-0.1.3-py3-none-any.whl:

Publisher: python-publish.yml on philo-veritas/moneywiz-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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