pycents is a strongly typed Python library for representing and manipulating monetary values with ISO 4217-compliant currencies and explicit rounding semantics and rich formatting options.
-
ISO 4217 compliance — currencies are represented with their standardized codes and minor-unit definitions, while Money uses integer minor units for exact monetary representation.
-
Explicit rounding — monetary rounding is never performed implicitly during arithmetic. Rounding occurs only when explicitly requested by the application. (Note: Intermediate arithmetic remains bound by the standard limits of Python's underlying decimal context. See the [Guide] for technical details)."
Features
- ISO 4217 currency definitions
- Immutable
Moneytype - Precise decimal arithmetic
- Explicit rounding semantics.
- Locale-aware currency formatting
- Pluggable formatting backends
- Custom format specification
Status
1.0.0 (Production Ready)
pycents is stable and ready for production use. The public API is frozen and fully covered by tests, adhering strictly to Semantic Versioning (SemVer).
Documentation
Full documentation and API reference are available at pycents.readthedocs.io.
License
pycents is distributed under the MIT License.
See the LICENSE file for details.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pycents-1.0.0.tar.gz.
File metadata
- Download URL: pycents-1.0.0.tar.gz
- Upload date:
- Size: 138.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb4e7c38d05b73c05a3f82dfd20ce72353e34b1918080b414d65d6107661387d
|
|
| MD5 |
f8cd7705c7aa8ce93fd36b839596c71a
|
|
| BLAKE2b-256 |
a01942e8329a717ad2a25413334bab93be4b793a3366b6ee5db2800d4494a6cb
|
File details
Details for the file pycents-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pycents-1.0.0-py3-none-any.whl
- Upload date:
- Size: 27.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4bcf92a864d1bfb21773f7881b4791b917c39b416c54400de2679fcd48aad81
|
|
| MD5 |
aa71bfb98c4584eef15981d03888a737
|
|
| BLAKE2b-256 |
b02171b4e5b7171027c04361c1d3e998a144da5e6da3ec7d10f01ffe10ea9197
|