loadfig
One-liner Python pyproject config loader. Lightweight, simple, and VCS-aware with root auto-discovery.
✨ Features 🚀 Quick start 📚 Documentation 🤝 Contribute 👍 Adopters 📜 Legal
Features
loadfig is a Python package designed to load
pyproject and TOML configuration files adhering to modern standards:
- Unified: Load your configuration either from
.<mytool>.toml,.config/mytool.tomlorpyproject.toml(section[tool.mytool]) using single line:tool_config = loadfig.config(name="<mytool>") - Load
pyproject.toml: Find and load the wholepyproject.tomlusing single line:pyproject = loadfig.pyproject() - No dependencies: Python-only, no third-party dependencies.
- Do one thing well: Only load the configuration,
use other libraries like
python-dotenvfor bells and whistles. - Git-aware: Automatically detects project's
rootusing git (or other VCS), no need to specify the path to your configuration file.
Where can I use it?
When creating Python tools and you want to:
- give your users a standard place to configure it
(
pyproject.tomlor.<mytool>.toml) - make the choices readable and findable
- create tools without maintaining boilerplate
Quick start
Installation
> pip install loadfig
Usage
pyproject.toml loading
One line is all you need:
# Returns dict with all pyproject contents
pyproject = loadfig.pyproject()
# Get the name of the project
print(pyproject["project"]["name"])
Tool configuration loading
Assume you have the following section in your pyproject.toml
file at the root of your project:
[tool.mytool]
name = "My Tool"
version = "1.0.0"
You can load the configuration for mytool using:
import loadfig
config = loadfig.config("mytool")
config["name"] # "My Tool"
config["version"] # "1.0.0"
That is all you will likely need to do to load your configuration for your Python project (in a modern, unified way).
[!IMPORTANT]
pyproject.tomlcan be located at the root of your project, while the loading file can be in a subfolder (e.g.src/mytool/loader.py).
See documentation for more details about the arguments and options available.
Contribute
We welcome your contributions! Start here:
Legal
- This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
- This project is copyrighted by open-nudge - the appropriate copyright notice is included in each file.
Metadata
Release files for loadfig 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| loadfig-0.1.1.tar.gz | 13.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| loadfig-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.5 kB
Release files / loadfig-0.1.1.tar.gz
| Download URL | loadfig-0.1.1.tar.gz |
|---|---|
| Size | 13.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2c31a39bdf37afd49afb1c26202cf0870b679da84d5e9f01a28394ce6b8e73a
|
|
BLAKE2b-256 checksum How to use checksums |
6a4c93a640d200fca2550999a5f4c19f7ef0239ca2f3f21b8b66c94c2590cb1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 12, 2026.
Transparency logRelease files / loadfig-0.1.1-py3-none-any.whl
| Download URL | loadfig-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
11ea9382802b3bb255e4694959c0e076151ba9028ce3956f91b617ab8164a10e
|
|
BLAKE2b-256 checksum How to use checksums |
37ab1a45aa10592bf63253705df769518545dc245f34b8d3ccd40e7576ed53f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 12, 2026.
Transparency log