Skip to content

foss-santanu/libs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Library codes developed by me

This is work in progress

Tools developed for...

  1. Configuration Management

    • Found in the package config-mgmt
    • Defines a Configurator class
      • Loades a configuration file from path (currently - json and .py formats supported)
      • New config format supported using config_loader_registry.register_loader()
    • Defines a ConfigurationException class to represent any config related error condition
  2. Simple LRU Caching

    • Defined in the module simplecache in libs package
    • Defines a class SimpleCache for implementing the LRU cache
    • A limited sized cache (default 1000 entries), size is specified during instantiating the cache
    • When number of entries exceeds cache size old entries are automatically removed from cache
  3. Dynamic code loading utility

    • Defined in the module loader_utils in libs package
    • Function import_into_namespace() imports a python module into target namespace
      • If no target namespace provided it defaults to callers global namespace
    • Function exec_and_get() executes python code snippet in a string and returns the variable value
    • Function lookup_function() looks up for a function name in the namespace and returns the function object

Usages

For usage details please go through respective the code files, all the name are pretty self explanatory and all the important code segments are appropriately commented.

About

My library codes in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages