class_docstr: Simple class to add base path to relative path
class_docstr_tok: ["Simple","class","to","add","base","path","to","relative","path"]
docstr: Initialize datasource
  
  Parameters
  ----------
  base_path : str
     path to prepend to all relative paths
  
  Examples
  --------
  >>> from os.path import join as pjoin
  >>> repo = Datasource(pjoin('a', 'path'))
  >>> fname = repo.get_filename('somedir', 'afile.txt')
  >>> fname == pjoin('a', 'path', 'somedir', 'afile.txt')
  True
docstr_tok: ["Initialize","datasource","Parameters","--","--","--","--","--","base_path",":","str","path","to","prepend","to","all","relative","paths","Examples","--","--","--","--",">",">",">","from","os.path","import","join","as","pjoin",">",">",">","repo","=","Datasource","(","pjoin","(","'","a","'",",","'path","'",")",")",">",">",">","fname","=","repo.get_filename","(","'somedir","'",",","'afile.txt","'",")",">",">",">","fname","==","pjoin","(","'","a","'",",","'path","'",",","'somedir","'",",","'afile.txt","'",")","True"]
code: def __init__(self, base_path):
      """Initialize datasource
  
      Parameters
      ----------
      base_path : str
         path to prepend to all relative paths
  
      Examples
      --------
      >>> from os.path import join as pjoin
      >>> repo = Datasource(pjoin('a', 'path'))
      >>> fname = repo.get_filename('somedir', 'afile.txt')
      >>> fname == pjoin('a', 'path', 'somedir', 'afile.txt')
      True
      """
      self.base_path = base_path
  
imports: import configparser
  import glob
  import os
  import sys
  from os.path import join
  from packaging.version import Version
  from .environment import get_nipy_system_dir, get_nipy_user_dir
label_desc: Use image node_id 1 to create a new Datasource object  with example: obj = Datasource(base_path)