Skip to main content

Money field for Django REST framework

pipeline status coverage report pypi

An serializer field implementation for Django REST framework that serializes monetary types provided by py-moneyed library. Serialized data is compatible with Dinero.js JavaScript library.

Usage example

For example, if you would have an serializer like this:

from rest_framework.serializers import Serializer
from rest_framework_money_field import MoneyField


class ProductSerializer(Serializer):
    price = MoneyField()

And you would use the serializer with data like this:

from moneyed import Money
from rest_framework.renderers import JSONRenderer

serializer = ProductSerializer({"price": Money(50, "EUR")})
json = JSONRenderer().render(serializer.data)

You would end up with JSON like this:

{
    "price": {
        "amount": 5000,
        "currency": "EUR"
    }
}

Metadata

Release files for rest-framework-money-field 3.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rest-framework-money-field 3.1.0
File Size Uploaded
rest_framework_money_field-3.1.0.tar.gz 27.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rest-framework-money-field 3.1.0
File Interpreter ABI Platform
rest_framework_money_field-3.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 30.7 kB

Release files / rest_framework_money_field-3.1.0.tar.gz

Download URL rest_framework_money_field-3.1.0.tar.gz
Size 27.2 kB
Tags Source
SHA-256 checksum
How to use checksums
462a2e29dc35a24c5a5764c9773c379a33e022d39ba551712450b6025ac9fecf
BLAKE2b-256 checksum
How to use checksums
d784aa2efda82aa9ca9d81ab9f9dad59a682de2fecbf538a7ec64eb3274e126c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / rest_framework_money_field-3.1.0-py3-none-any.whl

Download URL rest_framework_money_field-3.1.0-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9dda4c43bdfc5a35df2b6e734a70b2acc566b391cef65deaa188e845668be42c
BLAKE2b-256 checksum
How to use checksums
cebda537c2fc64728a11a22535e085d236975ea3d4fd575a9938c640188873c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

3.1.0 This release

2 release files

3.0.0

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.0.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page