Skip to main content

Machine-readable UK Chart of Accounts with VAT treatments and HMRC mappings

Project description

uk-chart-of-accounts

Machine-readable UK Chart of Accounts for Python. 166 standard nominal codes with account types, VAT treatments, and HMRC box mappings.

Install

pip install uk-chart-of-accounts

Quick start

from uk_coa import ChartOfAccounts, AccountType, VatRate

coa = ChartOfAccounts()

# Look up by code
account = coa.get(7602)
account.name          # "Accountancy Fees"
account.type          # AccountType.OVERHEAD
account.vat           # VatRate.STANDARD
account.vat_rate_pct  # 0.20
account.debit_increase  # True (expenses increase on debit side)

# Search
coa.search("insurance")           # All accounts with "insurance" in the name
coa.by_type(AccountType.INCOME)   # All income accounts
coa.by_vat(VatRate.EXEMPT)        # All VAT-exempt accounts
coa.by_tag("motor")               # All motor-related accounts
coa.code_range(7000, 7012)        # Payroll overheads

# Convenience
coa.expenses()                    # Direct expenses + overheads
coa.income_accounts()             # All income codes
coa.balance_sheet_accounts()      # Assets, liabilities, equity
coa.profit_and_loss_accounts()    # Income, expenses

# Export for LLM prompts
context = coa.to_prompt_context()
# or filter: coa.to_prompt_context(types=[AccountType.OVERHEAD])

# Export as dict (JSON-serialisable)
data = coa.to_dict()

What's included

  • 166 nominal codes - the standard UK chart (Fixed Assets through Control accounts)
  • 10 account types - with double-entry rules (debit/credit increase direction)
  • VAT treatments - Standard (20%), Reduced (5%), Zero-rated, Exempt, Outside Scope
  • HMRC box mappings - CT600, VAT Return, FPS/RTI references where applicable
  • Tags - searchable labels (motor, payroll, premises, insurance, etc.)
  • LLM export - to_prompt_context() formats the chart for AI/LLM prompts
  • Zero dependencies - pure Python, stdlib only

Account types

Type Debit increases? Statement
Fixed Asset Yes Balance Sheet
Current Asset Yes Balance Sheet
Current Liability No Balance Sheet
Long-Term Liability No Balance Sheet
Equity No Balance Sheet
Income No Profit & Loss
Direct Expense Yes Profit & Loss
Overhead Yes Profit & Loss
Tax Yes Profit & Loss
Control Yes Balance Sheet

VAT treatments

Treatment Rate Example codes
Standard 20% Most expenses, sales
Reduced 5% Domestic fuel/power
Zero-rated 0% Books, postage
Exempt - Insurance, bank charges, rent
Outside Scope - Wages, taxes, depreciation

Contributing

PRs welcome - particularly for:

  • Additional HMRC box mappings
  • VAT treatment corrections
  • Industry-specific code extensions

Licence

MIT

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

uk_chart_of_accounts-0.1.0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

uk_chart_of_accounts-0.1.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file uk_chart_of_accounts-0.1.0.tar.gz.

File metadata

  • Download URL: uk_chart_of_accounts-0.1.0.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for uk_chart_of_accounts-0.1.0.tar.gz
Algorithm Hash digest
SHA256 88b6622b61f9b92ea2d0f81dceac7a6875a14d6dce87214f7d7d028c02c158dd
MD5 ae90a55998fd1254d4d4ecab766f046e
BLAKE2b-256 0c4ba1729de5dad695cb4e45ae316f47b490c9346294b886e98f3d4bcca3245f

See more details on using hashes here.

File details

Details for the file uk_chart_of_accounts-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for uk_chart_of_accounts-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a0bbac98ea7dde06028c92581968ea2919aeea5a3b0f746dd737f84b4bddefb7
MD5 bb6d80caa67abc2f8901744ca66efe30
BLAKE2b-256 73af8252c7b5dabb0f3c36233a7805f2121e6147ff85bb6ba6d4120963358704

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