Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    YamJam 0.1.3

    Download button

    No screenshots available
    Downloads: 308  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Jeff Hinrichs | More programs
    BSD License / FREE
    October 23rd, 2009, 13:03 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    YamJam description

    A multi-project, shared, yaml based configuration system

    If you find yourself writing multiple tools/scripts that share common configuration settings and despise ini files, this will be of interest to you. In my setting, I frequently write code that goes against the same databases and accesses the same resources. So I am constantly repeating code for configuration settings or worse yet, hard-coding it in where it shouldn't be.

    YamJam is a Python module that allows you to put it in a common area that you can secure properly from prying eyes and makes working with oft used resources simple and straight forward.

    YamJam attributes


    * Project settings can saved in a user directory.
    * Multiple configuration files can be specified.
    * files are proper yaml files

    Details

    The main yamjam config file is located ~/.yamjam/config.yaml

    * on windows: c:documents and settings[username].yamjamconfig.yaml
    * on *nix: ~/.yamjam/config.yaml

    Then yamjam looks for possible overrides/additions in the local config.yaml(if it exists) You can override the default config file(s) when you call the function by specifying a different one explicitly. i.e.

     from YamJam import yamjam
     myConfig = yamjam('file/path/filename')


    myConfig is now a dictionary populated with the values from the specified yaml config file. By default YamJam looks for 2 config.yaml files, the main and then a project specific one. You may specify one or more files. Each file path listed should be separated by semi-colons(;)

     myConfig = yamjam('file/path/filename;other/path/file')


    The config.yaml file is yaml formatted which is a superset of json.

    Every call to yamjam() re-reads the config file. If you wish to cache the info then do it in the calling code. i.e.

     myConfig = yamjam()


    If you only want to cache part of the configuration

     myCfg = yamjam()['mykey']



    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    YAML configurator | multiple configurations | Python library | Python | YAML | configurator

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM