Skip to main content

Convert a .ini config file to a typed Object

/videos/best_now.gif

Installation

Install via pip pip install config-to-object.
There are no dependencies.

Usage

Create your .ini configuration file. For an example look at example_config.ini. You can use any type of native python object such as tuples, lists, strings, floats, integers as parameter values (except dict). There type will be automatically recognized when loading the config file.

Load your configuration file using from config_to_object import load_config and config = load_config("path/to/your/config.ini")

You can access the values from your .ini using . syntax: words = config.Params.words.

If you want your config object to be type hinted, so that your IDE can give you better code completions, run ini_typefile path/to/your/config.ini config_types.py. Then, in your code add from config_types import Config and initialize your config with config:Config = load_config("path/to/your/config.ini")

Metadata

Release files for config-to-object 1.0.3

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

Source distribution (sdist)

Source distribution for config-to-object 1.0.3
File Size Uploaded Provenance Actions
config-to-object-1.0.3.tar.gz 3.2 kB Without provenance Details for config-to-object-1.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for config-to-object 1.0.3
File Interpreter ABI Platform Actions
config_to_object-1.0.3-py3-none-any.whl Python 3 none any Details for config_to_object-1.0.3-py3-none-any.whl

Total release size: 6.8 kB

Release files / config-to-object-1.0.3.tar.gz

Download URL config-to-object-1.0.3.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f83f7a632053deae15886150710f994dfa9f2a4bad3ad8f2b9a92258f2b5b42a
BLAKE2b-256 checksum
How to use checksums
dd4f39339b591f1ea4f35a3b9c19799035f27a5549c51e7c6fd57101b0f06641
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

Release files / config_to_object-1.0.3-py3-none-any.whl

Download URL config_to_object-1.0.3-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24185b0f29e3a44b21d48a24c77018ab901571d3d0387195e706a6f8aa67801f
BLAKE2b-256 checksum
How to use checksums
b0d5c0e1780fc45e9e38e5ca9a2bf1058f5f67f5f7169afbd3274db231caa951
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

Security for config-to-object 1.0.3

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.

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