Skip to main content

doz

Dozenal & Floating-point Dozenal types for Python 3.11+

Simply, defines doz the dozenal and fdz the floating-point dozenal.

from doz import doz, fdz

doz("1X")      # Decimal: 22
doz(22)        # Format from int
fdz("X4.E3")   # Decimal: 124.9375
fdz(124.9375)  # Format from float


# A class that supports casting to doz and fdz
class MyClass(object):
    def __init__(self) -> None:
        ...
    
    def __doz__(self) -> doz:
        return doz(...)
    
    def __fdz__(self) -> fdz:
        return fdz(...)


my_class = MyClass()
doz(my_class)
fdz(my_class)

Release files for doz 1.0.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 doz 1.0.0
File Size Uploaded
doz-1.0.0.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for doz 1.0.0
File Interpreter ABI Platform
doz-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.1 kB

Release files / doz-1.0.0.tar.gz

Download URL doz-1.0.0.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
69c5d21a84ee2f8cd4b0ad6e92adceb4721aaa67b578b10ecb5d6844a5f57e3e
BLAKE2b-256 checksum
How to use checksums
fa0ec9d97de29c2ade80514a6bec167af4eab070b4a6949936024f27fd264ff0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / doz-1.0.0-py3-none-any.whl

Download URL doz-1.0.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1715cee2e4bc2898607e6f5422c5f4742389ce0df8e22216acbd65e5766c4892
BLAKE2b-256 checksum
How to use checksums
b281228a9122b718543e7368bf73e813a141d248a13aa3336a94d7d037116ab8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.1.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