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

DottedNameResolver and other stuff lifted from pyramid.path

Project Description


DottedNameResolver and other stuff lifted from pyramid.path from the wonderful Pyramid web framework.

A few quick examples of usage

In [1]: from dotted_name_resolver import DottedNameResolver

In [2]: r = DottedNameResolver()

In [3]: r.resolve('os.path')
Out[3]: <module 'posixpath' from

In [4]: r.resolve('os.path.exists')
Out[4]: <function genericpath.exists>

In [5]: r.resolve('dotted_name_resolver.DottedNameResolver.maybe_resolve')
Out[5]: <unbound method DottedNameResolver.maybe_resolve>

In [6]: import os.path

In [7]: r.resolve(os.path.exists)
ValueError                                Traceback (most recent call
<ipython-input-9-0fd311498cae> in <module>()
----> 1 r.resolve(os.path.exists)

in resolve(self, dotted)
    328         if not isinstance(dotted, string_types):
--> 329             raise ValueError('%r is not a string' % (dotted,))
    330         package = self.package
    331         if package is CALLER_PACKAGE:

ValueError: <function exists at 0x1002a5398> is not a string

In [8]: r.maybe_resolve(os.path.exists)
Out[8]: <function genericpath.exists>

In [24]: from dotted_name_resolver import AssetResolver

In [25]: a = AssetResolver('IPython')

In [26]: a.resolve('html/static/notebook/js/notebook.js').abspath()


For detailed documentation, see the documentation for pyramid.path and replace anything that says pyramid.path with dotted_name_resolver.

Supported python versions

$ /Library/Frameworks/Python.framework/Versions/3.3/bin/tox
  py26: commands succeeded
  py27: commands succeeded
  py33: commands succeeded
  py34: commands succeeded
  pypy: commands succeeded
  congratulations :)



  • Initial release
Release History

Release History

This version
History Node


History Node


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
dotted_name_resolver-0.1.tar.gz (9.2 kB) Copy SHA256 Checksum SHA256 Source Jan 20, 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