Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Damn Simple Config File Parser.

Project Description

About

Just parses ini-style file and return dict with values. Really simple.

Features

  • Knows str, int, list, boolean and None types
  • Supports sections and subsections
  • Supports custom converters
  • Easy to use – one function!

API

parse function takes any iterable (fileobj, for example), which produces strings and returns filled dict or raises ParseError.

parse_file helper function takes path to file, opens it and passes fileobj to parse functino.

FAQ

Q1: Does ‘dosca’ have validation capabilities?

A1: No, it’s not. If you want validate your config, use library designed for this task. Contract, Procrustes or, perhaps, Damn Simple Validation Library?

Q2: Does it support interpolation or some complex types?

A2: No, it’s not. When I say ‘simple’, I mean really simple. Dosca only support basic things, essential for parsing config files. If you want advanced features, use ConfigObj or ConfigParser. Or xml and dtd?

Q3: How to use this library? A3: Just pass fileobj to dosca.parse or see test_dosca.py for details.

Install

~/yourvirtualenv/python setup.py install

pip install dosca

License

The MIT License, in LICENSE file.

Release History

Release History

This version
History Node

2.0.0

History Node

1.8.0

History Node

1.4.2

History Node

1.4

History Node

1.2.6

History Node

1.2.5

History Node

1.2.1

History Node

1.1.1

History Node

1.1.0

History Node

0.0.3

History Node

0.0.2

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
dosca-2.0.0.macosx-10.12-x86_64.tar.gz (7.1 kB) Copy SHA256 Checksum SHA256 any Dumb Binary Dec 11, 2016
dosca-2.0.0.tar.gz (4.5 kB) Copy SHA256 Checksum SHA256 Source Dec 11, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting