diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2025-08-16 10:20:35 -0400 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2025-08-16 10:20:35 -0400 |
| commit | cabe8e57b99558dcb148585b4a2cd6ed996dd1c1 (patch) | |
| tree | 747d306604b84a10878a7b61cbe9b8e888c8ba39 | |
| parent | Remove flake8 config (diff) | |
| download | config-file-cabe8e57b99558dcb148585b4a2cd6ed996dd1c1.zip | |
Add basic docs
| -rw-r--r-- | .readthedocs.yaml | 12 | ||||
| -rw-r--r-- | docs/index.md | 29 | ||||
| -rw-r--r-- | docs/installation.md | 25 | ||||
| -rw-r--r-- | docs/requirements.txt | 1 | ||||
| -rw-r--r-- | mkdocs.yaml | 74 |
5 files changed, 141 insertions, 0 deletions
diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..c0a5543 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,12 @@ +version: 2 +build: + os: ubuntu-24.04 + tools: + python: "3.13" + +mkdocs: + configuration: mkdocs.yaml + +python: + install: + - requirements: docs/requirements.txt diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..8dc6ea9 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,29 @@ +## About Config File + +The Config File project is designed to allow you to easily manipulate your +configuration files with the same simple API whether they are in INI, JSON, +YAML, or TOML. + +## Quick Example + +```python +from config_file import ConfigFile + +# Load any supported configuration file +config = ConfigFile("~/myapp/config.ini") + +# Get values with automatic type conversion +database_port = config.get('database.port', return_type=int) + +# Set new values +config.set('database.host', 'localhost') + +# Save changes +config.save() +``` + +## Next Steps + +- [Install Config File](installation.md) to get started +- Check out the [Quick Start Guide](quick-start.md) for common usage patterns +- Explore the [API Reference](api-reference.md) for detailed documentation diff --git a/docs/installation.md b/docs/installation.md new file mode 100644 index 0000000..a1212bc --- /dev/null +++ b/docs/installation.md @@ -0,0 +1,25 @@ +# Installation + +Config File is available to download through PyPI and can be installed using pip. +It requires Python 3.9+ to install. + +## Basic Installation + +For basic functionality with INI and JSON support: + +```bash +pip install config-file +``` + +This will install the core package with support for: + +- **INI files** (using Python's built-in `configparser`) +- **JSON files** (using Python's built-in `json`) + +## Installing with Extras + +If you want to work with YAML and TOML files, you'll need to install the optional dependencies: + +```bash +pip install config-file[yaml,toml] +``` diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..f2caded --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1 @@ +mkdocs==1.6.1 diff --git a/mkdocs.yaml b/mkdocs.yaml new file mode 100644 index 0000000..7a67672 --- /dev/null +++ b/mkdocs.yaml @@ -0,0 +1,74 @@ +site_name: Config File +site_description: Simple manipulation of ini, json, yaml, or toml files +site_author: Eugene Triguba +site_url: https://config-file.readthedocs.io + +repo_name: eugenetriguba/config-file +repo_url: https://git.sr.ht/~eugenetriguba/config-file + +theme: + name: material + palette: + - scheme: default + primary: blue + accent: blue + toggle: + icon: material/brightness-7 + name: Switch to dark mode + - scheme: slate + primary: blue + accent: blue + toggle: + icon: material/brightness-4 + name: Switch to light mode + features: + - navigation.tabs + - navigation.sections + - navigation.expand + - navigation.top + - search.highlight + - search.share + - content.code.copy + +plugins: + - search + - mkdocstrings: + handlers: + python: + options: + docstring_style: google + +markdown_extensions: + - admonition + - attr_list + - codehilite: + guess_lang: false + - toc: + permalink: true + - pymdownx.arithmatex + - pymdownx.betterem: + smart_enable: all + - pymdownx.caret + - pymdownx.critic + - pymdownx.details + - pymdownx.emoji: + emoji_index: !!python/name:materialx.emoji.twemoji + emoji_generator: !!python/name:materialx.emoji.to_svg + - pymdownx.highlight: + anchor_linenums: true + - pymdownx.inlinehilite + - pymdownx.keys + - pymdownx.magiclink + - pymdownx.mark + - pymdownx.smartsymbols + - pymdownx.superfences + - pymdownx.tabbed: + alternate_style: true + - pymdownx.tasklist: + custom_checkbox: true + - pymdownx.tilde + +nav: + - Home: index.md + - Getting Started: + - Installation: installation.md |