Package soovee_lib :: Module mkuri
[frames] | no frames]

Module mkuri

SooVee Serial Audio Manager - File and path management library for SooVee.


Requires:
Functions
basestring
mkpath(filepath, workpath, subpath='')
Combine file fragments workpath and filepath.
basestring
mkfile(urlpath)
Create a file path from urlpath to locate a cache file locally.
bool
mkquery(service, action, idnum)
Perform a get query on a service page.
Variables
  __package__ = 'soovee_lib'
Function Details

mkpath(filepath, workpath, subpath='')

 

Combine file fragments workpath and filepath. Optionally add a subpath of workpath to filepath. When path is new, make needed directories before returning the combined path.

Parameters:
  • filepath (basestring) - local file path fragment.
  • workpath (basestring) - local work path fragment.
  • subpath (basestring) - Optional file path fragement.
Returns: basestring
Qualified full file path

Requires: os

mkfile(urlpath)

 

Create a file path from urlpath to locate a cache file locally. An md5 hash is made of urlpath to create the file path that is returned.

Parameters:
  • urlpath (basestring) - local file path fragment.
Returns: basestring
Qualified file name

Requires: hashlib

mkquery(service, action, idnum)

 

Perform a get query on a service page.

Parameters:
  • service (object) - Intialized soovee.lib.sv_conf.App_Data
  • action (basetring) - Abbreviated name of query to perform.
  • idnum (int) - Service id of serial audio feed to query.
Returns: bool
Success of query

Requires: urllib