This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
Extract Values

A Python module for extracting values out of a string using a simple pattern instead of a regular expression by defining groups of named characters using a pair of opening and closing delimiters.


from extract_values import extract_values

>>> extract_values('/2012/08/12/test.html', '/{year}/{month}/{day}/{title}.html')
{ 'year': '2012', 'month': '08', 'day': '12', 'title': 'test' }

>>> extract_values('John Doe <> (', '{name} <{email}> ({url})')
{'name': 'John Doe', 'email': '', 'url': '' }

>>> extract_values('from 4th October to 10th October', 'from `from` to `to`', strip_values=True, whitespace=1, delimiters=['`', '`'])
{'from': '4th October', 'to': '10th October' }

>>> extract_values('Convert 1500 Grams to Kilograms', 'convert {quantity} {from_unit} to {to_unit}', lowercase=True)
{'quantity': '1500', 'from_unit': 'grams', 'to_unit': 'kilograms' }]

>>> extract_values('The time is 4:35pm here at Lima, Peru', 'The time is :time here at :city', delimiters=[':', ''])
{'time': '4:35pm', 'city': 'Lima, Peru'}

Optional parameters:

* **lowercase** - When True is passed the string is lowercased first
* **whitespace** - Minimal number of extra whitespace to remove
* **strip_values** - When True calls strip() for each value removing whitespace
* **delimiters** - A sequence with only the opening and closing delimiters

In order to install this package from [PyPi]( you can run any of these commands:

easy_install extract-values


pip install extract-values

This library can also be installed directly from Github with the following command:

pip install git+ssh://

This little project was inspired by a similar [Node.js]( module created by sri-lankan developer [Lakshan Perera]( available [here](

(c) 2012 - Antonio Ognio <> - Distributed under the BSD license - Made in Peru.
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
extract-values-1.0.tar.gz (3.6 kB) Copy SHA256 Checksum SHA256 Source Oct 10, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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