emre / kaptan

configuration manager in your pocket.
https://kaptan.readthedocs.io
BSD 3-Clause "New" or "Revised" License
306 stars 24 forks source link

when using files it does not: #23

Open alexsavio opened 8 years ago

alexsavio commented 8 years ago

When using files, Kaptan does not:

from kaptan import Kaptan
kp = Kaptan()
kp.import_config('config.py')
ImportError
from kaptan import Kaptan
kp = Kaptan(handler='file')
kp.import_config('config.py')
ImportError
from kaptan import Kaptan
kp = Kaptan(handler='file')
kp.import_config('/home/user/project/config.py')
ImportError
from kaptan import Kaptan
kp = Kaptan(handler='file')
cfg = kp.import_config('config')
emre commented 8 years ago

Feel free to send a PR :-)

Not sure I have time these days. +1 for the suggestions though. That's definetely a to-do.

emre commented 8 years ago

@tony do you have time for this? :+1:

alexsavio commented 8 years ago

Hi,

I have just done some kind of adapter here: https://github.com/Neurita/pypes/blob/wip/pypes/config.py#L60

But I can send a PR soon if you agree with the issue.

tony commented 8 years ago

sounds like a good idea

@alexsavio I'm happy to review / QA if you want to PR it. Be sure to include tests.