Skip to main content

DotPaw configuration file format

Project description

DotPaw 🐾

A simple configuration file parser for Python using .paw files.

PyPI Python License Downloads


✨ Features

  • Type casting ([int], [bool], [dict], etc.)
  • Environment variables override DotPaw configs
  • Deep merge support for multiple configs
  • Export to environment (can be used by os.environ)
  • Dot-notation access (a.b.c, server.local.port)

📦 Installation

Install with pip or pip3:

pip install dotpaw

🧾 Example .paw file

app.name: MyWebsite
app.debug: true [bool]
app.port: 8080 [int]

db.host: localhost
db.port: 5432 [int]

list.values: 1, 2, 3

🚀 Usage

from dotpaw import load, get

config = load("config.paw")

print(config["app"]["name"])
print(get("app.port", config))

💬 Comments

All comments are prefixed by Java-like // (double frontslash):

// This is a comment.

i.love: dotpaw // Another comment.

🔧 Type Casting

You can force types using square brackets:

value.int: 10 [int]
value.float: 3.14 [float]
value.bool: true [bool]

Supported types:

  • str, int, float, bool, none
  • list, tuple, set, dict
  • bytes, complex, range

🌍 Environment Overrides

Environment variables override config values automatically:

export APP_PORT=9000
app.port: 8080

→ Result: 9000 (does not change)


🔁 Merge Multiple Files

from dotpaw import multi

config = multi([
    "base.paw",
    "dev.paw"
])

📤 Export to Environment

from dotpaw import env

env("config.paw")

💾 Save Config

from dotpaw import save

save("output.paw", config)

📜 License

Licensed under the MIT License. Check LICENSE file.

Copyright (c) 2026 Subhrajit Sain | https://anw.is-a.dev

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dotpaw-1.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dotpaw-1.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file dotpaw-1.0.tar.gz.

File metadata

  • Download URL: dotpaw-1.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for dotpaw-1.0.tar.gz
Algorithm Hash digest
SHA256 312a5e04c03c478d85eefe854abb9495ea7f75d82c4f55f00bc6060f4fa5be9b
MD5 6f50c37cae60857256bcf83afcc95192
BLAKE2b-256 99cb3ac42c606ca93f0e69bc76599346441db89f31c6eda8af9f0ae58c74a569

See more details on using hashes here.

File details

Details for the file dotpaw-1.0-py3-none-any.whl.

File metadata

  • Download URL: dotpaw-1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for dotpaw-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 546100bba44625f4792ef14510cc30d958ff094bfb1a5a5e4777c18f1126d67b
MD5 ef426db9f42132becf14181bbf699974
BLAKE2b-256 8382318f9c509a20abc638f221f484a7a451b05b74a4e4ea1dee36876908aced

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page