Skip to main content

Smart ledger that takes care of your expenses

Project description

QuickLedger

QuickLedger is a fast, intuitive, CLI-first expense tracker built with Python and Typer. Track your daily spending using natural language, export summaries, and optionally extend via a lightweight FastAPI backend.


Features

  • Add expenses via command line (ledger add)
  • View by day, week, or custom date range
  • Natural language support (e.g. Bought food for 2000)
  • Summary and basic analytics
  • Edit and delete entries
  • Export to CSV
  • Simple REST API (no auth yet)
  • JSON-based storage (easy to inspect and backup)
  • Pythonic, Typer-powered CLI with FastAPI backend

Installation

You can use either pip (recommended for end users) or poetry (recommended for contributors or development setup).

✅ Option 1: Using pip (PyPI)

pip install quickledger

Then you can use it directly via:

ledger

🛠️ Option 2: Using Poetry (Development)

  1. Clone the repo:
git clone https://github.com/chinyereunamba/ledger.git
cd ledger
  1. Install dependencies:
poetry install
  1. Run the CLI:
poetry run ledger

CLI Commands

➕ Add Expense

ledger add

Supports natural language:

ledger say "Bought food for 1500"

📅 View Expenses

ledger view --date 2025-07-25
ledger view --week
ledger view --range 2025-07-01 2025-07-25

✏️ Edit or Delete

ledger edit --date 2025-07-24 --index 1
ledger delete --date 2025-07-24 --index 1

📤 Export

ledger export --path my_expenses.csv

🌐 API

Start the FastAPI server from the api/ folder:

uvicorn main:app --reload

Endpoints

Method Endpoint Description
GET /expenses/ Get all expenses
POST /expenses/ Add a new expense
GET /expenses/{date} Get expenses for a date
DELETE /expenses/{date} Delete all expenses for a date
GET /summary/ Get total summary
GET /summary/{date} Summary for a specific date
GET /summary/week Past 7 days summary
GET /summary/range Summary for a date range

⚠️ No authentication yet — intended for local/private use.


🧠 NLP Support

You can input expenses like:

ledger say "Paid for transport 700"

This is automatically parsed as:

  • Expense: transport
  • Amount: 700
  • Date: today (default)

📂 Project Structure

ledger/
├── ledger/               # CLI logic & utilities
│   ├── ledger.py
│   ├── utils.py
│   └── constants.py
├── api/                  # FastAPI backend
│   ├── main.py
│   ├── routes/
│   │   └── __init__.py
│   └── models.py
├── ledger.json           # Local JSON storage
|--- main.py
├── pyproject.toml        # Poetry config
├── README.md             # ← You're here
└── LICENSE

📦 PyPI

Coming soon to PyPI for easier installation via pip.


📃 License

MIT © 2025 Chinyere Unamba

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

quickledger-0.1.1.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

quickledger-0.1.1-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: quickledger-0.1.1.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.12 Linux/6.8.0-60-generic

File hashes

Hashes for quickledger-0.1.1.tar.gz
Algorithm Hash digest
SHA256 127a48274454e474ceea9a2894a23c62965cee220cae2ff910ecfffdf6d7e1dd
MD5 909f7ccf53cb63fb7601ca090a381af1
BLAKE2b-256 74a3b415cf61d8a6f56f3e7b7d0f95c7e1e120d3435f35dc809ea7432128b624

See more details on using hashes here.

File details

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

File metadata

  • Download URL: quickledger-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.12 Linux/6.8.0-60-generic

File hashes

Hashes for quickledger-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c079ae1be13d8ab6a98a9de02d06495ae16823a7e19c1d69dc02d443b17b38fb
MD5 0f630eb8cc373b9ffb4087868802f973
BLAKE2b-256 1df6daba828ba6867af5052f246d3a8c5bbdd74cab0afed71d41b8675816878b

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