Skip to main content

dicto

A dict-like object that enables access of its elements as regular fields. Dicto's main feature is delivering an elegant experience while using configuration files/objects.

Example

You can create a Dicto from any dict:

import dicto

params = dicto.Dict({"learning_rate": 0.001, "batch_size": 32 })

optimizer = Adam(params.learning_rate)

Dicto parses through arbitrary nested structures of dicts, list, tuple, and set:

import dicto

params = dicto.Dict({
    "points":[
        {
            "x": 1,
            "y": 2
        },
        {
            "x": 3,
            "y": 4
        }
    ]
})

print(params.points[0].x) # 1

dicto can load json, yaml, and xml formats directly, for example, given this YAML file

# params.yml
learning_rate: 0.001
batch_size: 32

you can load it like this:

import dicto

params = dicto.load("params.yml")
optimizer = Adam(params.learning_rate)

Installation

pip install dicto

License

MIT License

Metadata

Release files for dicto 0.2.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 dicto 0.2.0
File Size Uploaded
dicto-0.2.0.tar.gz 3.9 kB Details

Built distribution (wheel)

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

Total release size: 7.8 kB

Release files / dicto-0.2.0.tar.gz

Download URL dicto-0.2.0.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5fe029e5c9b5f246e9a3dd5933042ce826efb0d862551541148ab3450f5d811a
BLAKE2b-256 checksum
How to use checksums
3bcca72795248df11fa29c85a9801536a7cb1e0fe2da07498badf65b758e2bf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.7.6 Linux/5.3.0-7629-generic

Release files / dicto-0.2.0-py3-none-any.whl

Download URL dicto-0.2.0-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c110047d763580e4967262598599430014d6a95a89f0befc05f29eed050009f0
BLAKE2b-256 checksum
How to use checksums
bde962fb8eff27501056bd37d19fe61c3060470a0649ec0b163b89d54419b419
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.7.6 Linux/5.3.0-7629-generic

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.21

1 release file

0.0.20

1 release file

0.0.19

1 release file

0.0.18

1 release file

0.0.17

1 release file

0.0.15

1 release file

0.0.14

1 release file

0.0.13

1 release file

0.0.12

2 release files

0.0.11

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

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