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.1.tar.gz (18.8 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.1-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: moneywiz_db_api-0.1.1.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for moneywiz_db_api-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2b37c384831d3aa8ca6e4e750a28abb0114fa9cff75edaa27fc3ebe81f6eaada
MD5 7f4efef30d4c7e9cdad1ad5bbcd8fd8f
BLAKE2b-256 9393ffb31d44867f371597cf74a1f1498ab9ed537f93f6272828dd731c246988

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for moneywiz_db_api-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 60a07e5385e1aa22ef757d3ad9e39937f0765d95cbf39ce78c7ed480fc02e10c
MD5 64e5c0c603dadaee2eea3f017dc3aded
BLAKE2b-256 287a7d2316391b3657f30d6bda84f874fd07d39d6349599f81732ee7fbb04590

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