Skip to main content

Python-based configuration reader

Simply enough, loads a file into a Python module object but does not place it in the module cache or otherwise bind it.

>>> import posixpath
>>> conf = load(posixpath.__file__)
>>> conf  # doctest: +ELLIPSIS
<module '<config>' from '...'>
>>> conf.pathsep
':'

And so on. You could also use load_dict to get a dict instead:

>>> type(load_dict(posixpath.__file__))
<type 'dict'>

Though, if you try to load files that aren’t recognized or loadable, you get an error:

>>> load("lala.ini")
Traceback (most recent call last):
  ...
ConfigurationError: no suitable loader for config module 'lala.ini'

Metadata

Release files for pyconf 0.5

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

Source distribution (sdist)

Source distribution for pyconf 0.5
File Size Uploaded
pyconf-0.5.tar.gz 1.7 kB Details

Release files / pyconf-0.5.tar.gz

Download URL pyconf-0.5.tar.gz
Size 1.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0b040520a6b330058bd11f97d51e221f9ba2897e5516eacb3014cc324aace865
BLAKE2b-256 checksum
How to use checksums
82396054458b9156dfdd3be3041cbc8b5e19499e43dec55e6199fd7657021af1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.5 This release

1 release file

0.4.1

1 release file

0.4

1 release file

0.3

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