{"id":20954216,"url":"https://github.com/ddanier/django_price","last_synced_at":"2025-05-14T04:32:21.127Z","repository":{"id":4566704,"uuid":"5708017","full_name":"ddanier/django_price","owner":"ddanier","description":null,"archived":false,"fork":false,"pushed_at":"2015-12-03T20:00:44.000Z","size":47,"stargazers_count":9,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T11:56:09.847Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ddanier.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-09-06T20:20:28.000Z","updated_at":"2021-01-28T11:33:54.000Z","dependencies_parsed_at":"2022-09-12T08:50:55.790Z","dependency_job_id":null,"html_url":"https://github.com/ddanier/django_price","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddanier%2Fdjango_price","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddanier%2Fdjango_price/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddanier%2Fdjango_price/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddanier%2Fdjango_price/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ddanier","download_url":"https://codeload.github.com/ddanier/django_price/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254071326,"owners_count":22009771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T01:07:46.865Z","updated_at":"2025-05-14T04:32:20.822Z","avatar_url":"https://github.com/ddanier.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"ABOUT\n=====\n\ndjango_price is an attempt to implement price representation for django, done the\nright way. Prices itself are very easy to implement, but may be done very\nwrong if it comes to do calculations including tax (or multiple taxes).\n\ndjango_price features a Price class to represent net/tax/gross prices. This\nclass may be added, multiplied, etc. like you would some \"simple decimal\"\nexpect to behave. Internaly however it keeps track of all applied taxes\nand its corresponding net/tax/gross amounts. So adding two prices to\ncalculate the total of - for example - an invoice does not loose important\ninformation (like which tax amounts are included).\n\nWHY\n===\n\nAs said above price calculation can go terribly wrong. This even happens for\nbig players like Magento (10€ product + 5€ shipping = 15.01€ for 19% tax, before Magento 1.8).\ndjango_price tries to do things right to avoid such issues.\n\nFEATURES\n========\n\n* Basic calculation for prices (including tax information)\n* Knows the used currency (for rounding and formatting)\n* Stores taxes to your database (LinearTax and Multitax)\n* Proper rounding for prices (on demand, based on used currency)\n* Utilities to:\n\n  - Store prices to the database\n  - Round prices based on the used currency\n\nROUNDING\n========\n\ndjango_price does implicit rounding when calculating the net/gross/tax amount\nof prices. In addition the raw/precise values are stored internally. So when you calculate\nwith prices the calculations are always done using the precise prices, afterwards the rounded\nresults are recalculated.\n\nIf you need prices to stay stable (10 times 100 should be exactly 1000) you may\nneed to do explicit rounding. This should always happen when you need to display the\namounts to anyone.\n\nREQUIREMENTS\n============\n\n* Django (obviously)\n* django_deferred_polymorph (may be skipped if you don't use the supplied models)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddanier%2Fdjango_price","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fddanier%2Fdjango_price","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddanier%2Fdjango_price/lists"}