Money field for Django REST framework
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rest_framework_money_field-3.1.0.tar.gz | 27.2 kB | Without provenance | Details for rest_framework_money_field-3.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rest_framework_money_field-3.1.0-py3-none-any.whl | Python 3 | none | any | Details for rest_framework_money_field-3.1.0-py3-none-any.whl |
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}
|
Security for rest-framework-money-field 3.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.