fashion-size
Size types (UK dress size, EU adult shoe size, chest in centimetres) and the charts that convert them. Clothing and footwear share this library.
pip install fashion-size
Requires Python 3.12 or newer. There are no runtime dependencies.
Default UK / EU / US / AU charts are in Python. Brand charts that differ from those defaults ship as JSON: the rows, the source page, and notes live with the chart, and the date it was last checked lives in the brand catalog.
This package does not depend on Django. Django model fields are in django-fashion-size.
The source repository is github.com/ababic/fashion-size.
Brand charts
from fashion_size import SUPPORTED_BRANDS, ProductType
from fashion_size.charts import chart_for, load_brand_charts
"Dune London" in SUPPORTED_BRANDS
chart = chart_for("Dune London", "adult-shoe", "adult", "female", product_type=ProductType.SHOES)
chart.updated_at
chart.source_url
chart.source_notes
chart.rows
ProductType is the list of ranges a brand chart can cover on its own (jeans, trousers, shoes, boots, and so on). A chart names the product types it replaces.
Each override chart is a JSON file named by id under src/fashion_size/fixtures/charts. The file holds the rows, the source page, and any notes about that table. Which brand it belongs to, the size type and demographic, and when it was last checked live in fashion_size.brands. A brand with no charts there matches the default charts.
Conversion
from fashion_size.types import UK_DRESS_SIZE, Size
value = Size.from_raw("10", UK_DRESS_SIZE)
value.convert("eu", age_group="adult", gender="female")
French dress, shoe, cup, and chest labels are the EU size ("fr" converts to that EU value). French band size is the EU centimetre label plus 15. French waist size is not on the chart. Lengths convert between centimetres and inches (1 in = 2.54 cm) for values from 5 to 150 inches. Display rounding (nearest centimetre, nearest half inch) does not change the stored value.
Display language defaults to en-gb. A host application can register its own getter (Django's get_language, for example) with fashion_size.register_display_language. Brand-specific conversion is supplied the same way, via fashion_size.register_brand_converter.
Development
pip install -e ".[testing,development]"
pytest
ruff check src tests
Releasing
Publishing uses PyPI trusted publishing. On PyPI, add a pending publisher for the fashion-size project:
- Owner:
ababic - Repository:
fashion-size - Workflow:
release.yml - Environment:
pypi
Create a GitHub environment named pypi (no secrets). Tag v0.1.0 — the tag must match fashion_size.__version__ — to test, build the distributions, attach them to a GitHub release, and publish to PyPI.
License
BSD 3-Clause. See LICENSE.
Metadata
Release files for fashion-size 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fashion_size-0.1.1.tar.gz | 28.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fashion_size-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 62.8 kB
Release files / fashion_size-0.1.1.tar.gz
| Download URL | fashion_size-0.1.1.tar.gz |
|---|---|
| Size | 28.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ece7b7b90feddbe7ffcc5da5f06523e93d767b7859f4f93985eb0e3f5c18b64
|
|
BLAKE2b-256 checksum How to use checksums |
aeed1ba2c7dfae54d4a9067c992bcc6be5685e4749079cd188d092c18566e142
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logRelease files / fashion_size-0.1.1-py3-none-any.whl
| Download URL | fashion_size-0.1.1-py3-none-any.whl |
|---|---|
| Size | 34.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
899c14758f6dcc407e467be9d989789761f3dfa17bb46144385ca04b791c1572
|
|
BLAKE2b-256 checksum How to use checksums |
92c8128f8e5b4cc87ea6379b1b71a6fad058c5bf370fb9d30ddf248f2bd7f4bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency log